/* ============================================================
   Tiddlywinks Nursery — Fees page styles
   Class prefix: .tw-fees-*  (+ generic .tw-carousel-* — copied
   from contact.css; the two bundles never co-load)
   Loaded only on the /fees/ page (see enqueue.php).
   ============================================================ */

/* ---------- Theme compatibility ----------
   1. main.css has `body main, html main { overflow-x: hidden }`, which turns
      <main> into a clipping container and BREAKS position:sticky descendants
      (the scroll widget). `clip` prevents horizontal scrollbars without
      creating a scroll container; `visible` is the old-browser fallback.
      Blob overflow is contained per-band instead (never on a scrolly
      ancestor).
   2. Reset the theme's broad `header,nav{position:absolute}` for semantic
      <header>s inside our sections.
   NOTE: no `#header.white-bg` fix here — this page keeps its `.hero-section`,
   so the theme's own header/logo behaviour applies untouched.               */
.tw-fees-main {
  overflow-x: visible;
  overflow-x: clip;
}
.tw-fees-main .tw-fees-reviews header,
.tw-fees-main section .tw-fees-reviews__head {
  position: static;
  padding: 0;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
}

/* Smooth in-page anchor scroll (Reviews tile → #tw-fees-reviews). */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Base ---------- */
.tw-fees-main {
  color: #2e2f33;
  line-height: 1.4;
}
.tw-fees-main h1,
.tw-fees-main h2,
.tw-fees-main h3 { line-height: 1.15; }

