/* =========================================================
   Christmas Village landing page (christmas-village.php)
   ========================================================= */

.christmas-village {
    --xv-red: #c30000;
    --xv-red-dark: #9a0000;
    --xv-green: #008357;
    --xv-green-dark: #0d3b2c;
    --xv-gold: #e8c766;
    --xv-night: #0b1b33;
    --xv-cream: #faf7ea;
    --xv-beige: #f2efdc;
    --xv-candy: repeating-linear-gradient(-45deg, var(--xv-red) 0 12px, #fff 12px 24px);
    --xv-serif: Georgia, "Times New Roman", serif;
    background-color: var(--xv-cream);
}

/* ---------- Skip link ---------- */
.xv-skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: .75rem 1.25rem;
    background: var(--xv-green-dark);
    color: #fff !important;
    border-radius: 0 0 .5rem .5rem;
    font-weight: 700;
}
.xv-skip-link:focus {
    top: 0;
}

/* ---------- Shared focus ring ---------- */
.christmas-village .xv-tab:focus-visible,
.christmas-village .xv-carousel-btn:focus-visible,
.christmas-village .xv-video-play:focus-visible,
.christmas-village .tab-pane:focus-visible {
    outline: 3px solid var(--xv-gold);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--xv-green-dark);
}

/* ---------- Hero ---------- */
.xv-hero {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 6rem;
    background: linear-gradient(180deg, var(--xv-night) 0%, #14304d 55%, var(--xv-green-dark) 100%);
}

.xv-frame {
    position: relative;
    overflow: hidden;
    border: 3px solid var(--xv-gold);
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    background: var(--xv-green-dark);
}

.xv-billboard img {
    height: auto;
}

.xv-carousel-controls {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: .5rem;
    background: var(--xv-green-dark);
}

.xv-carousel-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--xv-gold);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    transition: background-color .2s;
}
.xv-carousel-btn:hover {
    background: rgba(232, 199, 102, .25);
}

.xv-main-image {
    aspect-ratio: 1264 / 848;
}
.xv-main-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Side by side: the billboard sets the row height and the photo fills it. */
@media (min-width: 768px) {
    .xv-main-image {
        aspect-ratio: auto;
        height: 100%;
        min-height: 320px;
    }
    .xv-main-image img {
        position: absolute;
        inset: 0;
    }
}

/* Snowfall: two tiled layers moved with transform only (GPU-composited, no repaint). */
.xv-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.xv-snow::before,
.xv-snow::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    will-change: transform;
    animation: xv-fall linear infinite;
}
.xv-snow::before {
    top: -200px;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 90px 120px, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 150px 60px, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 60px 170px, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 180px 160px, #fff 50%, transparent 51%);
    background-size: 200px 200px;
    opacity: .65;
    --xv-tile: 200px;
    animation-duration: 14s;
}
.xv-snow::after {
    top: -300px;
    background-image:
        radial-gradient(3px 3px at 40px 80px, #fff 50%, transparent 51%),
        radial-gradient(3.5px 3.5px at 210px 20px, #fff 50%, transparent 51%),
        radial-gradient(3px 3px at 130px 230px, #fff 50%, transparent 51%),
        radial-gradient(2.5px 2.5px at 270px 170px, #fff 50%, transparent 51%);
    background-size: 300px 300px;
    opacity: .8;
    --xv-tile: 300px;
    animation-duration: 22s;
}
@keyframes xv-fall {
    to {
        transform: translateY(var(--xv-tile));
    }
}

/* String lights along the top of the hero. */
.xv-lights,
.xv-lights::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    pointer-events: none;
    background-repeat: repeat-x;
    background-size: 120px 44px;
}
.xv-lights {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='44'%3E%3Cpath d='M0 6 Q30 22 60 6 T120 6' fill='none' stroke='%231c2a1c' stroke-width='2'/%3E%3Cg stroke='%231c2a1c' stroke-width='1'%3E%3Crect x='13' y='12' width='4' height='4'/%3E%3Crect x='43' y='12' width='4' height='4'/%3E%3Crect x='73' y='12' width='4' height='4'/%3E%3Crect x='103' y='12' width='4' height='4'/%3E%3C/g%3E%3Cellipse cx='15' cy='23' rx='4.5' ry='7' fill='%23ff3b3b'/%3E%3Cellipse cx='45' cy='23' rx='4.5' ry='7' fill='%23ffd34d'/%3E%3Cellipse cx='75' cy='23' rx='4.5' ry='7' fill='%233ddc84'/%3E%3Cellipse cx='105' cy='23' rx='4.5' ry='7' fill='%234db8ff'/%3E%3C/svg%3E");
}
.xv-lights::after {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='44'%3E%3Ccircle cx='15' cy='23' r='12' fill='%23ff3b3b' fill-opacity='.35'/%3E%3Ccircle cx='45' cy='23' r='12' fill='%23ffd34d' fill-opacity='.35'/%3E%3Ccircle cx='75' cy='23' r='12' fill='%233ddc84' fill-opacity='.35'/%3E%3Ccircle cx='105' cy='23' r='12' fill='%234db8ff' fill-opacity='.35'/%3E%3C/svg%3E");
    animation: xv-twinkle 2.4s ease-in-out infinite alternate;
}
@keyframes xv-twinkle {
    from { opacity: .2; }
    to { opacity: 1; }
}

/* ---------- Intro ---------- */
.xv-intro {
    position: relative;
    margin-top: -4rem;
}

.xv-intro-card,
.xv-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(13, 59, 44, .12);
}
.xv-intro-card::before,
.xv-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--xv-candy);
}

