/* ===========================================================================
   Lodge template (template-lodge.php)
   Root font-size is 9px -> 1rem = 9px. Canonical breakpoints: 1199/992/768.
   The hero CTA reuses the .bookNowButton class from the unified button system.
   =========================================================================== */

.page-template-template-lodge #pageHeader { display: none; }

.lodge-page { background: #fff; }

.lodge-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* --- Hero slider ---------------------------------------------------------- */
.lodge-hero { position: relative; background: #0a2540; }
/* Prevent the stacked-slides flash before Splide initialises. */
.lodge-hero-splide:not(.is-initialized) .splide__slide:not(:first-child) { display: none; }

.lodge-hero-slide {
    position: relative;
    height: 76vh;
    min-height: 460px;
    max-height: 900px;
    overflow: hidden;
}
.lodge-hero-media { position: absolute; inset: 0; overflow: hidden; }
.lodge-hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    will-change: transform;
}
.lodge-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.10) 0%,
        rgba(0, 0, 0, 0.04) 42%,
        rgba(0, 0, 0, 0.55) 100%);
}
.lodge-hero-content {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end;
    z-index: 2;
}
.lodge-hero-content-inner {
    width: 100%; max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 8vh;
    color: #fff;
}
.lodge-hero-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-family: "Montserrat-SemiBold", sans-serif;
    font-size: 1.5rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: #78c5db;
}
.lodge-hero-title {
    margin: 0;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 5.4rem; line-height: 1.08;
    color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
    text-wrap: balance;
}
.lodge-hero-subtitle {
    margin: 16px 0 0;
    max-width: 620px;
    font-size: 2.2rem; line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    text-wrap: pretty;
}
.lodge-hero-cta { margin-top: 26px; }

/* Ken Burns - applied to every hero image but paused; only the active slide's
   image runs. Pausing (instead of dropping the animation) holds the current
   transform, so the outgoing slide does not snap back mid-crossfade. */
@keyframes lodge-kb-zoom-in  { from { transform: scale(1); }            to { transform: scale(1.12); } }
@keyframes lodge-kb-zoom-out { from { transform: scale(1.12); }         to { transform: scale(1); } }
@keyframes lodge-kb-pan      { from { transform: scale(1.12) translate(0, 0); } to { transform: scale(1.12) translate(-3%, -2%); } }
.lodge-hero-img--static { transform: none; }
.lodge-hero-img--kenburns-zoom-in  { animation: lodge-kb-zoom-in  12s ease-out both; animation-play-state: paused; }
.lodge-hero-img--kenburns-zoom-out { animation: lodge-kb-zoom-out 12s ease-out both; animation-play-state: paused; }
.lodge-hero-img--kenburns-pan      { animation: lodge-kb-pan      14s ease-out both; animation-play-state: paused; }
.splide__slide.is-active .lodge-hero-img--kenburns-zoom-in,
.splide__slide.is-active .lodge-hero-img--kenburns-zoom-out,
.splide__slide.is-active .lodge-hero-img--kenburns-pan { animation-play-state: running; }

