/* ==========================================================================
   HEADER & NAVEGACIÓN - ARQUITECTURA FUNDALUZ XXI
   ========================================================================== */

/* Cinta decorativa superior */
.cfl-top-ribbon {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #071540 0%, #0b1f66 25%, #1d4ed8 50%, #0284c7 75%, #071540 100%);
    position: relative;
    z-index: 1000;
}

/* Navbar Principal */
.cfl-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(11, 31, 102, 0.08);
    box-shadow: 0 4px 20px rgba(11, 31, 102, 0.05);
    z-index: 9999;
    transition: all 0.3s ease;
}

.cfl-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(11, 31, 102, 0.1);
}

.cfl-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1.5rem;
}

/* Logo Brand */
.cfl-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.cfl-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.cfl-brand:hover img {
    transform: scale(1.04);
}

.cfl-brand-text {
    display: flex;
    flex-direction: column;
}

.cfl-brand-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--cfl-navy-mid);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.cfl-brand-title span {
    color: var(--cfl-cyan);
}

.cfl-brand-subtitle {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--cfl-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Menú de Navegación */
.cfl-nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cfl-nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.cfl-nav-item a {
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--cfl-text-body);
    text-decoration: none;
    padding: 0.4rem 0.2rem;
    position: relative;
    transition: color 0.25s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfl-nav-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--cfl-navy-mid), var(--cfl-cyan));
    border-radius: 2px;
    transition: width 0.25s ease;
}

.cfl-nav-item a:hover,
.cfl-nav-item.active a {
    color: var(--cfl-navy-mid);
}

.cfl-nav-item a:hover::after,
.cfl-nav-item.active a::after {
    width: 100%;
}

/* Redes Sociales */
.cfl-nav-social {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 0.8rem;
    border-left: 1px solid rgba(11, 31, 102, 0.1);
}

.cfl-social-link {
    color: var(--cfl-blue-primary);
    font-size: 1.15rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
}

.cfl-social-link:hover {
    color: var(--cfl-cyan);
    transform: translateY(-2px);
}

/* Botones & Badges a la derecha */
.cfl-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.btn-campus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(2, 132, 199, 0.15));
    border: 1.5px solid rgba(29, 78, 216, 0.35);
    color: var(--cfl-blue-bright) !important;
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-campus:hover {
    background: linear-gradient(135deg, var(--cfl-navy-mid), var(--cfl-blue-bright));
    color: var(--cfl-white) !important;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.25);
}

.cfl-schedule-badge {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    border-left: 1px solid rgba(30, 64, 175, 0.15);
    padding-left: 0.9rem;
}

.cfl-nav-search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(30, 64, 175, 0.12) 100%);
    border: 1.5px solid rgba(2, 132, 199, 0.35);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.cfl-nav-search-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #1e40af 100%);
    border-color: #38bdf8;
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.cfl-schedule-badge .days {
    font-size: 0.58rem;
    color: var(--cfl-blue-primary);
    opacity: 0.7;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.cfl-schedule-badge .hours {
    font-size: 0.76rem;
    color: var(--cfl-navy-mid);
    font-weight: 800;
    white-space: nowrap;
}

/* Banderita Argentina Flameante Segmentada 3D */
.nav-arg-flag {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(30, 64, 175, 0.15);
    padding-left: 0.9rem;
    height: 24px;
}

.flag-wave-container {
    display: flex;
    width: 32px;
    height: 21px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
}

.flag-wave-strip {
    height: 100%;
    flex: 1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 18"><rect width="30" height="6" fill="%2374ACDF"/><rect y="6" width="30" height="6" fill="%23FFFFFF"/><rect y="12" width="30" height="6" fill="%2374ACDF"/><circle cx="15" cy="9" r="1.5" fill="%23F9B000"/><circle cx="15" cy="9" r="2.3" stroke="%23F9B000" stroke-width="0.4" stroke-dasharray="0.5 0.5" fill="none"/><circle cx="15" cy="9" r="1.5" stroke="%23E59400" stroke-width="0.3" fill="none"/><circle cx="15" cy="9" r="0.6" fill="%23E59400"/></svg>');
    background-size: 32px 21px;
    background-repeat: no-repeat;
    background-position: calc(var(--i) * -2.66px) 0;
    animation: stripWave 1.3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.08s);
    will-change: transform, filter;
    margin-right: -0.6px;
}

@keyframes stripWave {
    0% {
        transform: translateY(-2.2px) scaleY(1.06);
        filter: brightness(1.06) contrast(1.02);
    }
    50% {
        transform: translateY(2.2px) scaleY(0.94);
        filter: brightness(0.84) contrast(0.98);
    }
    100% {
        transform: translateY(-2.2px) scaleY(1.06);
        filter: brightness(1.06) contrast(1.02);
    }
}