.xv-intro-card {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2.5rem 2.5rem;
    text-align: center;
}

.xv-eyebrow {
    margin-bottom: .5rem;
    color: var(--xv-green);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.xv-title {
    margin-bottom: 1.5rem;
    color: var(--xv-red);
    font-family: var(--xv-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.xv-intro-text {
    max-width: 70ch;
    margin: 0 auto;
    text-align: left;
    font-size: 1.125rem;
    line-height: 1.75;
}
.xv-intro-text p:first-child::first-letter {
    float: left;
    margin: .1em .12em 0 0;
    color: var(--xv-green);
    font-family: var(--xv-serif);
    font-size: 3.4em;
    line-height: .8;
}

/* ---------- Sections & cards ---------- */
.xv-section {
    padding: 3rem 0 0;
}
.xv-section--sponsors {
    padding-bottom: 4rem;
}

.xv-card {
    padding: 2.25rem 2rem 2rem;
}

.xv-heading {
    margin-bottom: 1.25rem;
    color: var(--xv-red);
    font-family: var(--xv-serif);
    font-size: 1.75rem;
    font-weight: 700;
}
.xv-heading i {
    color: var(--xv-green);
    font-size: .8em;
    margin-right: .35rem;
    vertical-align: .05em;
}

.xv-lead {
    margin-top: -.5rem;
    color: #555;
}

/* ---------- Tabs (schedule + sponsors) ---------- */
.xv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.xv-tabs .nav-item {
    flex: 1 1 140px;
    min-width: 0;
    padding: 0; /* theme pads .nav-item, which squeezes the pills on phones */
}

.xv-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: .5rem 1rem;
    border: 2px solid var(--xv-green);
    border-radius: 999px;
    background: #fff;
    color: var(--xv-green-dark);
    font-weight: 700;
    line-height: 1.2;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.xv-tab:hover {
    background: #e7f4ee;
}

/* Active tab: solid red "ornament" with gold star and a notch pointing at its panel. */
.xv-tab.active {
    border-color: var(--xv-red);
    background: var(--xv-red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(195, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .35);
    transform: translateY(-2px);
}
.xv-tab.active::before {
    content: "\2605";
    position: absolute;
    top: -.7rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--xv-gold);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.xv-tab.active::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--xv-red);
    border-bottom: 0;
}

.xv-tab-date,
.xv-tab-level {
    font-size: 1.05rem;
}
.xv-tab-amount {
    font-size: .875rem;
    font-weight: 600;
    opacity: .9;
}
.xv-tab-badge {
    margin-top: .2rem;
    padding: .05rem .5rem;
    border-radius: 999px;
    background: var(--xv-gold);
    color: #1f1a00;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.xv-tab-content {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-left: 6px solid var(--xv-green);
    border-radius: .75rem;
    background: var(--xv-beige);
}

.xv-panel-date {
    margin-bottom: .25rem;
    color: var(--xv-green);
    font-weight: 700;
}
.xv-panel-date i {
    margin-right: .35rem;
}
.xv-panel-title {
    margin-bottom: .75rem;
    color: var(--xv-red);
    font-family: var(--xv-serif);
    font-size: 1.5rem;
}
.xv-panel-text {
    font-size: 1.075rem;
    line-height: 1.7;
}

/* ---------- Video ---------- */
.xv-video {
    overflow: hidden;
    border: 3px solid var(--xv-gold);
    border-radius: .75rem;
    background: var(--xv-green-dark);
}
.xv-video-play {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.xv-video-play img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.xv-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--xv-red);
    color: #fff;
    font-size: 1.4rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
    transition: transform .2s, background-color .2s;
}
.xv-video-icon i {
    margin-left: 4px;
}
.xv-video-play:hover .xv-video-icon,
.xv-video-play:focus-visible .xv-video-icon {
    background: var(--xv-red-dark);
    transform: translate(-50%, -50%) scale(1.08);
}
.xv-visit {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}
.xv-visit li {
    display: flex;
    gap: .75rem;
    align-items: baseline;
    padding: .5rem 0;
    border-bottom: 1px dashed #e3dcbc;
}
.xv-visit li:last-child {
    border-bottom: 0;
}
.xv-visit i {
    width: 1.1rem;
    color: var(--xv-red);
    text-align: center;
}
.xv-visit a {
    color: var(--xv-green);
    font-weight: 700;
    text-decoration: underline;
}

.xv-video-consent {
    margin: 1rem 0 0;
    font-size: .95rem;
}

/* ---------- Sponsors ---------- */
.xv-sponsors {
    --xv-logo-h: 72px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.xv-sponsors--gala { --xv-logo-h: 56px; }
.xv-sponsors--mcintosh { --xv-logo-h: 72px; }
.xv-sponsors--honeycrisp { --xv-logo-h: 96px; }
.xv-sponsors--empire { --xv-logo-h: 120px; }

.xv-sponsor {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: calc(var(--xv-logo-h) + 2rem);
    padding: 1rem 1.25rem;
    border: 1px solid #e3dcbc;
    border-radius: .75rem;
    background: var(--xv-sponsor-bg, #fff); /* per-sponsor color set inline from data.php */
}
.xv-sponsor img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: var(--xv-logo-h);
    object-fit: contain;
}
.xv-sponsor-name {
    max-width: 220px;
    color: var(--xv-green-dark);
    font-family: var(--xv-serif);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

.xv-sponsor-cta {
    margin-top: 1.5rem;
    text-align: center;
}
.xv-sponsor-cta a {
    color: var(--xv-red);
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- Small screens ---------- */
@media (max-width: 575.98px) {
    .xv-hero {
        padding: 3.25rem 0 5rem;
    }
    .xv-intro-card {
        padding: 2.5rem 1.25rem 1.75rem;
    }
    .xv-card {
        padding: 2rem 1.25rem 1.5rem;
    }
    .xv-tabs .nav-item {
        flex-basis: calc(50% - .375rem);
    }
    .xv-tab {
        padding: .5rem .5rem;
    }
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .xv-snow,
    .xv-lights::after {
        animation: none;
    }
    .xv-snow::before,
    .xv-snow::after {
        animation: none;
    }
    .xv-tab,
    .xv-video-icon,
    .christmas-village .carousel-item {
        transition: none;
    }
}
