/* ==========================================================================
   07-finder.css
   Therapist-first landing page: compact hero, trust strip, therapist finder
   (facet toolbar + card meta), how-it-works, FAQ accordion, single-channel
   contact block, breadcrumbs, mobile action bar.
   Load order: 7 of 7 - see README.md ("Stylesheet layer order").

   Mobile-first throughout: every rule below is the phone layout, and the two
   breakpoints at the end (620px / 1000px) only widen it. Nothing here depends
   on a rule in 01-08 being overridden; it extends them.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Compact hero
   The old hero was a full-height cover image. The landing page now has to get
   a guest into the therapist grid, so the hero is deliberately short: on a
   phone it must not push the first therapist card below two thumb-scrolls.
   -------------------------------------------------------------------------- */
.hero-finder {
  position: relative;
  padding-block: clamp(2.25rem, 7vw, 4.25rem);
  background: var(--plum-800);
  color: #fff;
  overflow: hidden;
}
.hero-finder::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(227, 175, 27,.20), transparent 70%),
    radial-gradient(50% 70% at 100% 100%, rgba(169, 143, 209,.22), transparent 70%);
  pointer-events: none;
}
.hero-finder > .shell { position: relative; z-index: 1; }

.hero-finder .hero-title {
  font-size: clamp(1.75rem, 6.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.025em;
  margin: 0 0 .55em;
  max-width: 20ch;
}
.hero-finder .hero-lead {
  margin: 0;
  max-width: 52ch;
  color: rgba(255,255,255,.82);
  font-size: clamp(.95rem, 2.4vw, 1.08rem);
  line-height: 1.65;
}

/* Centred variant. The max-widths above are what actually centre the text, so
   they need auto margins as well as text-align, or the block stays left. */
.hero-center { text-align: center; }
.hero-center .hero-title,
.hero-center .hero-lead { margin-inline: auto; }
.hero-center .hero-proof,
.hero-center .hero-actions { justify-content: center; }

/* Inline proof points. Rendered as a <ul> so a screen reader announces a
   list of four facts rather than one run-on sentence. */
.hero-proof {
  display: flex; flex-wrap: wrap; gap: .5rem .55rem;
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  padding: 0; list-style: none;
}
.hero-proof li {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .42rem .75rem;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  font-size: .78rem; font-weight: 500;
  backdrop-filter: blur(6px);
}
.hero-proof .icon { color: var(--sun-300); }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: clamp(1.4rem, 3.5vw, 2rem);
}
.hero-actions .btn { flex: 1 1 auto; justify-content: center; }

/* --------------------------------------------------------------------------
   2. Trust strip
   -------------------------------------------------------------------------- */
