/* ==========================================================================
   PhysioHub — shared design system
   Palette keyed to the PhysioHub logo blue.
   ========================================================================== */
:root {
  /* Theme slots. A theme can override any of these; everything not
     overridden derives sensibly from --blue / --navy via color-mix. */
  --blue: #1450d2;            /* primary accent: buttons, links, icons */
  --navy: #0d1b3d;            /* dark: headings, footer, hero overlay */
  --gold: #f5a623;            /* review stars */
  --kicker: var(--blue);      /* 3rd colour: kickers, tag pills, card icons */
  --cta-1: var(--blue-dark);  /* CTA band gradient start */
  --cta-2: var(--blue);       /* CTA band gradient end */

  --blue-dark: color-mix(in srgb, var(--blue) 76%, black);
  --blue-tint: color-mix(in srgb, var(--blue) 9%, white);
  --kicker-tint: color-mix(in srgb, var(--kicker) 10%, white);
  --navy-2: color-mix(in srgb, var(--navy) 88%, var(--blue));
  --ink: color-mix(in srgb, var(--navy) 92%, white);
  --muted: color-mix(in srgb, var(--navy) 60%, white);
  --line: color-mix(in srgb, var(--blue) 11%, white);
  --bg: color-mix(in srgb, var(--blue) 4%, white);
  --white: #ffffff;
  --on-dark-accent: color-mix(in srgb, var(--kicker) 42%, white);
  --on-dark-text: color-mix(in srgb, var(--blue) 10%, white);
  --footer-text: color-mix(in srgb, var(--navy) 28%, white);
  --focus-ring: color-mix(in srgb, var(--blue) 14%, transparent);
  --btn-glow: color-mix(in srgb, var(--blue) 35%, transparent);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 43, 106, .08);
  --shadow-lg: 0 18px 44px rgba(16, 43, 106, .14);
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Colour themes (live switcher in assets/theme.js) ----------
   Add a new template by adding one block here + one entry in theme.js.
   Override as few or as many slots as you like (2, 3 or 4 base colours). */

