/* ==========================================
   CABECERA GLOSSY VANGUARDISTA 2026
   Lógica: Mobile-First (Base Smartphone -> Desktop)
   ========================================== */

/* 1. ESTILOS BASE (SMARTPHONE) 
   ========================================== */

.cabecera-identidad {
    grid-area: cabecera;
    
    /* FIX DE ANCHO COMPLETO Y MÁRGENES */
    width: 100%;
    margin: 0;
    box-sizing: border-box; /* Vital para que el padding no rompa el ancho */
    
    /* Base Mobile: Altura compacta */
    height: 50px; 
    
    /* FLEXBOX: Centra el bloque de texto en el medio de la barra */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    
    background: var(--glass-bg, rgba(20, 22, 30, 0.65));
    backdrop-filter: blur(var(--blur-power, 28px));
    border-bottom: 1px solid rgba(var(--color-marca-rgb), 0.25);
    
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    
    position: sticky;
    top: 0;
    left: 0; /* Asegura anclaje izquierdo */
    z-index: var(--z-header, 1000);
    overflow: hidden;
    contain: layout style paint;
    transition: height 0.4s ease;
}

/* Efecto de luz deslizante (Shine) */
.cabecera-identidad::after {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 60%;
    height: 400%;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 70%
    );
    transform: skewX(-20deg);
    animation: shineHeader 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* NUEVO: CONTENEDOR DE TEXTO (Para asegurar centrado interno) */
.texto-cabecera {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los hijos horizontalmente */
    justify-content: center;
    text-align: center;  /* Asegura que el texto se centre si hay saltos de línea */
    z-index: 2; /* Por encima del brillo */
}

/* Título de Cabecera (MONTSERRAT BLACK) */
.texto-cabecera h1 {
    font-family: 'Montserrat Black', sans-serif;
    font-weight: 600;
    
    /* Tamaño base móvil */
    font-size: 1rem; 
    line-height: 1;
    
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--color-marca, #ff6b00);
    
    margin: 0;
    
    /* CAMBIO: Permite mayúsculas y minúsculas tal cual el HTML */
    text-transform: none; 
    
    letter-spacing: 1px; 
    filter: drop-shadow(0 0 10px rgba(var(--color-marca-rgb), 0.5));
    transition: all 0.4s ease;
}

/* Subtítulo de Cabecera */
.texto-cabecera p {
    font-family: 'Montserrat SemiBold', sans-serif;
    font-weight: 600;
    font-size: 0.75rem; 
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.85);
    margin: 2px 0 0 0;
    letter-spacing: 0.5px;
    text-transform: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Botón de Menú Integrado */
.header-menu-btn {
    position: absolute;
    left: 10px; 
    font-size: 1.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

/* ==========================================
   2. TABLET (min-width: 768px)
   ========================================== */
@media (min-width: 768px) {
    .cabecera-identidad {
        height: 55px;
        padding: 0 24px;
    }

    .texto-cabecera h1 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .header-menu-btn {
        left: 20px;
        font-size: 1.5rem;
    }
}

/* ==========================================
   3. DESKTOP (min-width: 992px)
   ========================================== */
@media (min-width: 992px) {
    .cabecera-identidad {
        height: 60px;
    }

    .texto-cabecera h1 {
        font-size: 2rem;
        letter-spacing: 5px; 
    }

    .texto-cabecera p {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .header-menu-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-marca);
        box-shadow: 0 0 15px rgba(var(--color-marca-rgb), 0.3);
    }
}