:root {
    --color-magenta: #a3498b; /* Magenta/Violeta institucional del logo */
    --color-magenta-hover: #863972;
    --color-orange: #f38a2c; /* Naranja institucional del logo */
    --color-orange-hover: #d67520;
    --color-bg-light: #ffffff;
    --color-bg-alt: #fdfaf8;
    --color-text-main: #3a3a3a;
    --color-text-muted: #666666;
    --color-border: #e2e8f0;
    
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.site-header {
    background-color: var(--color-bg-light);
    background-image: url('../img/fondo_encabezados_menues.png');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--color-magenta);
    text-decoration: none;
}

.header-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

.logo-link { text-decoration: none; display: flex; align-items: center; height: 100%; }

.main-nav .nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.nav-item a {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
}

.nav-item a:hover {
    color: var(--color-magenta);
}

.nav-link-revista { 
    background-color: var(--color-magenta);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.nav-link-revista:hover { background-color: var(--color-magenta-hover) !important; }
.nav-link-sistema { 
    background-color: var(--color-orange);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.nav-link-sistema:hover { background-color: var(--color-orange-hover) !important; }

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    border: 1px solid var(--color-border);
    padding: 10px 0;
    list-style: none;
    z-index: 1001;
}

.nav-item.has-dropdown:hover > .dropdown {
    display: block;
}

/* Submenus */
.dropdown li {
    position: relative;
}

.submenu {
    display: none;
    background-color: #e9ecef;
    list-style: none;
    border-left: 3px solid var(--color-orange);
}

.submenu .submenu {
    background-color: #dee2e6;
    border-left: 3px solid var(--color-magenta);
}

.has-submenu.open > .submenu {
    display: block;
}

.dropdown li a {
    padding: 10px 20px;
    font-weight: 400;
    display: block;
}

.submenu li a {
    padding-left: 30px;
}

.submenu .submenu li a {
    padding-left: 45px;
    font-size: 0.9em;
}

.dropdown li a:hover {
    background-color: #e2e6ea;
    color: var(--color-magenta);
}

.has-submenu > a::after {
    content: " ▼";
    font-size: 0.8em;
    float: right;
    margin-top: 3px;
}
.has-submenu.open > a::after {
    content: " ▲";
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
}

/* Main Content */
.site-main {
    flex: 1;
    padding: 40px 0;
}

.page-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-magenta);
    padding-bottom: 10px;
}

.page-header h1, .page-header h2 {
    font-family: var(--font-heading);
    color: var(--color-magenta);
    font-weight: 700;
}

.content-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid var(--color-border);
}

.content-card h3, .content-card h4, .content-card h5, .content-card h6 {
    color: var(--color-orange);
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}
.content-card h3 { font-size: 1.5rem; }
.content-card h4 { font-size: 1.35rem; }
.content-card h5 { font-size: 1.25rem; }
.content-card h6 { font-size: 1.2rem; }

.content-card p {
    margin-bottom: 15px;
}

.content-card ul, .content-card ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.content-card a {
    color: var(--color-magenta);
    text-decoration: none;
}

.content-card a:hover {
    text-decoration: underline;
}

/* Hero & Features (index) */
.hero-section {
    background-color: #e9ecef;
}
.feature-card {
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Footer */
.site-footer {
    background-color: var(--color-text-main);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info h4, .footer-social h4, .footer-links h4 {
    color: var(--color-orange);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    transition: color 0.3s, transform 0.2s;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--color-orange);
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-magenta);
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        border-bottom: 1px solid var(--color-border);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav .nav-list {
        flex-direction: column;
        gap: 10px;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--color-magenta);
        margin-left: 10px;
        display: none;
    }
    
    .nav-item.has-dropdown:active > .dropdown,
    .nav-item.has-dropdown:hover > .dropdown {
        display: block;
    }

    .submenu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--color-orange);
        margin-left: 10px;
        display: none;
    }

    
}