.trust-strip {
  background: var(--cream-2);
  border-block: 1px solid var(--line-soft);
  padding-block: clamp(1rem, 2.5vw, 1.5rem);
}
.trust-grid {
  display: grid; gap: .9rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.trust-grid li {
  display: flex; align-items: flex-start; gap: .55rem;
  font-size: .82rem; line-height: 1.45; color: var(--ink-soft);
}
.trust-grid .icon { color: var(--plum-600); flex: none; margin-top: .1em; }
.trust-grid strong { display: block; color: var(--plum-800); font-size: .87rem; }

/* --------------------------------------------------------------------------
   3. Finder toolbar
   The count and the filter/sort controls. On a phone this sticks below the
   header so the filter button stays reachable while scrolling a long grid.
   -------------------------------------------------------------------------- */
.finder-toolbar {
  position: sticky; top: 62px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: .7rem 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
}
.section-tint .finder-toolbar { background: var(--cream-2); }

.finder-count { margin: 0; font-size: .84rem; color: var(--ink-soft); }
.finder-count strong { color: var(--plum-800); font-weight: 700; font-size: 1rem; }

.finder-controls { display: flex; align-items: center; gap: .45rem; }

/* The filter trigger is a primary control on a phone, so it gets a filled
   look rather than the outline the desktop sidebar makes redundant. */
.finder-controls .filter-open {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem;
  background: var(--plum-700); color: #fff; border: 0;
  font-size: .82rem; font-weight: 600; cursor: pointer;
}
/* .filter-count in 08-catalog.css sets display:inline-flex, which outranks the
   UA rule for [hidden] - without this the badge shows a literal "0". */
.finder-controls .filter-count[hidden] { display: none; }

.finder-controls select {
  padding: .55rem 1.9rem .55rem .7rem;
  max-width: 42vw;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23574E66' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .55rem center / 14px;
  border: 1px solid var(--line);
  font: inherit; font-size: .82rem; color: var(--ink);
  appearance: none; cursor: pointer;
  text-overflow: ellipsis;
}

/* Active-filter pills - a tap target to remove one filter without reopening
   the drawer. Hidden entirely when nothing is active. */
.active-filters {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 0 0 1rem; padding: 0; list-style: none;
}
.active-filters[hidden] { display: none; }
.active-filters button {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .6rem;
  background: var(--plum-50); color: var(--plum-700);
  border: 1px solid var(--plum-100);
  font: inherit; font-size: .74rem; font-weight: 500;
  cursor: pointer;
}
.active-filters button::after { content: "×"; font-size: .95rem; line-height: 1; opacity: .7; }
.active-filters button:hover { background: var(--plum-100); }

/* --------------------------------------------------------------------------
   4. Therapist card additions
   The card gained an age / experience / from-price meta row. Everything else
   (media, code flag, skills, actions) is unchanged in 04-components.css.
   -------------------------------------------------------------------------- */
/* Two columns, not three: "Kinh nghiệm" / "Kinh nghiệm" wraps to a second line
   in a narrow card, which knocked the value baselines out of line from card to
   card. The price moved to its own row below, where it can never be clipped. */
.therapist-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem .5rem;
  margin: 0 0 .55rem;
  padding: .5rem 0 0;
  border-top: 1px solid var(--line-soft);
}
.therapist-meta > div { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.therapist-meta dt {
  font-size: .58rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--slate-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.therapist-meta dd {
  margin: 0;
  font-size: .82rem; font-weight: 700; color: var(--plum-800); white-space: nowrap;
}
.therapist-meta dd small { font-weight: 500; font-size: .7rem; color: var(--ink-soft); }

/* The districts a therapist travels to. Wraps to as many lines as it needs:
   this is the one piece of card data the filter acts on, so it is never
   truncated. */
.therapist-areas {
  display: flex; align-items: flex-start; gap: .35rem;
  margin: 0 0 .7rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .72rem; line-height: 1.45; color: var(--slate-700);
}
.therapist-areas .icon { color: var(--plum-500); flex: none; margin-top: .15em; }

/* Single booking button per card - one channel, no chooser. */
.therapist-actions .btn-book { flex: 1; justify-content: center; }

/* --------------------------------------------------------------------------
   5. How it works
   -------------------------------------------------------------------------- */
.steps {
  display: grid; gap: 1rem;
  margin: 0; padding: 0; list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 1.15rem 1.15rem 1.15rem 3.5rem;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 1.15rem; top: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--plum-700); color: var(--sun-300);
  font-size: .85rem; font-weight: 700;
}
.steps h3 { font-size: .98rem; margin: 0 0 .3em; color: var(--plum-800); }
.steps p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   6. FAQ accordion
   Built on <details>/<summary>: it opens with no JavaScript, so the answer
   text is in the DOM for a crawler and for an AI summariser on first paint.
   -------------------------------------------------------------------------- */
.faq-list { display: grid; gap: .6rem; max-width: 68ch; margin-inline: auto; }

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.faq-item[open] { border-color: var(--plum-100); box-shadow: var(--shadow-sm); }

.faq-item summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem;
  font-size: .95rem; font-weight: 600; line-height: 1.45; color: var(--plum-800);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none;
  width: 15px; height: 15px; margin-top: .22em;
  background: currentColor;
  /* A chevron drawn as a mask so it inherits the heading colour. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item summary:hover { background: var(--plum-50); }

.faq-answer { padding: 0 1.1rem 1.15rem; }
.faq-answer p { margin: 0 0 .7em; font-size: .89rem; line-height: 1.7; color: var(--ink-soft); }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--plum-700); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; }

/* --------------------------------------------------------------------------
   7. Single-channel contact
   One primary button. The alternate channel is offered underneath as a plain
   link so there is never a two-button "which do I press?" moment.
   -------------------------------------------------------------------------- */
.contact-single {
  display: grid; gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--plum-800); color: #fff;
}
/* The element rule in 02-base.css (h1-h4 { color: var(--plum-800) }) beats the
   inherited white on this dark panel, so the heading has to say so itself. */
.contact-single h2 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); margin: 0 0 .4em; color: #fff; }
.contact-single .contact-lead { margin: 0; color: rgba(255,255,255,.8); font-size: .95rem; line-height: 1.65; }

.contact-cta { display: grid; gap: .75rem; }
.contact-cta .btn { width: 100%; justify-content: center; font-size: 1rem; padding: 1rem 1.5rem; }

.contact-alt {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  margin: 0; font-size: .85rem; color: rgba(255,255,255,.7);
}
.contact-alt a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }

