/**
 * Midnight theme styles — now used by the Overnight Hikes page (52564) only.
 *
 * Markup: wp:html sections inside an alignfull .tsa-at group in the page
 * content, plus [tsa_at_hero] and [tsa_at_tours] from inc/adventure-tours.php.
 * JS (hero crossfade + star field): assets/js/adventure-tours.js.
 */

.tsa-at {
    --at-night: #07181A;
    --at-night-2: #0C2A2E;
    --at-cream: #F4EFE7;
    --at-gold: #E9B96A;
    --at-amber: #E39A3B;
    --at-sage: #8FBDB4;
    --at-dim: rgba(244, 239, 231, 0.75);
    --at-dim-2: rgba(244, 239, 231, 0.7);
    --at-line: rgba(244, 239, 231, 0.14);
    --at-head-font: var(--tsa-font-display);
    --at-body-font: var(--tsa-font-body);
    --at-pad-x: clamp(20px, 4vw, 48px);
    position: relative;
    background: var(--at-night);
    color: var(--at-cream);
    font-family: var(--at-body-font);
    overflow: hidden;
}

.tsa-at ::selection {
    background: var(--at-amber);
    color: var(--at-night);
}

.tsa-at a {
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tsa-at h1,
.tsa-at h2,
.tsa-at h3,
.tsa-at h4 {
    font-family: var(--at-head-font);
    font-weight: var(--tsa-font-display-weight, 800);
    padding: 0;
    color: var(--at-cream);
}

.tsa-at .tsa-at-section {
    position: relative;
    z-index: 1;
    padding: clamp(72px, 9vw, 120px) var(--at-pad-x);
}

.tsa-at .tsa-at-wrap {
    max-width: 1280px;
    margin: 0 auto;
}

.tsa-at .tsa-at-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--at-gold);
    margin-bottom: 22px;
}

.tsa-at .tsa-at-h2 {
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
}

/* Star field overlay (populated by JS) */

.tsa-at .tsa-at-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.tsa-at .tsa-at-stars i {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(244, 239, 231, 0.7);
    animation: tsaTwinkle 5s ease-in-out infinite;
}

.tsa-at .tsa-at-stars i.is-sparkle {
    border-radius: 0;
    background: var(--at-gold);
    clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
    filter: drop-shadow(0 0 4px rgba(233, 185, 106, 0.9));
}

@keyframes tsaTwinkle {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.3; }
}

/* Pill buttons */

.tsa-at .tsa-at-btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
}

.tsa-at .tsa-at-btn--amber {
    background: var(--at-amber);
    color: var(--at-night);
}

.tsa-at .tsa-at-btn--amber:hover {
    background: var(--at-cream);
    color: var(--at-night);
}

.tsa-at .tsa-at-btn--outline {
    border: 1.5px solid var(--at-gold);
    color: var(--at-gold);
    padding: 15px 30px;
    font-size: 15px;
}

.tsa-at .tsa-at-btn--outline:hover {
    background: var(--at-gold);
    color: var(--at-night);
}

.tsa-at .tsa-at-btn--cream {
    background: var(--at-cream);
    color: var(--at-night);
    padding: 15px 30px;
    font-size: 15px;
}

.tsa-at .tsa-at-btn--cream:hover {
    background: var(--at-amber);
    color: var(--at-night);
}

/* ------------------------------------------------------------------ Hero */

.tsa-at .tsa-at-hero {
    position: relative;
    z-index: 1;
    padding: calc(var(--wp--custom--header-height, 83px) + clamp(72px, 9vw, 128px)) var(--at-pad-x) 0;
    text-align: center;
}

.tsa-at .tsa-at-hero__inner {
    max-width: 1000px;
    margin: 0 auto;
}

.tsa-at .tsa-at-hero h1 {
    font-size: clamp(2.8rem, 6.5vw, 6rem);
    line-height: 1;
    letter-spacing: -0.01em;
    margin: 0 0 28px;
    text-wrap: balance;
}

.tsa-at .tsa-at-hero h1 em {
    font-style: italic;
    color: var(--at-gold);
}

.tsa-at .tsa-at-hero__lede {
    font-size: 19px;
    line-height: 1.6;
    color: var(--at-dim);
    max-width: 52ch;
    margin: 0 auto 36px;
}

.tsa-at .tsa-at-hero__media {
    max-width: 1280px;
    margin: 72px auto 0;
    position: relative;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    aspect-ratio: 21 / 9;
}

.tsa-at .tsa-at-hero__slides {
    position: absolute;
    inset: 0;
}

