/* ============================================
   SITE HEADER — Estética FUN
   I.E.P.E. Apóstol Pablo
   Variables globales en: css/app.css
   ============================================ */

/* ============================================
   BARRA DECORATIVA SUPERIOR (accent dorado)
   ============================================ */
.header-accent {
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-secondary) 0%,
        #FFD700 25%,
        var(--color-secondary-light) 50%,
        #FFD700 75%,
        var(--color-secondary) 100%);
    background-size: 200% 100%;
    animation: accentShimmer 6s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1101;
}

@keyframes accentShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   HEADER PRINCIPAL
   ============================================ */
.site-header {
    position: fixed;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 1100;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light, #337AB8) 100%);
    padding: 0.55rem 0;
    box-shadow:
        0 4px 24px rgba(0, 40, 77, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
}

/* ============================================
   LOGO — Con glow y hover playful
   ============================================ */
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-logo:hover {
    transform: scale(1.04);
}

.logo-glow {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 159, 28, 0.25) 0%, transparent 70%);
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-logo:hover .logo-glow {
    opacity: 1;
}

.logo-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.header-logo:hover .logo-icon-img {
    transform: rotate(-5deg) scale(1.08);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    display: block;
    line-height: 1.15;
    letter-spacing: 0.3px;
    color: white;
}

.logo-tagline {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-secondary-light);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* ============================================
   NAVEGACIÓN — Pills suaves con hover cálido
   ============================================ */
.header-nav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    position: relative;
    letter-spacing: 0.2px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--color-secondary);
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 60%;
}

/* ============================================
   BOTONES DE ACCIÓN
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Botón Admisión — Pill naranja con brillo */
.btn-admision-header {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.3px;
    box-shadow:
        0 3px 12px rgba(255, 159, 28, 0.35),
        0 0 0 0 rgba(255, 159, 28, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-admision-emoji {
    font-size: 1rem;
    line-height: 1;
}

.btn-admision-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: none;
}

.btn-admision-header:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 6px 20px rgba(255, 159, 28, 0.45),
        0 0 0 3px rgba(255, 159, 28, 0.15);
}

.btn-admision-header:hover::before {
    animation: btnShimmer 0.6s ease forwards;
}

@keyframes btnShimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* Botón Ingresar/Plataforma — Pill blanco suave */
.btn-platform-white {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary-dark);
    padding: 0.5rem 1.15rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-platform-white svg {
    transition: transform 0.3s ease;
}

.btn-platform-white:hover {
    background: white;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: var(--color-primary);
}

.btn-platform-white:hover svg {
    transform: translateX(2px);
}

/* ============================================
   HAMBURGUESA ANIMADA
   ============================================ */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1101;
}

.mobile-toggle span {
    width: 24px;
    height: 2.5px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
    transform-origin: center;
}

/* Animación X cuando está abierto */
.mobile-toggle span.open:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: var(--color-secondary);
}

.mobile-toggle span.open:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle span.open:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: var(--color-secondary);
}

/* ============================================
   MENÚ MÓVIL — Fullscreen con blur
   ============================================ */
.mobile-nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 28, 51, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 480px;
    margin: 0 auto;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.mobile-nav a:hover,
.mobile-nav a:active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(4px);
}

.mobile-nav-emoji {
    font-size: 1.15rem;
    width: 28px;
    text-align: center;
}

.mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 0.5rem 1rem;
}

/* Botón Admisión móvil */
.mobile-btn-admision {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.3);
    transition: all 0.3s ease;
    margin-top: 0.25rem;
}

.mobile-btn-admision:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 28, 0.4);
}

/* Botón Ingresar/Plataforma móvil */
.mobile-btn {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.mobile-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   RESPONSIVE — TABLET (1200px)
   ============================================ */
@media (max-width: 1200px) {
    .header-nav {
        gap: 0.2rem;
    }

    .nav-item {
        font-size: 0.78rem;
        padding: 0.4rem 0.7rem;
    }

    .btn-admision-header {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }

    .btn-platform-white {
        padding: 0.45rem 1rem;
        font-size: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE — MOBILE (768px)
   ============================================ */
@media (max-width: 768px) {
    .header-accent {
        height: 3px;
    }

    .site-header {
        top: 3px;
        padding: 0.45rem 0;
    }

    .header-inner {
        padding: 0 1.25rem;
        gap: 0.75rem;
    }

    /* Ocultar nav y actions desktop */
    .header-nav,
    .header-actions {
        display: none !important;
    }

    /* Mostrar hamburguesa */
    .mobile-toggle {
        display: flex !important;
        margin-left: auto;
    }

    /* Activar menú móvil */
    .mobile-nav {
        display: block;
        top: 55px;
    }

    .logo-icon-img {
        width: 38px;
        height: 38px;
    }

    .logo-name {
        font-size: 1.05rem;
    }

    .logo-tagline {
        font-size: 0.58rem;
        letter-spacing: 1px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE SMALL (480px)
   ============================================ */
@media (max-width: 480px) {
    .site-header {
        padding: 0.35rem 0;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .logo-icon-img {
        width: 34px;
        height: 34px;
    }

    .logo-name {
        font-size: 0.95rem;
    }

    .logo-tagline {
        font-size: 0.55rem;
    }

    .mobile-toggle {
        padding: 6px;
    }

    .mobile-toggle span {
        width: 22px;
        height: 2px;
    }

    .mobile-nav {
        top: 50px;
    }

    .mobile-nav-inner {
        padding: 1rem;
    }

    .mobile-nav a {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .mobile-btn-admision,
    .mobile-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}