.contact-note {
  display: flex; align-items: flex-start; gap: .55rem;
  margin: 0; padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: .8rem; line-height: 1.6; color: rgba(255,255,255,.66);
}
.contact-note .icon { color: var(--sun-300); flex: none; margin-top: .15em; }

/* --------------------------------------------------------------------------
   8. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb { padding-block: .85rem; font-size: .78rem; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem;
  margin: 0; padding: 0; list-style: none;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; color: var(--slate-300); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--plum-700); }
.breadcrumb [aria-current="page"] { color: var(--plum-800); font-weight: 600; }

/* --------------------------------------------------------------------------
   9. Mobile action bar
   A phone visitor who has scrolled past the hero loses the booking CTA. This
   pins one button to the bottom on small screens only; the floating dock in
   07-chrome.css is hidden while it is up so they never stack.
   -------------------------------------------------------------------------- */
.action-bar {
  position: fixed; inset: auto 0 0 0; z-index: 118;
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(251, 249, 254,.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -14px rgba(36, 21, 57,.4);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  transition: transform .3s var(--ease);
}
.action-bar.is-visible { transform: none; }
.action-bar .btn { flex: 1; justify-content: center; }
.action-bar-note { flex: none; font-size: .72rem; line-height: 1.3; color: var(--ink-soft); max-width: 8rem; }

body.has-action-bar .dock { display: none; }

/* --------------------------------------------------------------------------
   10. Breakpoints
   -------------------------------------------------------------------------- */
@media (min-width: 620px) {
  .trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn { flex: 0 0 auto; }
  .contact-cta { grid-template-columns: minmax(0, 22rem); }
  .contact-alt { justify-content: flex-start; }
}

@media (min-width: 1000px) {
  .finder-toolbar { position: static; border-bottom: 0; padding-top: 0; }
  .finder-controls select { max-width: none; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-single { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); align-items: center; gap: 2.5rem; }
  .action-bar { display: none; }
  body.has-action-bar .dock { display: flex; }
}

/* The grid is denser on a phone than the 200px minimum in 04-components.css:
   two real cards side by side beats one and a half. */
@media (max-width: 619px) {
  .therapist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .therapist-body { padding: .7rem .75rem .8rem; }
  .therapist-skills li { font-size: .62rem; padding: .18rem .42rem; }
  .therapist-meta dd { font-size: .76rem; }
  .therapist-meta dt { font-size: .54rem; letter-spacing: .02em; }
  .therapist-areas { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .action-bar, .faq-item summary::after { transition: none; }
}

/* --------------------------------------------------------------------------
   11. Contact page
   -------------------------------------------------------------------------- */
.contact-cols {
  display: grid; gap: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: clamp(2rem, 5vw, 3.25rem);
}
.contact-cols .sub-title { margin-top: 0; }
.contact-small { margin: 0 0 .9rem; font-size: .89rem; line-height: 1.7; color: var(--ink-soft); }

.area-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.area-list li {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .75rem;
  background: var(--plum-50); color: var(--plum-700);
  border: 1px solid var(--plum-100);
  font-size: .82rem; font-weight: 500;
}
.area-list .icon { color: var(--plum-500); }

/* --------------------------------------------------------------------------
   12. Legal pages (privacy, terms)
   A single measured column. Long prose only, so the reading width is the
   whole design.
   -------------------------------------------------------------------------- */
.legal { max-width: 68ch; margin-inline: auto; }
.legal .section-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.legal-updated { margin: 0; font-size: .82rem; color: var(--slate-500); }

.legal-block { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.legal-block:last-child { margin-bottom: 0; }
.legal-block h2 {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  margin: 0 0 .5em;
  padding-bottom: .45rem;
  border-bottom: 1px solid var(--line-soft);
}
.legal-block p { margin: 0; font-size: .94rem; line-height: 1.75; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   13. Breadcrumbs on a light page
   The shared .breadcrumbs in 04-components.css is styled for a dark hero.
   -------------------------------------------------------------------------- */
.breadcrumbs-page { padding-block: 1rem 0; margin-bottom: 0; }
.breadcrumbs-page li + li::before { color: var(--slate-300); }
.breadcrumbs-page a { color: var(--ink-soft); }
.breadcrumbs-page a:hover { color: var(--plum-600); }
.breadcrumbs-page [aria-current="page"] { color: var(--plum-800); font-weight: 600; }

.footer-title-sub { margin-top: 1.5rem; }
.footer-areas li { font-size: .88rem; color: rgba(255,255,255,.7); }

@media (min-width: 760px) {
  .contact-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .contact-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