.tsa-at .tsa-at-hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92);
    opacity: 0;
    transition: opacity 1.6s ease-in-out;
}

.tsa-at .tsa-at-hero__slide.is-active {
    opacity: 1;
}

.tsa-at .tsa-at-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 24, 26, 0.55) 0%, transparent 40%);
    pointer-events: none;
}

/* --------------------------------------------------------------- Marquee */

.tsa-at .tsa-at-marquee {
    position: relative;
    z-index: 1;
    background: rgba(233, 185, 106, 0.06);
    overflow: hidden;
    padding: 18px 0;
    border-top: 1px solid rgba(233, 185, 106, 0.28);
    border-bottom: 1px solid rgba(233, 185, 106, 0.28);
}

.tsa-at .tsa-at-marquee__track {
    display: flex;
    gap: 56px;
    width: max-content;
    animation: tsaMarquee 40s linear infinite;
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 17px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tsa-at .tsa-at-marquee__star {
    color: var(--at-gold);
}

@keyframes tsaMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .tsa-at .tsa-at-marquee__track {
        animation: none;
    }

    .tsa-at .tsa-at-stars i {
        animation: none;
    }
}

/* -------------------------------------------------------------- Why join */

.tsa-at .tsa-at-why h2 {
    max-width: 20ch;
    margin-bottom: 56px;
}

.tsa-at .tsa-at-why__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.tsa-at .tsa-at-why__item {
    border-top: 1px solid rgba(233, 185, 106, 0.4);
    padding-top: 28px;
}

.tsa-at .tsa-at-why__num {
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 15px;
    color: var(--at-gold);
    margin-bottom: 14px;
}

.tsa-at .tsa-at-why__item h3 {
    font-size: 24px;
    margin: 0 0 12px;
}

.tsa-at .tsa-at-why__item p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--at-dim-2);
}

/* ------------------------------------------------------ Parallax message */

.tsa-at .tsa-at-message {
    background-image: linear-gradient(rgba(7, 24, 26, 0.72), rgba(7, 24, 26, 0.72)), url('https://takeshapeadventures.com.au/wp-content/uploads/2025/08/japan_smphoto-26.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: clamp(96px, 11vw, 160px) var(--at-pad-x);
    text-align: center;
}

.tsa-at .tsa-at-message__inner {
    max-width: 880px;
    margin: 0 auto;
}

.tsa-at .tsa-at-message h2 {
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.06;
    margin: 0 0 28px;
    text-wrap: balance;
}

.tsa-at .tsa-at-message p {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(244, 239, 231, 0.85);
    margin: 0 0 18px;
}

.tsa-at .tsa-at-message p:last-of-type {
    margin-bottom: 36px;
}

/* ------------------------------------------------------- Real adventure */

.tsa-at .tsa-at-real {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.tsa-at .tsa-at-real > img {
    width: 100%;
    display: block;
    border-radius: 20px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.tsa-at .tsa-at-real h2 {
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.06;
    margin: 0 0 18px;
}

.tsa-at .tsa-at-real p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--at-dim);
    margin: 0 0 14px;
}

.tsa-at .tsa-at-real h3 {
    font-size: 20px;
    margin: 24px 0 18px;
    color: var(--at-gold);
}

.tsa-at .tsa-at-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.tsa-at .tsa-at-checklist div {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(244, 239, 231, 0.85);
}

.tsa-at .tsa-at-checklist span {
    color: var(--at-gold);
    font-weight: 800;
}

/* Popup Maker styles the trigger via class; keep our button look */
.tsa-at .popmake-52521.tsa-at-btn--cream {
    border: none;
    font-family: var(--at-body-font);
}

/* Campfire badge (Overnight Hikes variant) */

.tsa-at .tsa-at-figure {
    position: relative;
    margin: 0;
}

.tsa-at .tsa-at-campfire {
    position: absolute;
    right: -16px;
    bottom: 40px;
    background: var(--at-night-2);
    border: 1px solid rgba(233, 185, 106, 0.4);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.tsa-at .tsa-at-campfire i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--at-amber);
    box-shadow: 0 0 12px 4px rgba(227, 154, 59, 0.7);
    animation: tsaFlicker 2.4s ease-in-out infinite;
    display: inline-block;
}

.tsa-at .tsa-at-campfire span {
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 15px;
    color: var(--at-cream);
}

@keyframes tsaFlicker {
    0%, 100% { transform: scale(1); opacity: 1; }
    40% { transform: scale(1.06) translateX(1px); opacity: 0.92; }
    70% { transform: scale(0.97); opacity: 0.96; }
}