.tw-fees-container {
  width: 90vw;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.tw-fees-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tw-fees-btn--tan {
  background: #d8ae7d;
  border-color: #d8ae7d;
  color: #fff;
}
.tw-fees-btn--tan:hover { background: #c99a63; border-color: #c99a63; color: #fff; }
.tw-fees-btn--outline {
  background: transparent;
  border-color: #2e2f33;
  color: #2e2f33;
}
.tw-fees-btn--outline:hover { background: #2e2f33; color: #fff; }

/* ---------- Decorative circles (comp: logo-palette blobs) ---------- */
.tw-fees-blob {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}
.tw-fees-blob--teal        { width: 296px; height: 296px; background: #03c0b7; right: -60px; top: -48px; }
.tw-fees-blob--orange-soft { width: 210px; height: 210px; background: rgba(255, 157, 0, .5); right: 64px; top: 150px; }
.tw-fees-blob--orange      { width: 286px; height: 286px; background: #fe9d00; left: -90px; top: 45%; }
.tw-fees-blob--pink-soft   { width: 425px; height: 425px; background: rgba(227, 190, 217, .5); left: 90px; top: -120px; }

/* ============================================================
   2/4. INTRO + CLOSING STATEMENT BANDS
   ============================================================ */
.tw-fees-band { background: #f6f5f3; }

.tw-fees-intro,
.tw-fees-closing {
  position: relative;
  overflow: hidden;   /* clips the blobs; NOT an ancestor of the sticky widget */
}
.tw-fees-intro   { padding: 80px 0 36px; }
.tw-fees-closing { padding: 88px 0; background: #fff; }

.tw-fees-intro__inner,
.tw-fees-closing__inner {
  position: relative;
  z-index: 2;
  max-width: 876px;
}
.tw-fees-intro__inner p,
.tw-fees-closing__inner p {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  text-align: center;
  margin: 0 auto 18px;
}
.tw-fees-intro__inner p:last-child,
.tw-fees-closing__inner p:last-child { margin-bottom: 0; }

/* ============================================================
   3. SCROLL-DRIVEN FEES WIDGET
   Base state (no JS / reduced motion): panels stack and read like
   today's text-and-image sections. fees.js adds .is-enhanced
   (pinned scrolly, >768px) or .is-stepper (mobile stepper).
   ============================================================ */
.tw-fees-scrolly { padding: 24px 0 72px; }

/* Rail, stepper and peeks only exist in their respective modes. */
.tw-fees-rail,
.tw-fees-stepper,
.tw-fees-panel__peek { display: none; }

/* --- Panel (shared layout) --- */
.tw-fees-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.tw-fees-scrolly:not(.is-enhanced):not(.is-stepper) .tw-fees-panel {
  margin-bottom: 72px;
}
.tw-fees-scrolly:not(.is-enhanced):not(.is-stepper) .tw-fees-panel:last-child {
  margin-bottom: 0;
}

.tw-fees-panel__media img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 7;
  object-fit: cover;
  border-radius: 20px;
}

.tw-fees-panel__icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  color: var(--tw-accent, #ffca00);
}
.tw-fees-panel__icon svg { width: 100%; height: 100%; }
/* The theme's universal `*{color:#2e2f33}` sets color directly on the svg
   and its shapes, so currentColor never resolves to the accent — restore the
   inheritance chain from the tinted wrapper span. */
.tw-fees-panel__icon svg,
.tw-fees-panel__icon svg * { color: inherit; }

.tw-fees-panel__title {
  font-size: clamp(34px, 3.4vw, 55px);
  font-weight: 700;
  margin: 0 0 24px;
  color: #303135;
}
.tw-fees-panel__title svg { display: block; margin-top: 10px; }

.tw-fees-panel__copy {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.55;
  max-width: 620px;
}
.tw-fees-panel__copy p { margin: 0 0 14px; }
.tw-fees-panel__copy p:last-child { margin-bottom: 0; }
/* Undo the theme's global ul{display:flex;flex-direction:column}. */
.tw-fees-panel__copy ul,
.tw-fees-panel__copy ol {
  display: block;
  padding-left: 22px;
  margin: 0 0 14px;
}

.tw-fees-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* Next section's title "peek" (enhanced mode only). */
.tw-fees-panel__peek { margin-top: 44px; opacity: .2; }
.tw-fees-panel__peek-title {
  font-size: clamp(30px, 3vw, 50px);
  font-weight: 700;
  color: #303135;
  margin: 0;
  line-height: 1.15;
}
.tw-fees-panel__peek-title svg { display: block; margin-top: 10px; }

/* --------------------------------------------------------------
   ENHANCED (desktop scrolly) — fees.js sizes the runway/sticky in
   px and drives .is-active from scroll progress.
   -------------------------------------------------------------- */
.tw-fees-scrolly.is-enhanced { padding: 0; }

.tw-fees-scrolly.is-enhanced .tw-fees-scrolly__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.admin-bar .tw-fees-scrolly.is-enhanced .tw-fees-scrolly__sticky { top: 32px; }

.tw-fees-scrolly.is-enhanced .tw-fees-scrolly__frame {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  width: 90vw;
  max-width: 1280px;
}

/* Panels stack in one grid cell and crossfade (180ms — the established
   nursery-slider-v2 timing). */
.tw-fees-scrolly.is-enhanced .tw-fees-scrolly__panels { display: grid; }
.tw-fees-scrolly.is-enhanced .tw-fees-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .18s;
}
.tw-fees-scrolly.is-enhanced .tw-fees-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .18s ease;
}
.tw-fees-scrolly.is-enhanced .tw-fees-panel__peek { display: block; }

/* Keep long copy inside the pinned viewport on short screens. */
.tw-fees-scrolly.is-enhanced .tw-fees-panel__copy {
  max-height: 44vh;
  overflow-y: auto;
}
@media (max-height: 820px) {
  .tw-fees-scrolly.is-enhanced .tw-fees-panel__title { font-size: clamp(28px, 3vw, 42px); }
  .tw-fees-scrolly.is-enhanced .tw-fees-panel__icon  { width: 56px; height: 56px; margin-bottom: 12px; }
  .tw-fees-scrolly.is-enhanced .tw-fees-panel__peek  { margin-top: 24px; }
  .tw-fees-scrolly.is-enhanced .tw-fees-panel__peek-title { font-size: clamp(24px, 2.6vw, 36px); }
}

/* --- Progress rail --- */
.tw-fees-scrolly.is-enhanced .tw-fees-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.tw-fees-rail__arrow {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #303135;
  cursor: pointer;
  border-radius: 50%;
  transition: opacity .2s ease, background-color .2s ease;
}
.tw-fees-rail__arrow svg { width: 22px; height: 22px; }
@media (hover: hover) {
  .tw-fees-rail__arrow:hover { background: rgba(48, 49, 53, .08); }
}
.tw-fees-rail__arrow:focus { outline: none; }
.tw-fees-rail__arrow:focus-visible { box-shadow: 0 0 0 3px rgba(132, 167, 200, .45); }
.tw-fees-rail__arrow[disabled] { opacity: .3; cursor: default; background: transparent; }

.tw-fees-rail__track {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: min(436px, 52vh);
  width: 21px;
}
.tw-fees-rail__track::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 6px;
  bottom: 6px;
  width: 11px;
  border-radius: 20px;
  background: #e3e0dc;
}
.tw-fees-rail__dot {
  position: relative;
  z-index: 2;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  padding: 0;
  background: #d9d9d9;
  border: 1px solid var(--tw-accent, #d9d9d9);
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.tw-fees-rail__dot.is-active {
  background: var(--tw-accent, #ffca00);
  transform: scale(1.1);
}
.tw-fees-rail__dot:focus { outline: none; }
.tw-fees-rail__dot:focus-visible { box-shadow: 0 0 0 3px rgba(132, 167, 200, .45); }

/* --------------------------------------------------------------
   STEPPER (mobile ≤768px) — fees.js adds .is-stepper; panels swap
   on arrow/dot tap. Centred column per the mobile comp.
   -------------------------------------------------------------- */
.tw-fees-scrolly.is-stepper { padding: 8px 0 56px; }

.tw-fees-scrolly.is-stepper .tw-fees-panel { display: none; }
.tw-fees-scrolly.is-stepper .tw-fees-panel.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  animation: tw-fees-fade .25s ease;
}
@keyframes tw-fees-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Order: icon → title → image → copy → buttons (mobile comp). */
.tw-fees-scrolly.is-stepper .tw-fees-panel__body-col { display: contents; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__icon   { order: 1; width: 54px; height: 54px; margin: 0 0 14px; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__title  { order: 2; font-size: 28px; margin-bottom: 18px; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__title svg { margin: 8px auto 0; max-width: 160px; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__media  { order: 3; width: 100%; margin-bottom: 20px; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__copy   { order: 4; font-size: 16px; text-align: left; }
.tw-fees-scrolly.is-stepper .tw-fees-panel__buttons {
  order: 5;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
}
.tw-fees-scrolly.is-stepper .tw-fees-panel__buttons .tw-fees-btn { width: 100%; max-width: 335px; }

.tw-fees-scrolly.is-stepper .tw-fees-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}
.tw-fees-stepper__arrow {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1cbc3;
  background: #fff;
  color: #2e2f33;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity .2s ease;
}
.tw-fees-stepper__arrow svg { width: 22px; height: 22px; }
.tw-fees-stepper__arrow[disabled] { opacity: .35; cursor: default; }
.tw-fees-stepper__dots { display: flex; gap: 13px; }
.tw-fees-stepper__dot {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  padding: 0;
  background: #d9d9d9;
  border: 1px solid var(--tw-accent, #d9d9d9);
  cursor: pointer;
  transition: background-color .2s ease;
}
.tw-fees-stepper__dot.is-active { background: var(--tw-accent, #ffca00); }

/* ============================================================
   3b. EXTRA (5th+) TEXT/IMAGE ROWS — classic two-column render
   ============================================================ */
.tw-fees-extra { padding: 64px 0 0; }
.tw-fees-extra__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.tw-fees-extra__copy h2 { font-size: clamp(30px, 3vw, 44px); margin-bottom: 20px; }
.tw-fees-extra__copy h2 svg { display: block; margin-top: 10px; }
.tw-fees-extra__media img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 7;
  object-fit: cover;
  border-radius: 20px;
}

/* ============================================================
   Generic carousel  (.tw-carousel)
   Copied from contact.css — driven by the same util in fees.js.
   ============================================================ */
.tw-carousel {
  position: relative;
  padding: 0 56px;   /* room for the side arrows */
}
.tw-carousel__viewport { overflow: hidden; }
.tw-carousel__track {
  display: flex;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.tw-carousel__item {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;          /* JS overrides per items-per-view */
  padding: 0 12px;
}

.tw-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1cbc3;
  background: #fff;
  color: #2e2f33;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
@media (hover: hover) {
  .tw-carousel__arrow:hover { background: #84a7c8; color: #fff; border-color: #84a7c8; }
}
.tw-carousel__arrow:active { background: #84a7c8 !important; color: #fff !important; border-color: #84a7c8 !important; }
.tw-carousel__arrow:focus { outline: none; }
.tw-carousel__arrow:focus-visible { box-shadow: 0 0 0 3px rgba(132, 167, 200, .45); }
.tw-carousel__arrow svg { width: 22px; height: 22px; }
.tw-carousel__arrow--prev { left: 0; }
.tw-carousel__arrow--next { right: 0; }
.tw-carousel__arrow[disabled] { opacity: .35; cursor: default; }
.tw-carousel__arrow[disabled]:hover { background: #fff; color: #2e2f33; border-color: #d1cbc3; }

.tw-carousel--single { padding: 0; }
.tw-carousel--single .tw-carousel__arrow,
.tw-carousel--single .tw-carousel__dots { display: none; }

.tw-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.tw-carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d1cbc3;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.tw-carousel__dot.is-active { background: #84a7c8; transform: scale(1.15); }

/* ============================================================
   5. REVIEWS CAROUSEL
   ============================================================ */
.tw-fees-reviews { padding: 40px 0 72px; background: rgba(132, 167, 200, 0.1); }
.tw-fees-reviews__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 8px;
}
.tw-fees-reviews__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
}
.tw-fees-reviews__smiley { display: inline-block; width: 88px; height: 88px; margin: 8px 0 24px; }
.tw-fees-reviews__smiley svg { width: 100%; height: 100%; }

.tw-fees-review {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(46, 47, 51, .06);
}
.tw-fees-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.tw-fees-review__author { font-size: 20px; font-weight: 700; margin: 0; }
.tw-fees-stars {
  display: inline-block;
  width: 120px;
  height: 22px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right center;
  flex: 0 0 auto;
}
.tw-fees-review__quote {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  border: 0;
  padding: 0;
  quotes: none;
}
.tw-fees-review__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  color: #919399;
  font-size: 14px;
}

/* ============================================================
   6. FEATURE TILES
   ============================================================ */
.tw-fees-cards { padding: 64px 0 8px; }
.tw-fees-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.tw-fees-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 5;
  border-radius: 16px;
  background-color: #e8e5e1;
  background-size: cover;
  background-position: center;
}
.tw-fees-card__media--blue { background-image: linear-gradient(135deg, #84a7c8 0%, #c77cb3 100%); }
.tw-fees-card__media--tan  { background-image: linear-gradient(135deg, #d8ae7d 0%, #84a7c8 100%); }
.tw-fees-card__media--pink { background-image: linear-gradient(135deg, #c77cb3 0%, #d8ae7d 100%); }
.tw-fees-card__title {
  font-size: 22px;
  font-weight: 700;
  color: #2e2f33;
  margin: 24px 0 20px;
  max-width: 22ch;
  text-wrap: balance;
}
.tw-fees-card .tw-fees-btn { margin-top: auto; }

/* ============================================================
   7. CTA BAND
   ============================================================ */
.tw-fees-cta { padding: 56px 0 80px; }
.tw-fees-cta__inner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background-color: #e8e5e1;
  background-size: cover;
  background-position: center;
  min-height: 300px;
  padding: 56px;
  display: flex;
  align-items: center;
}
/* Left-weighted scrim so the left-aligned white text stays legible. */
.tw-fees-cta__inner--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(46,47,51,.74) 0%, rgba(46,47,51,.5) 50%, rgba(46,47,51,.12) 100%);
}
.tw-fees-cta__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  text-align: left;
}
.tw-fees-cta__title { font-size: 34px; font-weight: 700; margin: 0 0 14px; }
.tw-fees-cta__phone { font-size: 16px; margin: 0 0 20px; }
.tw-fees-cta__phone a { color: inherit; font-weight: 700; }
.tw-fees-cta__inner--photo .tw-fees-cta__title,
.tw-fees-cta__inner--photo .tw-fees-cta__phone { color: #fff; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .tw-fees-scrolly.is-enhanced .tw-fees-scrolly__frame { gap: 28px; }
  .tw-fees-panel { gap: 40px; }
  .tw-fees-blob--teal      { width: 200px; height: 200px; right: -70px; }
  .tw-fees-blob--pink-soft { width: 300px; height: 300px; }
}

@media (max-width: 768px) {
  .tw-fees-intro   { padding: 56px 0 24px; }
  .tw-fees-closing { padding: 64px 0; }
  .tw-fees-blob--teal        { width: 154px; height: 154px; right: -40px; top: -30px; }
  .tw-fees-blob--orange-soft { width: 140px; height: 140px; right: -50px; top: 130px; }
  .tw-fees-blob--orange      { width: 153px; height: 153px; left: -60px; }
  .tw-fees-blob--pink-soft   { width: 176px; height: 176px; left: 40px; top: -60px; }

  /* Base (no-JS) panels collapse to one column. */
  .tw-fees-panel { grid-template-columns: 1fr; gap: 24px; }

  .tw-fees-reviews__title,
  .tw-fees-cta__title { font-size: 26px; }

  /* Carousel controls become a centred row below the card (contact.css). */
  .tw-carousel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 12px;
    padding: 0;
  }
  .tw-carousel__viewport { flex: 0 0 100%; order: 1; }
  .tw-carousel__arrow { position: static; transform: none; width: 40px; height: 40px; margin-top: 22px; }
  .tw-carousel__arrow--prev { order: 2; }
  .tw-carousel__dots { order: 3; margin-top: 22px; }
  .tw-carousel__arrow--next { order: 4; }
  .tw-carousel__item { padding: 0 8px; }

  .tw-fees-review { padding: 28px 22px; }
  .tw-fees-review__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tw-fees-card { max-width: 420px; margin: 0 auto; }

  .tw-fees-cta__inner { padding: 40px 28px; min-height: 0; }
  .tw-fees-cta__content { max-width: none; text-align: center; }
  .tw-fees-cta__inner--photo::before {
    background: linear-gradient(180deg, rgba(46,47,51,.4) 0%, rgba(46,47,51,.72) 100%);
  }

  .tw-fees-extra__inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   Reduced motion — fees.js already skips the scrolly on desktop;
   this zeroes any remaining transitions (mobile stepper swaps
   instantly, carousels jump-cut).
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .tw-fees-panel,
  .tw-carousel__track { transition: none !important; animation: none !important; }
}
