@font-face {
    font-family: "Montserrat";
    src: url("/assets/font/Montserrat.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   VARIABLES INSTITUCIONALES (WHITE-LABEL CORE)
   ========================================= */
:root {
    --brand-primary: #3e39ba;
    --brand-secondary: #ffc61a;
    --sidebar-bg: #39395f;
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-light: rgba(0, 0, 0, 0.1);
}

/* =========================================
   RESETEO BASE Y TIPOGRAFÍA
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: "Montserrat", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   CONTENEDORES ESTRUCTURALES
   ========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   HEADER & NAVEGACIÓN (MOBILE FIRST)
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
}

.brand .logo {
    display: block;
    object-fit: contain;
}

/* Color primario aplicado al nombre de la marca */
.brand-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brand-primary);
    letter-spacing: 0.02em;
}

/* Ocultar elementos de escritorio en móvil */
.nav-desktop,
.cta-desktop {
    display: none;
}

.mobile-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 1.5rem 2rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile a {
    padding: 0.875rem 0;
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: color 0.2s ease;
}

.nav-mobile a:hover {
    color: var(--brand-primary);
}

.nav-mobile a:last-child {
    border-bottom: none;
}

.mobile-nav-divider {
    height: 16px;
}

.btn-mobile-login {
    width: 100%;
    margin-top: 0.5rem;
}

/* =========================================
   MEDIA QUERIES - NAVEGACIÓN (DESKTOP)
   ========================================= */
@media (min-width: 901px) {
    .mobile-toggle,
    .nav-mobile {
        display: none !important;
    }

    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .nav-desktop a {
        color: var(--text-main);
        font-size: 0.9rem;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .nav-desktop a:hover {
        color: var(--brand-primary);
    }

    .nav-link-muted {
        color: var(--text-muted) !important;
    }

    .cta-desktop {
        display: block;
    }
}

/* =========================================
   BOTONES (SOLEMN STYLE)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--bg-surface);
}

.btn-primary:hover {
    background-color: #322d99;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--brand-primary);
    border: 1px solid var(--border-light);
}

.btn-outline-primary:hover {
    border-color: var(--brand-primary);
    background-color: var(--bg-surface);
    color: var(--brand-primary);
    box-shadow: 0 2px 4px rgba(62, 57, 186, 0.08);
}

/* =========================================
   FOOTER (SOLEMN CLEAN UI)
   ========================================= */
.site-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Marca de Footer */
.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brand-primary);
    letter-spacing: 0.02em;
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

/* Enlaces y Navegación */
.footer-heading {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--brand-primary);
}

/* Redes Sociales */
.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    background-color: var(--bg-surface);
    transition: all 0.2s ease;
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    box-shadow: 0 2px 4px rgba(62, 57, 186, 0.08);
    transform: translateY(-2px);
}

/* Copyright (Bottom) */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-version {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* =========================================
   MEDIA QUERIES - FOOTER (DESKTOP)
   ========================================= */
@media (min-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr; /* 4 columnas perfectamente alineadas */
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =========================================
   COOKIE BANNER (FLOATING & DISCRETO)
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 1.25rem;
}

.cookie-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-text a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

@media (min-width: 600px) {
    .cookie-banner {
        bottom: 2rem;
        left: 2rem;
        right: auto;
        max-width: 380px;
    }

    .cookie-actions {
        justify-content: flex-end;
    }

    .cookie-btn {
        width: auto;
    }
}