/* ==========================================================================
   Atoyac Modo Navidad v3.0 — Edición Especial Institucional
   Paleta: Guinda Profundo (#4a0c19 / #731627), Oro Champaña (#d4af37 / #f5df9c),
   Pino Imperial (#0b3d24 / #15633a) y Nieve Cristalina (#ffffff / #e0f2fe).
   ========================================================================== */

:root {
    --anav-guinda-dark: #4a0c19;
    --anav-guinda: #6e1425;
    --anav-pine-dark: #0a2e1d;
    --anav-pine: #134a30;
    --anav-gold-light: #f5df9c;
    --anav-gold: #d4af37;
    --anav-gold-muted: #b8934a;
    --anav-ice: #f0f9ff;
}

/* 1. Cintillo Editorial Superior (cursiva Great Vibes + cuenta regresiva) */
.anav-ribbon {
    position: relative;
    z-index: 9998;
    width: 100%;
    color: #ffffff;
    font-family: inherit;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(42, 8, 16, 0.25);
}

.anav-ribbon--editorial {
    background: linear-gradient(90deg, #3a0712 0%, #631122 30%, #78172a 50%, #631122 70%, #3a0712 100%);
}

.anav-ribbon--invernal {
    background: linear-gradient(90deg, #072316 0%, #103d27 30%, #165135 50%, #103d27 70%, #072316 100%);
}

.anav-ribbon::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 6l1.2 4.8L30 12l-4.8 1.2L24 18l-1.2-4.8L18 12l4.8-1.2L24 6zm0 24l.8 3.2L28 34l-3.2.8L24 38l-.8-3.2L20 34l3.2-.8L24 30z' fill='%23f5df9c'/%3E%3C/svg%3E");
    background-size: 48px 48px;
    pointer-events: none;
}

.anav-ribbon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.18) 0%, #f5df9c 30%, #fff7db 50%, #f5df9c 70%, rgba(212, 175, 55, 0.18) 100%);
    pointer-events: none;
}

.anav-ribbon__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 245, 210, 0.09) 50%, transparent 65%);
    background-size: 220% 100%;
    animation: anavShimmer 8s ease-in-out infinite;
    pointer-events: none;
}

.anav-ribbon.anav-hidden {
    display: none !important;
}

.anav-ribbon__inner {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 7px 44px 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    flex-wrap: wrap;
    text-align: center;
}

.anav-ribbon__line {
    display: inline-block;
    width: 38px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 223, 156, 0.78), transparent);
    flex-shrink: 0;
}

.anav-ornament {
    display: inline-flex;
    align-items: center;
    color: var(--anav-gold-light);
    flex-shrink: 0;
}

.anav-ornament--star {
    animation: anavSoftPulse 3.4s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(245, 223, 156, 0.6));
}

.anav-ribbon__text {
    font-family: 'Great Vibes', 'Brush Script MT', 'Segoe Script', Georgia, serif;
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
    color: #fffaf0;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), 0 0 14px rgba(245, 223, 156, 0.25);
}

.anav-countdown-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff7db;
    background: rgba(212, 175, 55, 0.18);
    border: 1px solid rgba(245, 223, 156, 0.48);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.anav-ribbon__close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 223, 156, 0.3);
    color: rgba(255, 255, 255, 0.85);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.anav-ribbon__close:hover {
    background: rgba(245, 223, 156, 0.24);
    border-color: rgba(245, 223, 156, 0.72);
    color: #ffffff;
}

/* 2. Arreglos Navideños de Pino, Nochebuenas Guinda y Esferas (anclados al borde del header sobre el Hero) */
body.atoyac-navidad-activo header.elementor-location-header {
    position: relative !important;
    overflow: visible !important;
    z-index: 50;
}

.anav-corner {
    position: absolute;
    top: 132px;
    width: 186px;
    height: auto;
    pointer-events: none;
    z-index: 65;
    filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.34));
    transition: opacity 0.3s ease;
}

