@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --primary: #660000;
    --primary-light: #850b0b;
    --primary-dark: #4d0000;
    --accent: #C49A00;
    --accent-light: #e5b600;
    --accent-dark: #9e7b00;
    --light: #ffffff;
    --dark: #121212;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --gray: #f8fafc;
    --border: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* Base resets & typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #fafbfc;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Premium Header and Brand Seal */
header {
    background: var(--light);
    padding: 25px 40px;
    border-bottom: 3px double rgba(196, 154, 0, 0.3);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 12px;
    margin-left: 12px;
    display: block;
    font-size: 16px;
    margin-top: 5px;
    border-top: 1px solid rgba(196, 154, 0, 0.2);
    padding-top: 5px;
}

/* Premium Navigation */
nav {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0 40px;
    border-bottom: 4px solid var(--accent);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-right: 35px;
    position: relative;
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    display: block;
    padding: 18px 0;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--light);
    border-bottom-color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Premium Dropdowns */
nav ul li ul.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 8px 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 240px;
    border: 1px solid rgba(196, 154, 0, 0.3);
    border-top: none;
    backdrop-filter: blur(10px);
}

nav ul li:hover ul.submenu {
    display: block;
    animation: slideDown 0.3s ease-out;
}

nav ul li ul.submenu li {
    margin: 0;
    width: 100%;
}

nav ul li ul.submenu li a {
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border-bottom: none;
}

nav ul li ul.submenu li a:hover {
    background-color: var(--accent);
    color: var(--primary-dark);
    padding-left: 25px;
    font-weight: 700;
}

nav ul li a .arrow {
    font-size: 8px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

nav ul li:hover > a .arrow {
    transform: rotate(180deg);
}

/* Hamburger Menu Toggle (Mobile) */
.hamburger {
    display: none;
    position: absolute;
    top: 25px;
    right: 25px;
    width: 32px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-sm);
    margin: 5px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer Section */
.site-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #300000 100%);
    color: var(--light);
    padding: 70px 40px 35px;
    font-size: 14px;
    border-top: 5px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(196, 154, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    position: relative;
    z-index: 1;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 25px;
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(196, 154, 0, 0.2);
    padding-bottom: 8px;
    display: inline-block;
}

.footer-col p {
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    color: var(--light);
    background: rgba(255, 255, 255, 0.08);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(196, 154, 0, 0.2);
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    position: relative;
    z-index: 1;
}

/* Institutional Separator Ornament */
.separador-gobierno {
    margin: 50px 0;
    text-align: center;
    position: relative;
}

.linea-rombos {
    position: relative;
    height: 30px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.linea-fondo {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, transparent, var(--primary), var(--accent), var(--primary), transparent);
    z-index: 0;
}

.grupo-rombos {
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 1;
    background-color: #fafbfc;
    padding: 0 15px;
    margin: 0 auto;
}

.figura-rombo {
    background-color: var(--primary);
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid var(--accent);
}

.figura-rombo.pequeño {
    width: 8px;
    height: 8px;
}

.figura-rombo.mediano {
    width: 12px;
    height: 12px;
}

.figura-rombo.grande {
    width: 16px;
    height: 16px;
    background-color: var(--accent);
}

.texto-separador {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 15px;
}

/* Premium Buttons */
button.primary,
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: 1px solid var(--accent);
    color: white;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-sm);
}

button.primary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

/* SEVAC Custom Styles (Premium Tables & Download Buttons) */
.category-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    color: var(--primary-dark);
    margin: 50px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    letter-spacing: 0.5px;
}

.sevac-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 50px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--light);
    border: 1px solid var(--border);
}

.sevac-table th {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--light);
    padding: 18px;
    text-align: left;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 3px solid var(--accent);
}

.sevac-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 14px;
    vertical-align: middle;
}

.sevac-table tr:last-child td {
    border-bottom: none;
}

.sevac-table tr:nth-child(even) {
    background-color: var(--gray);
}

.sevac-table tr:hover {
    background-color: rgba(196, 154, 0, 0.04);
}

.period-header {
    text-align: center !important;
}

.documents-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.download-btn {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-pdf {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fee2e2;
}

.btn-pdf:hover {
    background-color: #991b1b;
    color: white;
}

.btn-excel, .btn-xls, .btn-xlsx {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #dcfce7;
}

.btn-excel:hover, .btn-xls:hover, .btn-xlsx:hover {
    background-color: #166534;
    color: white;
}

.btn-word, .btn-doc, .btn-docx {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #dbeafe;
}

.btn-word:hover, .btn-doc:hover, .btn-docx:hover {
    background-color: #1e40af;
    color: white;
}

.btn-powerpoint, .btn-ppt, .btn-pptx {
    background-color: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

.btn-powerpoint:hover, .btn-ppt:hover, .btn-pptx:hover {
    background-color: #c2410c;
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile Responsiveness for Header/Nav */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 20px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .logo span {
        letter-spacing: 6px;
        font-size: 12px;
    }

    .hamburger {
        display: block;
    }

    nav {
        padding: 0;
        width: 100%;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--primary-dark);
        list-style: none;
        margin: 0;
        padding: 10px 0;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0;
        width: 100%;
    }

    nav ul li a {
        padding: 14px 24px;
        font-size: 13px;
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    nav ul li a.active,
    nav ul li a:hover {
        border-bottom-color: var(--accent);
        background: rgba(255, 255, 255, 0.05);
    }

    nav ul li ul.submenu {
        position: static;
        box-shadow: none;
        transform: none;
        background: rgba(0, 0, 0, 0.2);
        padding-left: 20px;
        border: none;
        display: none;
    }

    nav ul li:hover ul.submenu {
        display: none;
    }

    nav ul li.active > ul.submenu,
    nav ul li:focus-within > ul.submenu {
        display: block;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 35px;
    }
    
    .footer-col h3,
    .footer-col h4 {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .footer-social {
        justify-content: center;
    }
}