@media (max-width: 900px) {
    .tsa-at .tsa-at-campfire {
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tsa-at .tsa-at-campfire i {
        animation: none;
    }
}

/* ---------------------------------------------------------------- Quotes */

.tsa-at .tsa-at-quotes {
    background: linear-gradient(180deg, rgba(244, 239, 231, 0.03), rgba(244, 239, 231, 0.06));
    border-top: 1px solid rgba(244, 239, 231, 0.1);
    border-bottom: 1px solid rgba(244, 239, 231, 0.1);
}

.tsa-at .tsa-at-quotes .tsa-at-h2 {
    margin-bottom: 48px;
}

.tsa-at .tsa-at-quotes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

.tsa-at .tsa-at-quote {
    background: rgba(7, 24, 26, 0.55);
    border: 1px solid var(--at-line);
    border-radius: 20px;
    padding: 32px;
}

.tsa-at .tsa-at-quote__tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--at-gold);
    margin-bottom: 18px;
}

.tsa-at .tsa-at-quote p {
    margin: 0 0 20px;
    font-size: 15.5px;
    line-height: 1.7;
    color: rgba(244, 239, 231, 0.88);
}

.tsa-at .tsa-at-quote p.is-verse {
    font-style: italic;
    line-height: 1.75;
}

.tsa-at .tsa-at-quote cite {
    font-style: normal;
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 16px;
    color: var(--at-cream);
}

/* ----------------------------------------------------------------- Steps */

.tsa-at .tsa-at-steps {
    text-align: center;
}

.tsa-at .tsa-at-steps .tsa-at-h2 {
    margin-bottom: 64px;
}

.tsa-at .tsa-at-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.tsa-at .tsa-at-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.tsa-at .tsa-at-step__num {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1.5px solid var(--at-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 26px;
    color: var(--at-gold);
}

.tsa-at .tsa-at-step__label {
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 21px;
}

/* ---------------------------------------------------------------- Tours */

.tsa-at .tsa-at-upcoming-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.tsa-at .tsa-at-link-underline {
    font-weight: 700;
    font-size: 15px;
    border-bottom: 2px solid var(--at-amber);
    padding-bottom: 4px;
    color: var(--at-cream);
}

.tsa-at .tsa-at-link-underline:hover {
    color: var(--at-gold);
}

.tsa-at .tsa-at-tours {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tsa-at .tsa-at-tour {
    display: flex;
    flex-direction: column;
    background: rgba(244, 239, 231, 0.05);
    border: 1px solid var(--at-line);
    border-radius: 20px;
    overflow: hidden;
    color: var(--at-cream);
}

.tsa-at .tsa-at-tour:hover {
    border-color: rgba(233, 185, 106, 0.7);
    color: var(--at-cream);
}

.tsa-at .tsa-at-tour__media {
    position: relative;
}

.tsa-at .tsa-at-tour__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 24, 26, 0.35) 0%, transparent 45%);
    pointer-events: none;
}

.tsa-at .tsa-at-tour__media img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    filter: brightness(0.88) saturate(0.95);
}

.tsa-at .tsa-at-tour__placeholder {
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--at-night-2) 0%, var(--at-night) 70%);
}

.tsa-at .tsa-at-tour__placeholder span {
    font-size: 44px;
    color: var(--at-gold);
}

.tsa-at .tsa-at-tour__country,
.tsa-at .tsa-at-tour__stock {
    position: absolute;
    top: 14px;
    z-index: 1;
    background: rgba(7, 24, 26, 0.75);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.tsa-at .tsa-at-tour__country {
    left: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--at-cream);
}

.tsa-at .tsa-at-tour__stock {
    right: 14px;
}

.tsa-at .tsa-at-tour__stock.is-in { color: var(--at-sage); }
.tsa-at .tsa-at-tour__stock.is-low { color: var(--at-gold); }
.tsa-at .tsa-at-tour__stock.is-out { color: rgba(244, 239, 231, 0.55); }

.tsa-at .tsa-at-tour__body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tsa-at .tsa-at-tour__body h3 {
    font-size: 25px;
    margin: 0;
    line-height: 1.1;
}

.tsa-at .tsa-at-tour__date {
    font-size: 14px;
    font-weight: 700;
    color: var(--at-gold);
}

.tsa-at .tsa-at-tour__stats {
    font-size: 14px;
    color: var(--at-dim-2);
    margin-bottom: 10px;
}

.tsa-at .tsa-at-tour__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--at-line);
    padding-top: 16px;
}

.tsa-at .tsa-at-tour__price {
    font-family: var(--at-head-font);
  font-weight: var(--tsa-font-display-weight, 800);
    font-size: 21px;
}

