/* ============================================================
   Temporada navideña del inicio de sesion (vistas/login.php).
   Solo se carga cuando $navidadLogin es verdadero; no cambia la
   distribucion, solo agrega adornos sobre .lg--navidad.
   ============================================================ */

.lg--navidad {
    --lg-rojo: #b3202b;
    --lg-rojo-2: #e0474f;
    background:
        radial-gradient(900px 600px at 0% 0%, rgba(15, 110, 71, .16), transparent 60%),
        radial-gradient(700px 520px at 100% 100%, rgba(179, 32, 43, .10), transparent 60%),
        radial-gradient(600px 500px at 100% 0%, rgba(201, 164, 90, .14), transparent 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='%230f6e47' stroke-opacity='.05' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M30 18v24M19.6 24l20.8 12M19.6 36l20.8-12M30 22l-3-3M30 22l3-3M30 38l-3 3M30 38l3 3'/%3E%3Cpath d='M130 116v20M121.3 121l17.4 10M121.3 131l17.4-10'/%3E%3C/g%3E%3C/svg%3E"),
        var(--lg-bg);
}

/* ---------- Guirnalda de luces en el borde superior ---------- */
.lg--navidad .lg-shell { position: relative; }

.lg-luces {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    margin: 0;
    padding: 0 18px;
    list-style: none;
    pointer-events: none;
}

.lg-luces li {
    position: relative;
    flex: 1;
    height: 26px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 26' preserveAspectRatio='none'%3E%3Cpath d='M0 3Q50 30 100 3' fill='none' stroke='%23a08c5a' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Foco: casquillo + bombillo */
.lg-luces li::before,
.lg-luces li::after {
    content: '';
    position: absolute;
    left: 50%;
}
.lg-luces li::before {
    top: 14px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 1.5px;
    background: #3b4a41;
}
.lg-luces li::after {
    top: 18px;
    width: 9px;
    height: 13px;
    margin-left: -4.5px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background: var(--foco);
    box-shadow: 0 0 10px 2px var(--foco), 0 0 2px #fff inset;
    animation: lg-foco 2.6s ease-in-out infinite;
    animation-delay: var(--retraso, 0s);
}
.lg-luces li:nth-child(4n+1) { --foco: #ff4b4b; }
.lg-luces li:nth-child(4n+2) { --foco: #ffd45e; --retraso: -.6s; }
.lg-luces li:nth-child(4n+3) { --foco: #46d38a; --retraso: -1.3s; }
.lg-luces li:nth-child(4n+4) { --foco: #fff3d6; --retraso: -1.9s; }

@keyframes lg-foco {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; box-shadow: 0 0 4px 0 var(--foco), 0 0 2px #fff inset; }
}

/* ---------- Nieve cayendo en el panel de la marca ---------- */
.lg-nieve {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.lg-nieve span {
    position: absolute;
    top: -12px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #fff;
    opacity: var(--o, .8);
    filter: blur(.4px);
    animation: lg-nieve var(--t) linear infinite;
    animation-delay: var(--d);
}
@keyframes lg-nieve {
    to { transform: translate3d(var(--v, 20px), 860px, 0); }
}

/* Montones de nieve al pie del panel */
.lg--navidad .lg-brand::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 70' preserveAspectRatio='none'%3E%3Cpath d='M0 40Q60 14 130 34T260 30T400 26V70H0Z' fill='%23ffffff' fill-opacity='.10'/%3E%3Cpath d='M0 54Q80 32 170 50T330 44T400 46V70H0Z' fill='%23ffffff' fill-opacity='.16'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

/* Patron de copos (en lugar de los rombos) */
.lg--navidad .lg-brand::before {
    opacity: .09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M32 22v20M23.3 27l17.4 10M23.3 37l17.4-10M32 25.5l-2.5-2.5M32 25.5l2.5-2.5M32 38.5l-2.5 2.5M32 38.5l2.5 2.5'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Acebo en el logo ---------- */
.lg--navidad .lg-logo { position: relative; }
.lg--navidad .lg-logo::after {
    content: '';
    position: absolute;
    right: -14px;
    bottom: -9px;
    width: 36px;
    height: 25px;
    background: url(../img/navidad/acebo.svg) center / contain no-repeat;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}
.lg--navidad .lg-brand__corto { margin-left: 8px; }

/* ---------- Estrella en el divisor ---------- */
.lg--navidad .lg-divisor i {
    width: 16px;
    height: 16px;
    transform: none;
    background: var(--lg-oro-2);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 6px rgba(255, 220, 140, .9));
    animation: lg-estrella 3s ease-in-out infinite;
}
@keyframes lg-estrella {
    50% { transform: scale(1.18) rotate(8deg); }
}

/* ---------- Rama de pino en la esquina del formulario ---------- */
.lg--navidad .lg-panel { position: relative; }
.lg--navidad .lg-panel::before {
    content: '';
    position: absolute;
    top: 30px;
    right: -4px;
    width: 168px;
    height: 110px;
    background: url(../img/navidad/rama.svg) right top / contain no-repeat;
    filter: drop-shadow(0 6px 8px rgba(16, 40, 28, .22));
    pointer-events: none;
    transform-origin: 100% 0;
    animation: lg-rama 6s ease-in-out infinite alternate;
}
@keyframes lg-rama {
    to { transform: rotate(-2deg); }
}

/* ---------- Detalles en rojo navideño ---------- */
.lg--navidad .lg-saludo {
    background: linear-gradient(90deg, rgba(179, 32, 43, .10), rgba(15, 110, 71, .10));
}
.lg--navidad .lg-saludo i { color: var(--lg-rojo); }
.lg--navidad .lg-sep i { color: var(--lg-rojo); }
.lg--navidad .lg-control input:focus { box-shadow: 0 0 0 4px rgba(15, 110, 71, .14), 0 0 0 5px rgba(179, 32, 43, .08); }
.lg--navidad .lg-acceso--memorial:hover { border-color: rgba(179, 32, 43, .45); }

/* Nieve sobre el boton de ingresar */
.lg--navidad .lg-entrar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 9' preserveAspectRatio='none'%3E%3Cpath d='M0 0H60V3Q55 8 50 4T40 5T30 3T20 6T10 4T0 4Z' fill='%23ffffff' fill-opacity='.9'/%3E%3C/svg%3E") top / 70px 100% repeat-x;
    pointer-events: none;
}

/* Nieve sobre los iconos de accesos */
.lg--navidad .lg-acceso__icono { position: relative; overflow: hidden; }
.lg--navidad .lg-acceso__icono::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 8' preserveAspectRatio='none'%3E%3Cpath d='M0 0H42V3Q38 7 33 4T22 5T12 3T5 6T0 4Z' fill='%23ffffff' fill-opacity='.92'/%3E%3C/svg%3E") top / 100% 100% no-repeat;
}

/* ---------- Tema oscuro ---------- */
html[data-theme="dark"] .lg--navidad {
    background:
        radial-gradient(900px 600px at 0% 0%, rgba(31, 154, 102, .12), transparent 60%),
        radial-gradient(700px 520px at 100% 100%, rgba(224, 71, 79, .10), transparent 60%),
        var(--lg-bg);
}
html[data-theme="dark"] .lg-luces li {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 26' preserveAspectRatio='none'%3E%3Cpath d='M0 3Q50 30 100 3' fill='none' stroke='%23596a60' stroke-width='1.6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .lg--navidad .lg-saludo i,
html[data-theme="dark"] .lg--navidad .lg-sep i { color: var(--lg-rojo-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .lg--navidad .lg-brand { padding-top: 40px; }
    .lg--navidad .lg-panel::before { top: 24px; width: 130px; height: 85px; }
    .lg-luces li:nth-child(n+15) { display: none; }
}
@media (max-width: 480px) {
    .lg-luces li:nth-child(n+11) { display: none; }
    .lg-luces { padding-right: 60px; } /* deja libre el boton de tema */
    .lg--navidad .lg-panel::before { width: 110px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-nieve { display: none; }
    .lg-luces li::after, .lg--navidad .lg-divisor i, .lg--navidad .lg-panel::before { animation: none; }
}

/* ---------- Saludo de temporada ---------- */
.lg .lg-feliz {
    margin: 0 0 14px;
    font-family: 'Great Vibes', var(--lg-serif);
    font-size: clamp(58px, 6.4vw, 84px);
    line-height: 1;
    color: #f3d98f !important;
    text-shadow: 0 0 22px rgba(255, 214, 130, .55), 0 3px 12px rgba(0, 0, 0, .45);
    animation: lg-feliz 4s ease-in-out infinite;
}
@keyframes lg-feliz {
    50% { text-shadow: 0 0 34px rgba(255, 214, 130, .85), 0 3px 12px rgba(0, 0, 0, .35); }
}
@media (max-width: 900px) {
    .lg .lg-feliz { font-size: clamp(48px, 11vw, 64px); margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .lg .lg-feliz { animation: none; }
}