.anav-corner.anav-corner--header {
    top: 100%;
    margin-top: -3px;
}

.anav-corner--left {
    left: 0;
}

.anav-corner--right {
    right: 0;
}

.anav-corner-svg {
    width: 100%;
    height: auto;
    display: block;
}

.anav-bauble-sway-1 {
    animation: anavSway 4.8s ease-in-out infinite;
}

.anav-bauble-sway-2 {
    animation: anavSway 5.8s ease-in-out 1.2s infinite reverse;
}

/* 3. Guirnalda de Pino y Luces Cálidas Realistas (anclada al borde inferior del header, brillando sobre el Hero) */
.anav-hero-garland {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -34px;
    height: 36px;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
}

.anav-hero-garland svg {
    width: 100%;
    height: 36px;
    display: block;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.anav-twinkle-0 { animation: anavLightGlow 2.8s ease-in-out infinite; }
.anav-twinkle-1 { animation: anavLightGlow 3.5s ease-in-out 0.8s infinite; }
.anav-twinkle-2 { animation: anavLightGlow 3.1s ease-in-out 1.6s infinite; }
.anav-twinkle-3 { animation: anavLightGlow 4.0s ease-in-out 2.1s infinite; }

/* 4. Detalle Navideño (Ramillete de Nochebuena) en el Logotipo del Ayuntamiento */
body.atoyac-navidad-logo-accent .elementor-element-88bd70a .elementor-widget-container {
    position: relative !important;
    display: inline-block;
}

body.atoyac-navidad-logo-accent .elementor-element-88bd70a .elementor-widget-container::after {
    content: "";
    position: absolute;
    top: -10px;
    right: -12px;
    width: 30px;
    height: 30px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 36 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16,18 C6,12 2,18 4,24 C10,24 14,22 16,18 Z' fill='%2315633a'/%3E%3Cpath d='M18,16 C22,6 28,4 32,9 C29,14 24,16 18,16 Z' fill='%2315633a'/%3E%3Cpath d='M18,18 C14,10 16,4 21,6 C22,11 20,15 18,18 Z' fill='%239e1b32'/%3E%3Cpath d='M18,18 C25,13 32,16 31,21 C26,22 21,21 18,18 Z' fill='%23731627'/%3E%3Cpath d='M18,18 C22,25 18,31 13,29 C13,24 15,20 18,18 Z' fill='%239e1b32'/%3E%3Cpath d='M18,18 C11,22 6,18 8,13 C13,13 16,15 18,18 Z' fill='%23731627'/%3E%3Ccircle cx='18' cy='18' r='2.8' fill='%23f5df9c'/%3E%3C/svg%3E");
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
    z-index: 15;
}

/* 5. Escarcha / Nieve Posada en Tarjetas de Atención Ciudadana y Brillo en Botones */
body.atoyac-navidad-accents header.elementor-location-header {
    position: relative;
    z-index: 50;
    box-shadow: 0 8px 28px rgba(90, 15, 31, 0.08);
}

body.atoyac-navidad-accents .aab-card,
body.atoyac-navidad-accents .aab-item,
body.atoyac-navidad-accents .atg-card {
    position: relative;
    border-top: 2px solid rgba(212, 175, 55, 0.45) !important;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease !important;
}

body.atoyac-navidad-accents .aab-card::before,
body.atoyac-navidad-accents .aab-item::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 14px;
    right: 14px;
    height: 8px;
    pointer-events: none;
    background-repeat: repeat-x;
    background-size: 90px 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='90' height='8' viewBox='0 0 90 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,4 C12,0 24,0 34,4 C44,7 56,1 68,3 C78,5 84,2 90,4 L90,8 L0,8 Z' fill='%23eef6ff' fill-opacity='0.92'/%3E%3C/svg%3E");
    filter: drop-shadow(0 1px 2px rgba(148, 163, 184, 0.35));
}