/* Overlay oscuro suave al abrir drawer */
.cfl-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 21, 64, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cfl-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Botón Hamburguesa Móvil Moderno */
.cfl-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.08);
    border: 1.5px solid rgba(2, 132, 199, 0.25);
    cursor: pointer;
    gap: 4px;
    z-index: 10001;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.06);
}

.cfl-mobile-toggle:hover {
    background: rgba(2, 132, 199, 0.15);
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.18);
}

.cfl-mobile-toggle span {
    display: block;
    height: 2.2px;
    background: #071540;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cfl-mobile-toggle span:nth-child(1) {
    width: 20px;
}

.cfl-mobile-toggle span:nth-child(2) {
    width: 14px;
    background: #0284c7;
    margin-right: 6px;
    align-self: flex-end;
}

.cfl-mobile-toggle span:nth-child(3) {
    width: 20px;
}

.cfl-mobile-toggle.active {
    background: rgba(2, 132, 199, 0.18);
    border-color: #0284c7;
}

.cfl-mobile-toggle.active span:nth-child(1) {
    transform: translateY(6.2px) rotate(45deg);
    width: 20px;
    background: #0284c7;
}

.cfl-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-6px);
}

.cfl-mobile-toggle.active span:nth-child(3) {
    transform: translateY(-6.2px) rotate(-45deg);
    width: 20px;
    background: #0284c7;
}

/* Mobile Drawer Lateral Derecho Angosto y Elegante */
.cfl-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 75%;
    max-width: 268px;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 2px solid rgba(56, 189, 248, 0.75);
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow:
        -10px 0 32px rgba(7, 21, 64, 0.18),
        -2px 0 14px rgba(56, 189, 248, 0.45),
        inset 2px 0 10px rgba(56, 189, 248, 0.12);
    z-index: 10000;
    padding: 1.25rem 1.2rem 1.4rem;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cfl-mobile-drawer.active {
    right: 0;
    opacity: 1;
    pointer-events: auto;
}

/* Header del Drawer con Logo CFL */
.cfl-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(7, 21, 64, 0.08);
}

.cfl-drawer-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 4px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid rgba(56, 189, 248, 0.65);
    box-shadow:
        0 0 0 3px rgba(56, 189, 248, 0.10),
        0 0 14px rgba(56, 189, 248, 0.45);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.cfl-drawer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.cfl-drawer-brand:hover {
    transform: scale(1.03);
    box-shadow:
        0 0 0 3px rgba(56, 189, 248, 0.16),
        0 0 20px rgba(56, 189, 248, 0.6);
}

/* Botón Cerrar (X) */
.cfl-drawer-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(29, 78, 216, 0.10) 100%);
    border: 1.5px solid rgba(2, 132, 199, 0.28);
    color: #0b1f66;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.10);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cfl-drawer-close:hover,
.cfl-drawer-close:active {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
    border-color: #38bdf8;
    color: #ffffff;
    transform: rotate(90deg);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

/* Enlaces del Menú Móvil */
.cfl-mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cfl-mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 800;
    color: #071540;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cfl-mobile-nav-links a:hover,
.cfl-mobile-nav-links li.active a {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    padding-left: 1rem;
}

.cfl-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.3rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(7, 21, 64, 0.08);
}

/* Sello Fundaluz XXI con halo neón azul */
.cfl-drawer-fundaluz-box {
    display: flex;
    justify-content: center;
    margin-top: 0.6rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(7, 21, 64, 0.12);
}

.cfl-drawer-fundaluz-link {
    position: relative;
    display: inline-flex;
    border-radius: 10px;
    padding: 3px;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.35) 0%, rgba(29, 78, 216, 0.12) 60%, transparent 100%);
    box-shadow:
        0 0 12px rgba(29, 78, 216, 0.55),
        0 0 26px rgba(56, 189, 248, 0.35);
    animation: cflFundaluzGlow 3.2s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.cfl-drawer-fundaluz-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 7px;
}

.cfl-drawer-fundaluz-link:hover {
    transform: scale(1.05);
}

@keyframes cflFundaluzGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(29, 78, 216, 0.45), 0 0 22px rgba(56, 189, 248, 0.28);
    }
    50% {
        box-shadow: 0 0 16px rgba(29, 78, 216, 0.7), 0 0 34px rgba(56, 189, 248, 0.5);
    }
}

/* Responsive Rules */
@media (max-width: 1100px) {
    .cfl-nav-links {
        gap: 1rem;
    }
    .cfl-nav-item a {
        font-size: 0.86rem;
    }
}

@media (max-width: 991px) {
    .cfl-nav-menu {
        display: none;
    }
    .cfl-mobile-toggle {
        display: flex;
    }
    .cfl-mobile-overlay {
        display: block;
    }
    .cfl-mobile-drawer {
        display: flex;
    }
    .cfl-schedule-badge,
    .nav-arg-flag {
        display: none;
    }
}