/* Blues */
html[data-theme="sky"]          { --blue: #0284c7; --navy: #0c2a40; }
html[data-theme="indigo"]       { --blue: #4338ca; --navy: #1e1b4b; }
html[data-theme="steel"]        { --blue: #3a6d99; --navy: #152736; --gold: #e8a13c; }
html[data-theme="ocean-sunset"] { --blue: #0f66c2; --navy: #0e2440; --kicker: #e0662f;
                                  --cta-1: #c94f24; --cta-2: #ef8f3c; --gold: #f0a04b; }

/* Greens & teals */
html[data-theme="teal"]         { --blue: #0d9488; --navy: #093230; --gold: #f59e0b; }
html[data-theme="forest"]       { --blue: #1a8f4e; --navy: #10291b; --gold: #eab308; }
html[data-theme="emerald-gold"] { --blue: #0e8a60; --navy: #07271c; --kicker: #c9982f; --gold: #c9982f; }
html[data-theme="sage"]         { --blue: #55804f; --navy: #26331f; --kicker: #c06b3e;
                                  --bg: #f6f4ec; --gold: #d99a3d; }
html[data-theme="mint"]         { --blue: #0ca678; --navy: #0f3b30; --kicker: #0891b2; --bg: #eefaf5; }

/* Warm */
html[data-theme="terracotta"]   { --blue: #cf4d2f; --navy: #352016; --gold: #e8a13c; }
html[data-theme="coral-navy"]   { --blue: #e35c48; --navy: #14213d; --kicker: #e3a63b; --gold: #e3a63b; }
html[data-theme="burgundy"]     { --blue: #8d2941; --navy: #2a0d16; --kicker: #b98a2e; --gold: #d9a92f; }
html[data-theme="amber"]        { --blue: #bf5b04; --navy: #38200a; --bg: #faf5ec; --gold: #d97706; }
html[data-theme="rose"]         { --blue: #c2366b; --navy: #33101f; --gold: #e8a13c; }

/* Purples */
html[data-theme="plum"]         { --blue: #7c3aed; --navy: #221345; }
html[data-theme="violet-teal"]  { --blue: #6d28d9; --navy: #1f1440; --kicker: #0d9488; --gold: #f59e0b; }
html[data-theme="lavender"]     { --blue: #8b5cf6; --navy: #2a2150; --bg: #f6f4fc; }

/* Dark & mono */
html[data-theme="charcoal"]     { --blue: #263243; --navy: #0c1017; --gold: #d9a92f; }
html[data-theme="midnight-gold"]{ --blue: #a87e23; --navy: #0b1220; --kicker: #a87e23;
                                  --cta-1: #0b1220; --cta-2: #24344d; --gold: #d9a92f; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s ease;
  text-decoration: none !important;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 20px var(--btn-glow); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: var(--cta-1); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 74px;
}
.brand img { height: 42px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--ink); font-weight: 600; font-size: .92rem;
  padding: 9px 13px; border-radius: 8px; text-decoration: none;
}
.main-nav a:hover { color: var(--blue); background: var(--blue-tint); }
.main-nav a.active { color: var(--blue); }
.main-nav .btn { margin-left: 10px; padding: 10px 22px; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; background: var(--navy);
  margin: 5px 0; border-radius: 2px; transition: .25s;
}

/* ---------- Heroes ---------- */
.hero {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 560px; padding: 90px 24px;
  background-size: cover; background-position: center;
  text-align: center; color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--navy) 62%, transparent),
    color-mix(in srgb, var(--navy) 55%, transparent) 60%,
    color-mix(in srgb, var(--navy) 72%, transparent));
}
.hero > .hero-content { position: relative; max-width: 780px; }
.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: .16em;
  font-size: .78rem; font-weight: 700; color: var(--kicker);
  margin-bottom: 14px;
}
.hero .kicker { color: var(--on-dark-accent); }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15;
  font-weight: 800; margin-bottom: 18px; letter-spacing: -.01em;
}
.hero p.lead { font-size: 1.13rem; color: var(--on-dark-text); max-width: 640px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-page { min-height: 340px; padding: 70px 24px; }
.hero-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.tint { background: var(--bg); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; color: var(--navy); margin-bottom: 14px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.split-body h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; color: var(--navy); margin-bottom: 16px; letter-spacing: -.01em; }
.split-body p { color: var(--muted); margin-bottom: 14px; }
.split-body .btn { margin-top: 10px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-media { height: 210px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.18rem; color: var(--navy); font-weight: 700; line-height: 1.35; }
.card-body .tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--kicker); background: var(--kicker-tint);
  padding: 4px 10px; border-radius: 99px;
}
.card-body p { color: var(--muted); font-size: .95rem; }
.card-body .card-link { margin-top: auto; font-weight: 700; font-size: .92rem; }
.card-body .card-link::after { content: " →"; }

/* Service icon cards (home) */
.icon-card { text-align: left; padding: 30px; }
.icon-card .icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--kicker-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.icon-card .icon svg { width: 26px; height: 26px; stroke: var(--kicker); }

/* ---------- Collapsible (details) ---------- */
details.fold {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  margin-bottom: 12px; overflow: hidden;
}
details.fold summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 16px 20px; font-weight: 700; color: var(--navy); font-size: 1.02rem;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px;
  border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue);
  transform: rotate(45deg); transition: transform .25s; margin-right: 4px;
}
details.fold[open] summary::after { transform: rotate(225deg); }
details.fold[open] summary { border-bottom: 1px solid var(--line); }
details.fold .fold-body { padding: 18px 20px; color: var(--muted); }
details.fold .fold-body p { margin-bottom: 12px; }
details.fold .fold-body p:last-child { margin-bottom: 0; }

/* Inline "read more" clamp */
.clamp-wrap .clamp-extra { display: none; }
.clamp-wrap.open .clamp-extra { display: block; }
.clamp-toggle {
  background: none; border: 0; color: var(--blue); font-weight: 700;
  cursor: pointer; font-size: .92rem; padding: 0; font-family: inherit;
}
.clamp-toggle:hover { text-decoration: underline; }

/* ---------- Reviews ---------- */
.reviews-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(320px, 1fr);
  gap: 22px; overflow-x: auto; padding: 6px 4px 22px;
  scroll-snap-type: x mandatory;
}
.reviews-row::-webkit-scrollbar { height: 8px; }
.reviews-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.review {
  scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column; gap: 12px;
}
.review-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  background: var(--blue); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.review-head strong { display: block; color: var(--navy); }
.review-head time { font-size: .82rem; color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 2px; font-size: .95rem; }
.review p { color: var(--muted); font-size: .94rem; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; align-items: stretch; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px 30px; text-align: center;
  display: flex; flex-direction: column; gap: 8px; position: relative;
  transition: transform .22s ease, box-shadow .22s ease;
}
.price-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.price-card.featured { background: var(--navy); border-color: var(--navy); color: #fff; }
.price-card.featured h3, .price-card.featured .amount { color: #fff; }
.price-card.featured li { color: color-mix(in srgb, var(--navy) 20%, white); border-color: rgba(255,255,255,.12); }
.price-card.featured .per { color: var(--on-dark-accent); }
.price-card .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 14px; border-radius: 99px;
}
.price-card h3 { color: var(--navy); font-size: 1.15rem; font-weight: 800; }
.price-card .duration { color: var(--muted); font-size: .88rem; }
.price-card.featured .duration { color: var(--on-dark-accent); }
.price-card .amount { font-size: 2.6rem; font-weight: 800; color: var(--blue); line-height: 1; margin: 10px 0 2px; }
.price-card .per { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.price-card ul { list-style: none; text-align: left; margin: 6px 0 22px; }
.price-card li {
  padding: 9px 0 9px 26px; color: var(--muted); font-size: .93rem;
  border-bottom: 1px dashed var(--line); position: relative;
}
.price-card li:last-child { border-bottom: 0; }
.price-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--blue); font-weight: 700; }
.price-card.featured li::before { color: var(--on-dark-accent); }
.price-card .btn { margin-top: auto; }
.pricing-note { text-align: center; color: var(--muted); font-size: .92rem; margin-top: 26px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--cta-1), var(--cta-2));
  color: #fff; text-align: center; padding: 74px 24px;
}
.cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: 14px; }
.cta-band p { color: var(--on-dark-text); max-width: 640px; margin: 0 auto 28px; }

/* ---------- Info strip (address / hours / phone) ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.info-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; text-align: center;
}
.info-card .icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--kicker-tint);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.info-card .icon svg { width: 24px; height: 24px; stroke: var(--kicker); }
.info-card h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.08rem; }
.info-card p { color: var(--muted); font-size: .95rem; }

/* ---------- Article pages ---------- */
.article-wrap { max-width: 780px; margin: 0 auto; }
.article-meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.article-meta .dot::before { content: "•"; margin: 0 4px; }
.article-lead { font-size: 1.12rem; color: var(--ink); margin-bottom: 16px; }
.article-wrap > p { color: color-mix(in srgb, var(--navy) 76%, white); margin-bottom: 16px; }
.article-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); margin: 30px 0; width: 100%; }
.article-sign { font-weight: 700; color: var(--navy); font-style: italic; margin: 26px 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--focus-ring);
}
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- Booking iframe ---------- */
.booking-frame {
  width: 100%; min-height: 900px; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); background: #fff;
}
.map-frame {
  width: 100%; height: 400px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--footer-text); }
.footer-main {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 50px; padding: 70px 0 50px;
}
.footer-main img { height: 40px; width: auto; margin-bottom: 18px; }
.footer-main p { font-size: .93rem; }
.footer-main h4 {
  color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 18px;
}
.footer-main ul { list-style: none; }
.footer-main li { margin-bottom: 10px; }
.footer-main a { color: var(--footer-text); font-size: .93rem; }
.footer-main a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .85rem;
}
.footer-bottom a { color: var(--footer-text); }

/* ---------- Insurance logos ---------- */
.insurance-logos {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 30px 54px;
}
.insurance-logos img { height: 46px; width: auto; max-width: 170px; object-fit: contain; }
@media (max-width: 640px) {
  .insurance-logos { gap: 22px 32px; }
  .insurance-logos img { height: 34px; max-width: 130px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .pricing-grid, .info-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .split-media { order: 0; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 74px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 14px 24px 22px; gap: 4px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav .btn { margin: 10px 0 0; text-align: center; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .pricing-grid, .info-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 34px; }
  .section { padding: 60px 0; }
  .hero { min-height: 480px; }
}