body.atoyac-navidad-accents .aab-card:hover,
body.atoyac-navidad-accents .aab-item:hover,
body.atoyac-navidad-accents .atg-card:hover {
    border-color: rgba(212, 175, 55, 0.78) !important;
    box-shadow: 0 12px 30px rgba(184, 147, 74, 0.18), 0 2px 10px rgba(115, 22, 39, 0.08) !important;
}

body.atoyac-navidad-accents .elementor-button,
body.atoyac-navidad-accents .ahs-btn {
    border: 1px solid rgba(245, 223, 156, 0.52) !important;
    box-shadow: 0 6px 20px rgba(115, 22, 39, 0.28), inset 0 1px 0 rgba(255, 248, 220, 0.32) !important;
}

body.atoyac-navidad-accents .elementor-button:hover,
body.atoyac-navidad-accents .ahs-btn:hover {
    border-color: rgba(245, 223, 156, 0.92) !important;
    box-shadow: 0 10px 26px rgba(115, 22, 39, 0.34), 0 0 0 2px rgba(212, 175, 55, 0.28) !important;
}

/* 6. Canvas de Nieve Cristalina + Polvo de Estrellas */
.anav-snow-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99990;
}

/* 7. Reproductor Flotante Minimalista de Música Navideña */
.anav-music-dock {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99992;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
}

.anav-music-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(60, 8, 19, 0.92) 0%, rgba(115, 22, 39, 0.92) 100%);
    color: #fffaf0;
    border: 1px solid rgba(245, 223, 156, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(42, 8, 16, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.anav-music-next {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(60, 8, 19, 0.92) 0%, rgba(115, 22, 39, 0.92) 100%);
    color: #f5df9c;
    border: 1px solid rgba(245, 223, 156, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(42, 8, 16, 0.28);
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.anav-music-next:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(245, 223, 156, 0.9);
}

.anav-music-dock.is-muted .anav-music-next {
    display: none;
}

body.atoyac-navidad-style-invernal .anav-music-pill,
body.atoyac-navidad-style-invernal .anav-music-next {
    background: linear-gradient(135deg, rgba(10, 46, 29, 0.92) 0%, rgba(21, 99, 58, 0.92) 100%);
}

.anav-music-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(42, 8, 16, 0.4), 0 0 14px rgba(212, 175, 55, 0.28);
}

.anav-music-pill.is-muted .anav-music-icon--on,
.anav-music-pill:not(.is-muted) .anav-music-icon--off {
    display: none;
}

.anav-music-pill.is-muted .anav-music-eq i {
    animation: none;
    height: 4px;
    opacity: 0.45;
}

.anav-music-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.anav-music-eq i {
    display: block;
    width: 2.5px;
    height: 10px;
    border-radius: 2px;
    background: var(--anav-gold-light);
    animation: anavEqBar 0.95s ease-in-out infinite;
}

.anav-music-eq i:nth-child(2) {
    animation-delay: 0.22s;
}

.anav-music-eq i:nth-child(3) {
    animation-delay: 0.44s;
}

/* 9. Silueta Invernal Panorámica sobre el Pie de Página */
.anav-footer-skyline {
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
    margin-bottom: -2px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 34, 24, 0.06) 100%);
}

.anav-footer-skyline svg {
    width: 100%;
    height: 76px;
    display: block;
}

/* 10. Postal Institucional Navideña de Bienvenida */
.anav-postcard-overlay[hidden] {
    display: none !important;
}

.anav-postcard-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 6, 10, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: anavFadeIn 0.35s ease;
}