/* Splide arrows / pagination - brand styling. */
.lodge-hero-splide .splide__arrow {
    width: 46px; height: 46px; opacity: 1;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.lodge-hero-splide .splide__arrow:hover { background: #78c5db; border-color: #78c5db; }
.lodge-hero-splide .splide__arrow svg { width: 16px; height: 16px; fill: #fff; }
.lodge-hero-splide .splide__pagination { bottom: 16px; }
.lodge-hero-splide .splide__pagination__page { background: rgba(255, 255, 255, 0.45); }
.lodge-hero-splide .splide__pagination__page.is-active { background: #78c5db; transform: scale(1.4); }

/* --- Shared section bits -------------------------------------------------- */
.lodge-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-family: "Montserrat-SemiBold", sans-serif;
    font-size: 1.4rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: #78c5db;
}
.lodge-section-title {
    margin: 0 0 18px;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 3.6rem; line-height: 1.2;
    color: #0a2540;
    text-wrap: balance;
}
.lodge-section-title--center { text-align: center; margin-bottom: 44px; }
.lodge-rte { font-size: 2rem; line-height: 1.65; color: #45545f; }
.lodge-rte p { margin: 0 0 1em; text-wrap: pretty; }
.lodge-rte p:last-child { margin-bottom: 0; }
.lodge-rte a { color: #337ab7; }

/* --- Intro ---------------------------------------------------------------- */
.lodge-intro { padding: 84px 0; }
.lodge-intro-grid { display: grid; gap: 48px; align-items: center; }
.lodge-intro--has-image .lodge-intro-grid { grid-template-columns: 1.1fr 0.9fr; }
.lodge-intro-media img {
    display: block; width: 100%; height: auto;
    border-radius: 10px;
    box-shadow: 0 30px 60px -28px rgba(15, 18, 22, 0.45);
}

/* --- Content sections (editorial sticky-scroll) --------------------------- */
.lodge-sections { position: relative; }

/* each section is a full-bleed day/night band */
.lodge-sec {
    position: relative;
    padding: 96px 0;
}
.lodge-sec--light { background: #ffffff; }
.lodge-sec--cream { background: #f5ede0; }
.lodge-sec--night { background: #0a2540; }

/* optional editor-set watermark layer behind the content */
.lodge-sec-watermark {
    position: absolute; inset: 0;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    pointer-events: none;
}

.lodge-sec-inner {
    position: relative;
    z-index: 1;
    max-width: 1190px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "media head"
        "media body";
    column-gap: 64px;
    row-gap: 0;
    align-items: start;
}
.lodge-sec-head  { grid-area: head; }
.lodge-sec-media { grid-area: media; }
.lodge-sec-body  { grid-area: body; }
/* the photo panel alternates side every other section */
.lodge-sec:nth-of-type(even) .lodge-sec-inner {
    grid-template-areas:
        "head media"
        "body media";
}
.lodge-sec--no-media .lodge-sec-inner {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "body";
    max-width: 760px;
}

/* sticky photo panel - pins while its section's text scrolls past */
.lodge-sec-media { position: sticky; top: 28px; }
.lodge-sec-media-frame { position: relative; }
.lodge-sec-gallery {
    border-radius: 14px;
    overflow: hidden;
    background: #0a2540;
    box-shadow: 0 30px 60px -28px rgba(15, 18, 22, 0.45);
}
.lodge-sec-gallery .splide__slide img {
    display: block;
    width: 100%; height: 62vh;
    min-height: 380px; max-height: 640px;
    object-fit: cover;
}
.lodge-sec-gallery .splide__arrow {
    width: 40px; height: 40px; opacity: 1;
    background: rgba(10, 37, 64, 0.55);
    border: 0;
}
.lodge-sec-gallery .splide__arrow:hover { background: #78c5db; }
.lodge-sec-gallery .splide__arrow svg { width: 14px; height: 14px; fill: #fff; }
.lodge-sec-gallery .splide__pagination { bottom: 12px; }
.lodge-sec-gallery .splide__pagination__page { background: rgba(255, 255, 255, 0.5); }
.lodge-sec-gallery .splide__pagination__page.is-active { background: #78c5db; transform: scale(1.4); }

/* image counter (03 / 12) */
.lodge-sec-count {
    position: absolute;
    left: 16px; bottom: 14px;
    z-index: 3;
    font-family: "Montserrat-SemiBold", sans-serif;
    font-size: 1.4rem; letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 10px rgba(10, 37, 64, 0.7);
    pointer-events: none;
}
.lodge-sec-count-cur { color: #fff; }

/* head - ghosted chapter numeral + kicker */
.lodge-sec-head { padding-top: 4px; }
.lodge-sec-num {
    display: block;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 12rem; line-height: 0.82;
    color: transparent;
    -webkit-text-stroke: 1px rgba(10, 37, 64, 0.22);
    margin-bottom: 6px;
    will-change: transform;
}
.lodge-sec--night .lodge-sec-num { -webkit-text-stroke-color: rgba(255, 255, 255, 0.32); }
.lodge-sec-kicker {
    display: block;
    margin-bottom: 14px;
    font-family: "Montserrat-SemiBold", sans-serif;
    font-size: 1.4rem; letter-spacing: 0.24em; text-transform: uppercase;
    color: #78c5db;
}

/* body - title, copy, read-more */
.lodge-sec-title {
    margin: 0 0 18px;
    font-family: "Montserrat-Bold", sans-serif;
    font-size: 3.4rem; line-height: 1.18;
    color: #0a2540;
    text-wrap: balance;
}
.lodge-sec--night .lodge-sec-title { color: #ffffff; }
.lodge-sec--night .lodge-rte { color: rgba(255, 255, 255, 0.82); }
.lodge-sec--night .lodge-rte a { color: #78c5db; }

/* read-more - inline grid-rows expand (no scroll, no layout break) */
.lodge-sec-more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s ease;
}
.lodge-sec-more.is-open { grid-template-rows: 1fr; }
.lodge-sec-more-inner { overflow: hidden; min-height: 0; }
.lodge-rte--more > :first-child { margin-top: 1em; }
.lodge-sec-more-toggle {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 18px;
    padding: 0; border: 0; background: none; cursor: pointer;
    font-family: "Montserrat-SemiBold", sans-serif;
    font-size: 1.5rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: #78c5db;
}
.lodge-sec-more-icon {
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.3s ease;
}
.lodge-sec-more-toggle.is-open .lodge-sec-more-icon {
    transform: translateY(2px) rotate(-135deg);
}
.lodge-sec-more-toggle:hover { color: #0a2540; }
.lodge-sec--night .lodge-sec-more-toggle:hover { color: #ffffff; }

/* scroll-reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */
/* Intro image per-breakpoint visibility (ACF "Show Intro Image On").
   Discrete viewport bands from the project's canonical thresholds
   (1199 / 992 / 768) plus their min-width complements. Hiding the media on a
   2-column band (>= 993px) also collapses the grid so the text fills the row;
   at <= 992px the intro grid is already single-column. */
@media (min-width: 1200px) {
    .lodge-hide-desktop .lodge-intro-media { display: none; }
    .lodge-intro--has-image.lodge-hide-desktop .lodge-intro-grid { grid-template-columns: 1fr; }
}
@media (min-width: 993px) and (max-width: 1199px) {
    .lodge-hide-tablet .lodge-intro-media { display: none; }
    .lodge-intro--has-image.lodge-hide-tablet .lodge-intro-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 992px) {
    .lodge-hide-tablet-narrow .lodge-intro-media { display: none; }
}

@media (max-width: 1199px) {
    .lodge-hero-title { font-size: 4.4rem; }
    .lodge-sec-inner { column-gap: 44px; }
}
@media (max-width: 992px) {
    .lodge-intro--has-image .lodge-intro-grid { grid-template-columns: 1fr; }
    .lodge-hero-slide { height: 64vh; }
    .lodge-hero-title { font-size: 3.8rem; }
    /* stack to: chapter head, gallery, copy - no sticky on narrow screens */
    .lodge-sec { padding: 64px 0; }
    .lodge-sec-inner,
    .lodge-sec:nth-of-type(even) .lodge-sec-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "head" "media" "body";
        row-gap: 22px;
    }
    .lodge-sec-media { position: static; }
    .lodge-sec-gallery .splide__slide img { height: 50vh; min-height: 300px; }
    .lodge-sec-num { font-size: 9rem; }
}
@media (max-width: 768px) {
    .lodge-container { padding-left: 18px; padding-right: 18px; }
    /* shorter hero on phones - keeps the wide image format from cropping to a
       tall portrait sliver */
    .lodge-hero-slide { height: 52vh; min-height: 340px; }
    .lodge-hero-content-inner { padding-bottom: 48px; }
    .lodge-hero-title { font-size: 3rem; }
    .lodge-hero-subtitle { font-size: 1.9rem; }
    .lodge-section-title { font-size: 2.8rem; }
    .lodge-sec { padding: 52px 0; }
    .lodge-sec-inner { padding: 0 18px; }
    .lodge-sec-num { font-size: 7.5rem; }
    .lodge-sec-title { font-size: 2.6rem; }
    .lodge-rte { font-size: 1.8rem; }
    .lodge-intro { padding: 56px 0; }
    .lodge-hide-mobile .lodge-intro-media { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lodge-hero-img--kenburns-zoom-in,
    .lodge-hero-img--kenburns-zoom-out,
    .lodge-hero-img--kenburns-pan { animation: none; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}