.tsa-at .tsa-at-tour__members {
    font-size: 12.5px;
    color: var(--at-sage);
    font-weight: 600;
}

.tsa-at .tsa-at-tour__cta {
    border: 1.5px solid var(--at-gold);
    color: var(--at-gold);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.tsa-at .tsa-at-tour:hover .tsa-at-tour__cta {
    background: var(--at-gold);
    color: var(--at-night);
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 1024px) {
    .tsa-at .tsa-at-tours,
    .tsa-at .tsa-at-quotes__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .tsa-at .tsa-at-why__grid,
    .tsa-at .tsa-at-real,
    .tsa-at .tsa-at-steps__grid {
        grid-template-columns: 1fr;
    }

    .tsa-at .tsa-at-hero__media {
        aspect-ratio: 16 / 10;
        margin-top: 48px;
    }

    /* fixed backgrounds are unreliable on mobile browsers */
    .tsa-at .tsa-at-message {
        background-attachment: scroll;
    }
}

@media (max-width: 640px) {
    .tsa-at .tsa-at-tours,
    .tsa-at .tsa-at-quotes__grid {
        grid-template-columns: 1fr;
    }

    .tsa-at .tsa-at-hero__media {
        aspect-ratio: 4 / 3;
    }
}

/* ==================================================================
   Footer template part recolour — midnight palette.
   This stylesheet only loads on the Adventure Tours page, so these
   overrides are page-scoped by definition.
   ================================================================== */

/* --- "Why Choose" cover: light -> night --- */

body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light {
    background: #07181A;
}

/* the cover's light overlay span sits above the background — darken it too */
body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light .wp-block-cover__background {
    background-color: #07181A !important;
}

body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light .wp-block-cover__image-background {
    display: none !important;
}

body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light .has-background-dark-color {
    color: #F4EFE7 !important;
}

body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light .has-darktext-color {
    color: rgba(244, 239, 231, 0.85) !important;
}

body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light img.wp-image-57798,
body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light img.wp-image-57799,
body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light img.wp-image-57800,
body.page-id-52564 footer.wp-block-template-part .wp-block-cover.is-light .wp-block-image img {
    filter: drop-shadow(0 0 1px rgba(244, 239, 231, 0.4));
}

/* --- Subscribe band: darktext green -> amber (per Midnight design) --- */

body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color {
    background-color: #E39A3B !important;
}

body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color .has-white-color,
body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color h3,
body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color p,
body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color label,
body.page-id-52564 footer.wp-block-template-part .has-darktext-background-color .gfield_required_text {
    color: #07181A !important;
}

/* Gravity Form (form 70): the theme's global GF rules use !important with
   transparent inputs and a teal button, so these must match that strength. */

body.page-id-52564 footer.wp-block-template-part .gform_wrapper {
    color: #07181A;
}

body.page-id-52564 footer.wp-block-template-part .gform_wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]):not([type="hidden"]),
body.page-id-52564 footer.wp-block-template-part .gform_wrapper select,
body.page-id-52564 footer.wp-block-template-part .gform_wrapper textarea {
    background-color: #F4EFE7 !important;
    color: #07181A !important;
    border-color: rgba(7, 24, 26, 0.35) !important;
}

body.page-id-52564 footer.wp-block-template-part .gform_wrapper input::placeholder,
body.page-id-52564 footer.wp-block-template-part .gform_wrapper textarea::placeholder {
    color: rgba(7, 24, 26, 0.6) !important;
    opacity: 1 !important;
}

body.page-id-52564 footer.wp-block-template-part .gform_wrapper .gfield_label,
body.page-id-52564 footer.wp-block-template-part .gform_wrapper legend,
body.page-id-52564 footer.wp-block-template-part .gform_wrapper .gfield_description {
    color: #07181A !important;
}

body.page-id-52564 footer.wp-block-template-part .gform_wrapper .gform_button {
    background-color: #07181A !important;
    color: #F4EFE7 !important;
}

body.page-id-52564 footer.wp-block-template-part .gform_wrapper .gform_button:hover {
    background-color: #F4EFE7 !important;
    color: #07181A !important;
    opacity: 1 !important;
}

/* --- Footer links band: background-dark green -> night --- */

body.page-id-52564 footer.wp-block-template-part .footer-container.has-background-dark-background-color {
    background-color: #07181A !important;
    border-top: 1px solid rgba(233, 185, 106, 0.28);
}

body.page-id-52564 footer.wp-block-template-part .footer-container a:hover {
    color: #E9B96A;
}