.anav-postcard {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: radial-gradient(circle at top center, #78172a 0%, #4b0c19 65%, #32060f 100%);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 223, 156, 0.45);
    color: #ffffff;
    text-align: center;
    animation: anavPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.atoyac-navidad-style-invernal .anav-postcard {
    background: radial-gradient(circle at top center, #155c38 0%, #0b3420 65%, #061f13 100%);
}

.anav-postcard__border {
    border: 1px solid rgba(245, 223, 156, 0.48);
    border-radius: 12px;
    padding: 32px 28px 28px;
    position: relative;
    overflow: hidden;
}

.anav-postcard__border::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 8l1 4 4 1-4 1-1 4-1-4-4-1 4-1 1-4z' fill='%23f5df9c'/%3E%3C/svg%3E");
    pointer-events: none;
}

.anav-postcard__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(245, 223, 156, 0.38);
    background: rgba(0, 0, 0, 0.25);
    color: #fffaf0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.anav-postcard__close:hover {
    background: rgba(245, 223, 156, 0.25);
    transform: rotate(90deg);
}

.anav-postcard__star {
    color: #f5df9c;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 12px rgba(245, 223, 156, 0.65));
    animation: anavSoftPulse 3.2s ease-in-out infinite;
}

.anav-postcard__kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #f5df9c;
    margin: 0 0 10px 0;
}

.anav-postcard__title {
    font-family: 'Great Vibes', 'Brush Script MT', Georgia, serif !important;
    font-size: 38px !important;
    line-height: 1.18 !important;
    font-weight: 400 !important;
    color: #fffaf0 !important;
    margin: 0 0 14px 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.anav-postcard__divider {
    display: flex;
    justify-content: center;
    margin: 0 auto 16px;
}

.anav-postcard__divider span {
    width: 110px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, #f5df9c, transparent);
}

.anav-postcard__msg {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 250, 240, 0.92);
    margin: 0 0 22px 0;
}

.anav-postcard__btn {
    background: linear-gradient(135deg, #d4af37 0%, #f3d98b 50%, #c89b2d 100%);
    color: #360711;
    border: none;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.anav-postcard__btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

/* Animaciones GPU */
@keyframes anavSoftPulse {
    0%, 100% { opacity: 0.58; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.07); }
}

@keyframes anavLightGlow {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

@keyframes anavSway {
    0%, 100% { transform: rotate(-3.5deg); }
    50% { transform: rotate(3.5deg); }
}

@keyframes anavShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes anavEqBar {
    0%, 100% { height: 3px; }
    50% { height: 12px; }
}

@keyframes anavFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes anavPopIn {
    from { opacity: 0; transform: scale(0.92) translateY(14px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Responsividad Tablet y Móvil */
@media (max-width: 1024px) {
    .anav-corner {
        width: 132px;
    }
}

@media (max-width: 768px) {
    .anav-ribbon__text {
        font-size: 20px;
    }
    .anav-ribbon__inner {
        padding: 7px 36px 8px 14px;
        gap: 7px;
    }
    .anav-ribbon__line {
        display: none;
    }
    .anav-countdown-pill {
        font-size: 10px;
        padding: 2px 8px;
    }
    .anav-corner {
        width: 86px;
        opacity: 0.9;
    }
    .anav-hero-garland,
    .anav-hero-garland svg {
        height: 26px;
    }
    .anav-hero-garland {
        bottom: -24px;
    }
    .anav-music-dock {
        right: 12px;
        bottom: 12px;
    }
    .anav-music-pill {
        padding: 7px 12px;
        font-size: 11.5px;
    }
    .anav-footer-skyline svg {
        height: 48px;
    }
    .anav-postcard__title {
        font-size: 30px !important;
    }
}

/* Respeto a Preferencias de Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .anav-ornament--star,
    .anav-ribbon__shimmer,
    .anav-bauble-sway-1,
    .anav-bauble-sway-2,
    .anav-twinkle-0,
    .anav-twinkle-1,
    .anav-twinkle-2,
    .anav-twinkle-3,
    .anav-music-eq i {
        animation: none !important;
    }
    .anav-snow-canvas {
        display: none !important;
    }
}
