.festivo-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9998;
}

.festivo-item {
    position: fixed;
    top: -40px;
    font-size: 26px;
    animation: caerFestivo linear forwards;
    opacity: 0.95;
    will-change: transform, opacity;
}

@keyframes caerFestivo {
    0% {
        transform: translateY(-60px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* BANNER */
.festivo-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: min(430px, calc(100vw - 30px));
    animation: entradaFestivo .5s ease;
}

.festivo-banner.d-none,
.festivo-mascota.d-none {
    display: none !important;
}

.festivo-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.festivo-media {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #7b1f3a, #d4af37);
}

.festivo-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.festivo-icono {
    color: #fff;
    font-size: 32px;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.festivo-info {
    flex: 1;
    min-width: 0;
}

.festivo-info strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.festivo-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

.festivo-close {
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: #444;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.festivo-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* MASCOTA FLOTANTE */
.festivo-mascota {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9997;
    animation: flotanteEntrada .6s ease;
}

.festivo-mascota img {
    width: 140px;
    max-width: 30vw;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
    animation: flotarSuave 3s ease-in-out infinite;
}

@keyframes flotarSuave {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes entradaFestivo {
    from {
        transform: translateY(-12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes flotanteEntrada {
    from {
        transform: translateY(20px) scale(.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* TEMAS */
.tema-estudiante .festivo-media {
    background: linear-gradient(135deg, #004a99, #00a3e0);
}
.tema-estudiante strong {
    color: #004a99;
}

.tema-muertos .festivo-media {
    background: linear-gradient(135deg, #5e2b97, #f39c12);
}
.tema-muertos strong {
    color: #5e2b97;
}

.tema-navidad .festivo-media {
    background: linear-gradient(135deg, #146c43, #c0392b);
}
.tema-navidad strong {
    color: #146c43;
}

.tema-patrias .festivo-media {
    background: linear-gradient(135deg, #006847, #ce1126);
}
.tema-patrias strong {
    color: #006847;
}

@media (max-width: 576px) {
    .festivo-banner {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .festivo-banner-content {
        padding: 14px;
        gap: 12px;
    }

    .festivo-media {
        width: 58px;
        height: 58px;
    }

    .festivo-mascota img {
        width: 95px;
    }
}