/* ===========================
   CABECERA NAVIDEÑA POSADA
   =========================== */

.cabecera-posada {
    width: 100%;
    min-height: 80px;           
    background: #000000; /* El fondo negro base se queda aquí */
    
    /* FIJA AL HACER SCROLL */
    position: sticky;
    top: 0;
    z-index: 1000; 
    
    display: flex;
    flex-direction: column;     
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.cabecera-stack {
    position: relative;
    /* --- CAMBIO: BAJAMOS EL Z-INDEX DEL CONTENIDO --- */
    z-index: 10; 
    width: 100%;
    display: flex;
    flex-direction: column;
}

.cabecera-inner {
    width: 100%;
    max-width: 1400px;
    height: 80px; 
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    /* --- CAMBIO: QUITAMOS EL FONDO NEGRO AQUÍ PARA QUE SE VEA LA NIEVE DETRÁS O DELANTE --- */
    background: transparent; 
}

/* ====== Texto del centro ====== */
.cabecera-texto {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.6px;
    flex: 1;
    padding: 0 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ====== Contenedor de logos ====== */
.cabecera-logo {
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cabecera-logo img {
    height: 80%;            
    width: auto;
    object-fit: contain;
    max-width: 100%;
    filter: brightness(1.2);
}

/* ====== BARRA DEL CONTADOR ====== */
.contador-bar {
    width: 100%;
    background: rgba(15, 23, 42, 0.9); 
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    gap: 15px;
    font-family: 'Courier New', monospace; 
    white-space: nowrap; 
    flex-wrap: nowrap;   
}

.tiempo-bloque {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}

.tiempo-val {
    font-size: 28px;
    font-weight: 800;
    color: #38bdf8; 
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.tiempo-lbl {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.tiempo-sep {
    font-size: 20px;
    font-weight: bold;
    color: #475569;
    margin-top: -12px;
}

/* ====== CANVAS DE NIEVE (PANTALLA COMPLETA) ====== */
.nieve-canvas {
    position: fixed;        /* Fijo a la ventana, ignora el scroll */
    top: 0;
    left: 0;
    width: 100%;            /* Ancho total */
    height: 100%;           /* Alto total */
    pointer-events: none;   /* Los clics traspasan la nieve */
    
    /* Z-INDEX MUY ALTO: Para que caiga ENCIMA de todo (Login, Tablas, Botones) */
    z-index: 99999;         
    
    /* EFECTO DE DESVANECIMIENTO (FADE OUT) */
    /* La nieve se ve sólida en el 80% superior y se desvanece al llegar abajo */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 80%, rgba(0,0,0,0) 100%);
}

/* ===========================
   RESPONSIVE (MÓVIL)
   =========================== */

@media (max-width: 768px) {
    .cabecera-inner {
        height: 60px; 
        padding: 0 8px;
        display: grid;
        grid-template-columns: 1fr 2fr 1fr; 
        column-gap: 4px;
    }

    .cabecera-logo img {
        max-height: 40px;
    }

    .cabecera-texto {
        font-size: 11px;
        white-space: normal;
        line-height: 1.1;
    }

    .contador-bar {
        gap: 6px; 
        padding: 6px 0;
    }
    
    .tiempo-val { 
        font-size: 22px; 
    }
    
    .tiempo-lbl { 
        font-size: 8px; 
    }
    
    .tiempo-sep {
        font-size: 16px;
        margin-top: -10px;
    }
}