/* =========================================================
   Noste Fysioterapia – etusivun prototyyppi
   Brändivärit briiffistä, pääväri #ffcd83, toissijainen #87a59c
   Kaikki tekstin ja taustan yhdistelmät täyttävät WCAG 2.2 AA:n.
   ========================================================= */

:root {
  /* Brändivärit */
  --navy: #143a64;      /* teksti, yläpalkki, footer  */
  --blue: #00518e;      /* painike 2, sininen tausta   */
  --sky: #b1daf4;       /* vaalea tausta, liukuväri    */
  --yellow: #ffcd83;    /* PÄÄVÄRI: painike 1, neliöt  */
  --brown: #4f3918;     /* painike 3                   */
  --sage: #87a59c;      /* TOISSIJAINEN: pinnat, aksentit (ei leipätekstin tausta) */
  --white: #ffffff;

  /* Johdetut sävyt */
  --yellow-hover: #f5bd63;
  --blue-hover: #003f70;
  --brown-hover: #3a2a11;
  --sky-50: #eaf5fc;
  --sage-50: #edf2f0;
  --sage-30: #c3d2cc;
  --border: #5b7590;     /* 4.8:1 valkoista vasten – täyttää 3:1 ei-tekstikontrastin */
  --error: #b3261e;      /* 6.4:1 valkoista vasten */
  --error-bg: #fdf1f0;
  --success-bg: #eef5f1;

  /* Typografia */
  --font: "Quicksand", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-body: 1.0625rem;              /* 17px */
  --fs-lead: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.2vw, 3rem);       /* 34–48px */
  --fs-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.5rem);    /* 28–40px */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);     /* 20–24px */
  --fs-small: 0.9375rem;             /* 15px */

  /* Mitat */
  --site: 1680px;
  --container: 1240px;
  --gutter: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 0 20px 0 rgba(20, 58, 100, 0.12);
  --shadow-lg: 0 10px 40px -10px rgba(20, 58, 100, 0.25);
  --header-h: 84px;

  /* Fokus */
  --focus: var(--blue);
}

/* ---------- Perusnollaus ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h1 .light, h2 .light, h3 .light { font-weight: 400; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
abbr[title] { text-decoration: none; }
a { color: inherit; }

/* Leipätekstin linkit: keltainen korostusviiva tekstin takana, hoverissa koko tausta.
   Muoto (ei pelkkä väri) erottaa linkin, navy keltaisella 7.9:1. */
.link-inline, .Form-alt a, .Choice--consent a, .Form-errors a, .Form-success a, .Footer-desc a, .Kolumni-body p a, .Cta p a {
  font-weight: 700; text-decoration: none; color: inherit;
  padding: 0.05em 0.15em; margin: 0 -0.15em; border-radius: 3px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat; background-size: 100% 0.45em; background-position: 0 92%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 0.15s ease;
}
.link-inline:hover, .Form-alt a:hover, .Choice--consent a:hover, .Form-errors a:hover, .Form-success a:hover, .Footer-desc a:hover, .Kolumni-body p a:hover, .Cta p a:hover {
  background-size: 100% 100%;
}
.lead { font-size: var(--fs-lead); }
.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Fokus – näkyvä kaikkialla, väri vaihtuu tumman taustan mukaan */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.Band--blue, .Footer, .Topbar { --focus: var(--yellow); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Koko sivusto keskitetyssä palstassa kuten toimintaterapianoste.fi */
.Site { max-width: var(--site); margin-inline: auto; background: var(--white); }

/* Ohita sisältöön -linkki */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  background: var(--yellow); color: var(--navy); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; outline-color: var(--navy); }

/* ---------- Painikkeet ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.6rem 1.5rem; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(20, 58, 100, 0.35); }
.btn:active { transform: translateY(0); }
.btn--lg { min-height: 3.5rem; padding-inline: 2rem; font-size: 1.0625rem; }
.btn--primary { background: var(--yellow); color: var(--navy); }        /* 7.9:1 */
.btn--primary:hover { background: var(--yellow-hover); }                  /* 6.8:1 */
.btn--blue { background: var(--blue); color: var(--white); }              /* 8.2:1 */
.btn--blue:hover { background: var(--blue-hover); }
.btn--brown { background: var(--brown); color: var(--white); }            /* 10.9:1 */
.btn--brown:hover { background: var(--brown-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem;
  font-weight: 700; text-decoration: none;
}
.link-arrow span {
  padding: 0.05em 0.15em; margin: 0 -0.15em; border-radius: 3px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat; background-size: 100% 0.45em; background-position: 0 92%;
  transition: background-size 0.15s ease;
}
.link-arrow:hover span { background-size: 100% 100%; }
.link-arrow .icon { transition: transform 0.15s ease; }
.link-arrow:hover .icon { transform: translateX(4px); }

/* Pikku neliö (#ffcd83) */
.square { display: block; width: 1rem; height: 1rem; border-radius: 3px; background: var(--yellow); margin-bottom: 1rem; }

/* ---------- Yläpalkki ---------- */
.Topbar { background: var(--navy); color: var(--white); font-size: 0.9375rem; font-weight: 600; }
.Topbar-inner { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; min-height: 60px; }
.Topbar-brand { display: inline-flex; align-items: center; min-height: 44px; }
.Topbar-brand img { width: auto; height: 34px; }
.Topbar-contacts { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; white-space: nowrap; } /* yhteystiedot kielivalitsimen viereen oikealle */
.Topbar-contacts a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; text-decoration: none; }
.Topbar-contacts a:hover { color: var(--yellow); }
/* Yläpalkki näytetään vain leveillä näytöillä; kapeammilla kielivalitsin on headerissa (.Header-lang) */
@media (max-width: 1359px) { .Topbar { display: none; } }

/* ---------- Header ---------- */
.Header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  transition: box-shadow 0.2s ease;
}
.Header.is-scrolled { box-shadow: 0 4px 24px -8px rgba(20, 58, 100, 0.2); }
.Header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.Header-logo { display: inline-flex; align-items: center; min-height: 44px; }
.Header-logo img { width: auto; height: 54px; }
.Header-right { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem); margin-left: auto; }
.Header-lang ul { display: flex; align-items: center; gap: 0.125rem; margin: 0; padding: 0; list-style: none; }
.Header-lang a, .Header-lang span[aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.5rem; border-radius: 999px; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; color: var(--navy); }
.Header-lang a { opacity: 0.7; }
.Header-lang a:hover, .Header-lang a:focus-visible { opacity: 1; background: var(--sky-50); }
.Header-lang span[aria-current] { background: var(--sky); }
@media (min-width: 1360px) { .Header-lang { display: none; } } /* yläpalkin lippuvalitsin käytössä */
@media (max-width: 599px) {
  :root { --header-h: 68px; }
  .Header-inner { gap: 0.5rem; }
  .Header-logo img { height: 40px; }
  .Header-right { gap: 0.5rem; }
  /* Kapealla näytetään vain linkki toiseen kieleen (esim. "EN"), jotta logo, kieli ja CTA mahtuvat yhdelle riville */
  .Header-lang li.is-active { display: none; }
  .Header-lang a { min-width: 2.75rem; padding: 0 0.5rem; font-size: 0.875rem; opacity: 1; background: var(--sky-50); }
  .Header-cta { min-height: 2.75rem; padding-inline: 1rem; font-size: 0.9375rem; gap: 0.4rem; white-space: nowrap; }
}
@media (max-width: 419px) {
  .Header-logo img { height: 36px; }
  .Header-cta { padding-inline: 0.85rem; font-size: 0.875rem; }
  .Header-cta .icon { display: none; }
}

/* ---------- Hero ---------- */
.Hero { position: relative; background: var(--white); }
.Hero-media img { width: 100%; height: 100%; object-fit: cover; }
.Hero-content h1 { margin-bottom: 0.5em; }
.Hero-sub { font-size: var(--fs-lead); font-weight: 500; line-height: 1.5; margin-bottom: 1.25rem; }
.Hero-kela { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35em 0.5em; font-weight: 600; font-size: 1.125rem; margin: 0; }
/* Kela-logon sanamerkki on SVG:n alaosassa (kruunu yllä), joten logoa nostetaan hieman jotta sana istuu tekstin keskilinjaan */
.Hero-kela img { height: 1.9em; width: auto; position: relative; top: -0.3em; }

@media (min-width: 1200px) {
  /* Korkeus kuvasuhteesta (n. 2.3:1 kuten toimintaterapianoste.fi) minimikorkeutena: sisältö ei koskaan leikkaudu */
  .Hero { display: grid; min-height: min(760px, 43.5vw); }
  .Hero-media { position: absolute; inset: 0; overflow: hidden; }
  .Hero-media picture { height: 100%; }
  /* Valkoinen liukuväri takaa tekstin kontrastin kuvan päällä */
  .Hero-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 32%, rgba(255,255,255,0.86) 48%, rgba(255,255,255,0.96) 100%);
  }
  .Hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-content: center; padding-block: 3rem 5rem; }
  /* Tekstilohko on sisältönsä levyinen ja keskitetty oikeaan puoliskoon: tyhjä tila jakautuu tasan lohkon molemmin puolin kielestä ja otsikon pituudesta riippumatta */
  .Hero-content { grid-column: 2; justify-self: center; width: fit-content; max-width: 100%; padding-inline: clamp(1rem, 2vw, 1.75rem); box-sizing: border-box; }
  .Hero-content .Hero-sub { max-width: 36ch; }
  .Hero-content h1 { font-size: clamp(2.125rem, 1.5rem + 2vw, 2.875rem); } /* hieman pienempi kuin yleinen h1, jotta lohkolle jää marginaalit */
}
@media (max-width: 1199px) {
  /* Pinottu: kuva ylhäällä, teksti alla */
  .Hero-media { aspect-ratio: 16 / 9; max-height: 560px; overflow: hidden; }
  .Hero-media picture, .Hero-media img { height: 100%; }
  .Hero-inner { padding-block: clamp(1.5rem, 3vw, 2.5rem) 1rem; }
  .Hero-content { max-width: 720px; }
  .Hero-content h1 br { display: none; }
}
@media (max-width: 599px) {
  .Hero-media { aspect-ratio: 4 / 3; max-height: none; }
  .Hero-kela { font-size: 1rem; }
}

/* ---------- Ajanvarausboksi (1-osainen) ---------- */
.Boxi-wrap { position: relative; z-index: 2; padding-bottom: 1rem; }
.Boxi {
  position: relative; text-align: center;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 4rem);
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--white) 0%, var(--sky) 100%);
  box-shadow: var(--shadow-lg);
}
.Boxi .square { position: absolute; top: 1.5rem; left: 1.5rem; margin: 0; }
.Boxi h2 { margin-bottom: 0.35em; }
.Boxi-sub { font-size: var(--fs-lead); font-weight: 600; margin-bottom: 1.25rem; }
.Boxi p { max-width: 62ch; margin-inline: auto; margin-bottom: 1.75rem; }
.Boxi .btn-row { justify-content: center; }
@media (min-width: 1200px) { .Boxi-wrap { margin-top: -3.5rem; } }
@media (max-width: 1199px) { .Boxi-wrap { margin-top: 1rem; } }

.Chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0 auto 1.5rem; max-width: 720px; }
.Chips li {
  padding: 0.45rem 1.1rem; border-radius: 999px;
  background: var(--white); color: var(--navy); font-weight: 700; font-size: 1rem;
  border: 2px solid var(--sage);
}

/* ---------- Osiot ---------- */
.Section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.Section--tight { padding-top: 0; }
.Section-head { max-width: 760px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.Section-head h2 { margin-bottom: 0.4em; }

/* ---------- Kaksipalstainen kolumniryhmä ---------- */
.Kolumni { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.Kolumni--sky, .Kolumni--boxed { padding: clamp(1.25rem, 3vw, 3rem); border-radius: var(--radius); background: var(--sky); }
.Kolumni--blue { background: var(--blue); color: var(--white); --focus: var(--yellow); }
.Kolumni--yellow { background: var(--yellow); color: var(--navy); --focus: var(--navy); }
.Band--sky { background: var(--sky); color: var(--navy); }
.Kolumni-media img { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.Kolumni-body h2 { margin-bottom: 0.5em; }
.Kolumni-body p { margin-bottom: 1.5rem; }
@media (min-width: 900px) {
  .Kolumni { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .Kolumni--reverse .Kolumni-body { order: 1; }
  .Kolumni--reverse .Kolumni-media { order: 2; }
}

/* ---------- Kolumnilaatikot ---------- */
.Cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.Card {
  padding: 2rem 1.75rem; border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  border-top: 6px solid var(--yellow);
}
.Card h3 { margin-bottom: 0.5em; }
.Card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.25rem; height: 3.25rem; margin-bottom: 1.25rem; border-radius: 50%;
  background: var(--sky); color: var(--navy);   /* #b1daf4, navy-ikoni 7.8:1 */
}
.Card-icon svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Sininen tausta ---------- */
.Band { padding-block: clamp(3rem, 6vw, 5.5rem); }
.Band--blue { background: var(--blue); color: var(--white); }
.Band--blue .Kolumni-media img { box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4); }

/* ---------- Lomakeosio ---------- */
.Section--form { background: var(--sky-50); scroll-margin-top: calc(var(--header-h) + 1rem); padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.Form-layout { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
@media (min-width: 900px) { .Form-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.Form-intro h2 { margin-bottom: 0.5em; }
.Form-figure { margin: 2rem 0; max-width: 420px; }
.Form-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 899px) { .Form-figure { display: none; } }
.Form-alt { font-size: var(--fs-small); }

.Form { padding: clamp(1.5rem, 3vw, 3rem); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.Form-required-note { font-size: var(--fs-small); margin-bottom: 1.5rem; }
.Form-grid { display: grid; gap: 1.25rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .Form-grid { grid-template-columns: 1fr 1fr; } .Field--full { grid-column: 1 / -1; } }

.Field { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.Field label, .Field legend { font-weight: 700; font-size: 1rem; }
.Field legend { padding: 0; margin-bottom: 0.4rem; }
.Field abbr { color: var(--error); font-weight: 700; margin-left: 0.15em; }
.Field input[type="text"], .Field input[type="tel"], .Field input[type="email"], .Field textarea {
  width: 100%; min-height: 3rem; padding: 0.65rem 0.9rem;
  font: inherit; color: var(--navy); background: var(--white);
  border: 2px solid var(--border); border-radius: 10px;
  transition: border-color 0.15s ease;
}
.Field textarea { resize: vertical; min-height: 8rem; }
.Field ::placeholder { color: var(--border); opacity: 1; font-weight: 500; }  /* #5b7590, 4.8:1 valkoista vasten */
.Field input:hover, .Field textarea:hover { border-color: var(--navy); }
.Field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):focus-visible,
.Field textarea:focus-visible {
  /* Vaalea halo + sininen reuna: reuna antaa 3:1-kontrastin, halo pehmentää */
  border-color: var(--blue); outline: none;
  box-shadow: 0 0 0 4px var(--sky);
}
.Field-hint { font-size: var(--fs-small); margin: 0; }
.Field-error { display: none; margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--error); }
.Field-error::before { content: "⚠ "; }
.Field.has-error .Field-error { display: block; }
.Field.has-error input:not([type="radio"]):not([type="checkbox"]), .Field.has-error textarea { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }

.Choice-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.Choice { display: inline-flex; align-items: flex-start; gap: 0.65rem; min-height: 2.75rem; font-weight: 600; cursor: pointer; }
.Choice input { width: 1.375rem; height: 1.375rem; margin: 0.15rem 0 0; flex: 0 0 auto; accent-color: var(--blue); cursor: pointer; }
.Choice--consent { font-weight: 500; }
.Field.has-error .Choice input { outline: 2px solid var(--error); outline-offset: 2px; border-radius: 3px; }

.Field input[type="file"] { font: inherit; font-size: var(--fs-small); color: var(--navy); padding: 0.35rem 0; }
.Field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; color: var(--navy); background: var(--white);
  border: 2px solid var(--navy); border-radius: 999px; padding: 0.5rem 1.1rem; margin-right: 0.9rem; cursor: pointer;
}
.Field input[type="file"]::file-selector-button:hover { background: var(--sky-50); }

/* ---------- Yhdistelmäkenttä (combobox) ---------- */
.Combobox, .gform_wrapper .Combobox { position: relative; }
.Combobox input { padding-right: 3rem; }
.Combobox-toggle {
  position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 8px; background: transparent; color: var(--navy); cursor: pointer;
}
.Combobox-toggle .icon { width: 1.35rem; height: 1.35rem; transition: transform 0.15s ease; }
.Combobox-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.Combobox-toggle:hover { background: var(--sky-50); }
.Combobox-list, .gform_wrapper .Combobox-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.4rem);
  margin: 0; padding: 0.4rem; list-style: none;
  background: var(--white); border: 2px solid var(--sky); border-radius: 12px;
  box-shadow: var(--shadow-lg); max-height: 18rem; overflow-y: auto;
}
.Combobox-list [role="option"] {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 2.75rem; padding: 0.55rem 0.9rem; border-radius: 8px;
  font-weight: 600; color: var(--navy); cursor: pointer;
}
.Combobox-list [role="option"]:hover { background: var(--sky-50); }
.Combobox-list [role="option"].is-active { background: var(--sky-50); }
.Combobox-list [role="option"][aria-selected="true"]::after {
  content: ""; width: 0.6rem; height: 1rem; margin-right: 0.3rem;
  border: solid var(--blue); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.Combobox-empty { padding: 0.6rem 0.9rem; font-size: var(--fs-small); }

/* Pudotusvalikko (select-only combobox): painike korvaa natiivin selectin, joka jää piiloon lomakkeeseen */
.Combobox-native { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; border: 0 !important; opacity: 0 !important; }
.Combobox-button {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  width: 100%; min-height: 3rem; padding: 0.65rem 0.6rem 0.65rem 0.9rem;
  font: inherit; font-size: 1.0625rem; font-weight: 500; text-align: left; color: var(--navy);
  background: var(--white); border: 2px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color 0.15s ease;
}
.Combobox-button:hover { border-color: var(--navy); }
.Combobox-button:focus-visible { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px var(--sky); }
.Combobox-button[aria-invalid="true"], .gfield_error .Combobox-button { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.Combobox-button.is-placeholder .Combobox-value { color: var(--border); }
.Combobox-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.Combobox-button .icon { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s ease; }
.Combobox-button[aria-expanded="true"] .icon { transform: rotate(180deg); }
/* Gravity Formsin painiketyylit eivät saa periytyä pudotusvalikon painikkeeseen */
.gform_wrapper.gform-theme--orbital .Combobox-button, .gform_wrapper.gform-theme--orbital .Combobox-button:hover, .gform_wrapper.gform-theme--orbital .Combobox-button:focus {
  display: flex; inline-size: 100%; width: 100%; block-size: auto; min-height: var(--gf-ctrl-size, 3rem); min-block-size: var(--gf-ctrl-size, 3rem);
  padding: 0.65rem 0.6rem 0.65rem 0.9rem; margin: 0; line-height: 1.3; letter-spacing: normal; text-transform: none; text-align: left;
  font-family: inherit; font-size: var(--gf-ctrl-font-size, 1.0625rem); font-weight: var(--gf-ctrl-font-weight, 500); color: var(--navy);
  background: var(--white); border: 2px solid var(--border); border-radius: 10px; box-shadow: none; transform: none; opacity: 1;
  align-items: center; justify-content: space-between; gap: 0.75rem;
}
.gform_wrapper.gform-theme--orbital .Combobox-value { flex: 1 1 auto; min-width: 0; }
.gform_wrapper.gform-theme--orbital .Combobox-button .icon { flex: 0 0 auto; margin-left: auto; width: 1.35rem; height: 1.35rem; }
.gform_wrapper.gform-theme--orbital .Combobox-button:hover { border-color: var(--navy); }
.gform_wrapper.gform-theme--orbital .Combobox-button:focus-visible { border-color: var(--blue); outline: none; box-shadow: 0 0 0 4px var(--sky); }
.gform_wrapper.gform-theme--orbital .Combobox-button[aria-invalid="true"], .gform_wrapper.gform-theme--orbital .gfield_error .Combobox-button { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.gform_wrapper.gform-theme--orbital .Combobox-list { font-size: 1.0625rem; }
.gform_wrapper.gform-theme--orbital .Combobox-list [role="option"] { margin: 0; }

.Form-actions { margin-top: 2rem; }
.Form-errors {
  margin-bottom: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  background: var(--error-bg); border: 2px solid var(--error);
}
.Form-errors h3 { font-size: 1.125rem; margin-bottom: 0.4em; }
.Form-errors ul { list-style: disc; padding-left: 1.25rem; }
.Form-errors a { font-weight: 700; }
.Form-success { margin-top: 1.5rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-sm); background: var(--success-bg); border: 2px solid var(--sage); }
.Form-success h3 { font-size: 1.25rem; margin-bottom: 0.3em; }

/* ---------- Call to action (pääväri pintana, menee footerin päälle) ---------- */
.Cta-wrap { position: relative; z-index: 2; padding-top: clamp(1rem, 2vw, 2rem); margin-bottom: -5rem; }
/* Vaalea sininen tausta jatkuu lomakeosiosta footerin yläreunaan asti (päättyy siihen, mistä footer alkaa) */
.Cta-wrap::before { content: ""; position: absolute; z-index: -1; inset: 0 0 5rem 0; background: var(--sky-50); }
/* CTA on sisältöpalstaa leveämpi kuten toimintaterapianoste.fi: 1440 px (Figma) vs. 1240 px */
.Cta-wrap > .container { max-width: calc(1440px + 2 * var(--gutter)); }
.Cta {
  text-align: center; padding: clamp(2.5rem, 6vw, 6.5rem) clamp(1.25rem, 5vw, 5rem);
  border-radius: var(--radius); background: var(--yellow); color: var(--navy);
  box-shadow: var(--shadow-lg);
}
.Cta p { max-width: 60rem; margin: 0 auto 2rem; font-size: var(--fs-lead); }
.Cta .btn-row { justify-content: center; }
.Cta .btn:focus-visible { outline-color: var(--navy); }

/* ---------- Footer ---------- */
.Footer { position: relative; background: var(--navy); color: var(--white); padding-top: calc(5rem + clamp(2.5rem, 5vw, 4rem)); }
.Footer a { text-decoration: none; }
.Footer a:hover { color: var(--yellow); }
.Footer-inner { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 900px) {
  /* Briiffin mukaan: linkit vasemmalla, logo ja yhteystiedot oikealla */
  .Footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .Footer-nav { order: 1; }
  .Footer-brand { order: 2; }
}
.Footer-logo { height: 54px; width: auto; margin-bottom: 1.75rem; }
.Footer-contacts { display: grid; gap: 0.35rem; margin-bottom: 1.5rem; }
.Footer-contacts li { display: flex; align-items: center; gap: 0.65rem; min-height: 2.75rem; }
.Footer-contacts .icon { width: 1.25rem; height: 1.25rem; color: var(--yellow); }
.Footer-desc { font-size: var(--fs-small); max-width: 62ch; }
.Footer-nav ul { display: grid; gap: 0.25rem; }
.Footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; font-size: 1.0625rem; }
.Footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.2); padding-block: 1.25rem; font-size: var(--fs-small); }

/* ---------- Apuluokat ---------- */
[hidden] { display: none !important; }

/* =========================================================
   WordPress-kohtaiset lisäykset
   ========================================================= */

/* Sivun otsikko sivuilla, joilla ei ole heroa */
.Page-head { padding-top: clamp(2rem, 4vw, 3.5rem); }

/* Vapaa Gutenberg-sisältö rajataan sisältöpalstaan; teeman lohkot (.nf-block) hoitavat leveytensä itse */
.entry-content > :not(.nf-block):not(.alignfull) { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.entry-content > .alignwide { max-width: calc(1440px + 2 * var(--gutter)); }
.entry-content > :not(.nf-block) { margin-block: 0 1.25rem; }
.entry-content > :not(.nf-block):first-child { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.entry-content > :not(.nf-block):last-child { margin-bottom: clamp(3rem, 6vw, 5rem); }
.entry-content > h2:not(.nf-block), .entry-content > h3:not(.nf-block) { margin-top: 2rem; }
.entry-content ul:not([class]), .entry-content ol:not([class]) { padding-left: 1.5rem; }
.entry-content ul:not([class]) { list-style: disc; }
.entry-content ol:not([class]) { list-style: decimal; }
.entry-content > p a, .entry-content li a, .Osio p a, .Osio li a { font-weight: 700; text-decoration: none; padding: 0.05em 0.15em; margin: 0 -0.15em; border-radius: 3px; background-image: linear-gradient(var(--yellow), var(--yellow)); background-repeat: no-repeat; background-size: 100% 0.45em; background-position: 0 92%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 0.15s ease; }
.entry-content > p a:hover, .entry-content li a:hover, .Osio p a:hover, .Osio li a:hover { background-size: 100% 100%; }

/* Osio-lohko: vapaa sisältö valitulla taustalla */
.Osio { padding-block: clamp(3rem, 6vw, 5.5rem); }
.Osio--keltainen { background: var(--yellow); color: var(--navy); --focus: var(--navy); }
.Osio--sky { background: var(--sky); color: var(--navy); }
.Osio--sininen { background: var(--blue); color: var(--white); --focus: var(--yellow); }
.Osio--sininen p a, .Osio--sininen li a { color: var(--white); background-image: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.Osio .container > * + * { margin-block-start: 1.25rem; }
.Osio .container > h2 + *, .Osio .container > h3 + * { margin-block-start: 0.75rem; }
.container--wide { max-width: calc(1440px + 2 * var(--gutter)); }

/* Kolumniryhmän lisätausta */
.Band--yellow { background: var(--yellow); color: var(--navy); --focus: var(--navy); }
.Band--yellow .Kolumni-media img { box-shadow: 0 10px 40px -10px rgba(79, 57, 24, 0.35); }

/* Kolumnilaatikoiden variantit */
.Card--sky { background: var(--sky); }
.Card--flat { box-shadow: none; border: 2px solid var(--sky); border-top-width: 6px; }
.Card--sky.Card--flat { border-color: var(--white); border-top-color: var(--yellow); }

/* WordPressin peruspainikkeet noudattavat teeman painiketyyliä */
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0.6rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; background: var(--yellow); color: var(--navy); border: 2px solid transparent; transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.wp-block-button__link:hover { background: var(--yellow-hover); transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(20, 58, 100, 0.35); }
.is-style-outline > .wp-block-button__link { background: transparent; border-color: currentColor; }

/* Päävalikko (tulee käyttöön myöhemmin) */
.Header-nav { margin-left: auto; margin-right: 1.5rem; }
.Header-menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.Header-menu a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; text-decoration: none; }
.Header-menu a:hover { color: var(--blue); }
.Header-menu .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--yellow); }
@media (max-width: 899px) { .Header-nav { display: none; } }

/* Kuvatekstit ja arkistolistaus */
.wp-block-image figcaption, .wp-element-caption { font-size: var(--fs-small); margin-top: 0.5rem; }
.Teaser + .Teaser { margin-top: 2rem; }
.Teaser h2 a { text-decoration: none; }
.Teaser h2 a:hover { color: var(--blue); }
.nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; border-radius: 999px; border: 2px solid var(--sky); text-decoration: none; font-weight: 700; }
.nav-links .page-numbers.current { background: var(--yellow); border-color: var(--yellow); }

/* Lohkon paikkamerkki editorissa */
.nf-placeholder { padding: 2rem 1.5rem; margin: 1rem auto; max-width: var(--container); border: 2px dashed var(--border); border-radius: var(--radius-sm); background: var(--sky-50); color: var(--navy); text-align: center; }
.nf-placeholder strong { display: block; font-size: 1.125rem; margin-bottom: 0.25rem; }
.nf-placeholder span { display: block; font-size: var(--fs-small); }

/* Näytönlukijalle */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   Gravity Forms (Orbital-teema) teeman ilmeeseen
   ========================================================= */
.gform_wrapper.gform-theme--orbital {
  font-family: inherit;
  /* Värit */
  --gf-color-primary: var(--navy);
  --gf-color-primary-rgb: 20, 58, 100;
  --gf-color-primary-contrast: var(--white);
  --gf-color-primary-darker: var(--blue);
  --gf-color-primary-lighter: var(--sky);
  --gf-color-secondary: var(--white);
  --gf-color-in-control: var(--navy);
  --gf-color-in-control-secondary: var(--border);
  --gf-color-danger: var(--error);
  --gf-color-danger-rgb: 179, 38, 30;
  --gf-color-danger-contrast: var(--white);
  --gf-color-danger-lighter: var(--error-bg);
  --gf-color-out-ctrl-light: var(--navy);
  --gf-color-out-ctrl-light-darker: var(--navy);
  --gf-color-out-ctrl-light-lighter: var(--navy);
  /* Typografia */
  --gf-font-family: inherit;
  --gf-font-size-secondary: 1rem;
  --gf-font-size-tertiary: 0.9375rem;
  --gf-ctrl-label-color-primary: var(--navy);
  --gf-ctrl-label-color-secondary: var(--navy);
  --gf-ctrl-label-font-weight-primary: 700;
  --gf-ctrl-label-font-size-primary: 1rem;
  --gf-ctrl-desc-color: var(--navy);
  --gf-ctrl-desc-font-size: 0.9375rem;
  --gf-ctrl-desc-font-weight: 500;
  /* Kentät */
  --gf-ctrl-size: 3rem;
  --gf-ctrl-radius: 10px;
  --gf-ctrl-border-width: 2px;
  --gf-ctrl-border-color: var(--border);
  --gf-ctrl-border-color-hover: var(--navy);
  --gf-ctrl-border-color-focus: var(--blue);
  --gf-ctrl-border-color-error: var(--error);
  --gf-ctrl-shadow-focus: 0 0 0 4px var(--sky);
  --gf-ctrl-shadow-error: 0 0 0 1px var(--error);
  --gf-ctrl-bg-color: var(--white);
  --gf-ctrl-color: var(--navy);
  --gf-ctrl-font-weight: 500;
  --gf-ctrl-font-size: 1.0625rem;
  --gf-ctrl-placeholder-color: var(--border);
  --gf-ctrl-textarea-min-block-size: 8rem;
  /* Valintanapit ja -ruudut */
  --gf-ctrl-choice-size: 1.375rem;
  --gf-ctrl-choice-check-bg-color-checked: var(--blue);
  --gf-ctrl-choice-check-border-color-checked: var(--blue);
  --gf-ctrl-choice-radio-bg-color-checked: var(--white);
  --gf-ctrl-choice-radio-border-color-checked: var(--blue);
  --gf-ctrl-choice-radio-check-color: var(--blue);
  --gf-ctrl-choice-radio-check-size: 0.6rem;
  /* Painike */
  --gf-ctrl-btn-font-family: inherit;
  --gf-ctrl-btn-font-weight: 700;
  --gf-ctrl-btn-font-size: 1.0625rem;
  --gf-ctrl-btn-radius: 999px;
  --gf-ctrl-btn-size: 3.5rem;
  --gf-ctrl-btn-padding-x-primary: 2rem;
  --gf-ctrl-btn-color-primary: var(--navy);
  --gf-ctrl-btn-bg-color-primary: var(--yellow);
  --gf-ctrl-btn-border-color-primary: var(--yellow);
  --gf-ctrl-btn-color-hover-primary: var(--navy);
  --gf-ctrl-btn-bg-color-hover-primary: var(--yellow-hover);
  --gf-ctrl-btn-border-color-hover-primary: var(--yellow-hover);
  --gf-ctrl-btn-color-focus-primary: var(--navy);
  --gf-ctrl-btn-bg-color-focus-primary: var(--yellow-hover);
  --gf-ctrl-btn-shadow-focus-primary: none;
  /* Pakollisuustähti kuten prototyypissä: punainen, lihavoitu, tekstin kokoinen */
  --gf-ctrl-label-color-req: var(--error);
  --gf-ctrl-label-font-size-req: 1rem;
  --gf-ctrl-label-font-weight-req: 700;
  /* Valintanappien ja -ruutujen tekstit */
  --gf-ctrl-label-font-size-secondary: 1rem;
  --gf-ctrl-label-font-weight-secondary: 600;
  --gf-ctrl-label-color-secondary: var(--navy);
  /* Placeholder haaleana mutta AA-kontrastilla (#5b7590, 4.8:1) */
  --gf-ctrl-placeholder-color: var(--border);
  --gf-ctrl-placeholder-opacity: 1;
  --gf-ctrl-placeholder-font-weight: 500;
  /* Tekstialue */
  --gf-ctrl-textarea-height: 8rem;
  --gf-ctrl-textarea-radius: 10px;
  /* Välit */
  --gf-form-gap-y: 1.25rem;
  --gf-form-gap-x: 1.5rem;
  --gf-field-gap-y: 0.4rem;
  --gf-field-gap-x: 1.5rem;
  --gf-label-space-primary: 0.4rem;
  --gf-label-space-tertiary: 0.4rem;
  --gf-label-space-y-secondary: 0;
  --gf-label-space-x-secondary: 0.65rem;
}
/* Lähetyspainike samalla nuoli-ikonilla kuin teeman muut painikkeet */
.gform_wrapper.gform-theme--orbital .gform_footer .gform_button { display: inline-flex; align-items: center; gap: 0.6rem; }
.gform_wrapper.gform-theme--orbital .gform_footer .gform_button .icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gform_wrapper.gform-theme--orbital .gform_footer .gform_button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(20, 58, 100, 0.35); }
.gform_wrapper.gform-theme--orbital .gform_required_legend { font-size: var(--fs-small); margin-bottom: 1.5rem; color: var(--navy); }
.gform_wrapper.gform-theme--orbital .gfield_required { color: var(--error); font-weight: 700; }
.gform_wrapper.gform-theme--orbital .gfield_label { margin-bottom: 0.4rem; }
.gform_wrapper.gform-theme--orbital .gfield_description { color: var(--navy); }
.gform_wrapper.gform-theme--orbital .gform_fileupload_rules { display: none; } /* Sama tieto on kentän kuvauksessa suomeksi */
.gform_wrapper.gform-theme--orbital .gfield_validation_message,
.gform_wrapper.gform-theme--orbital .validation_message { background: transparent; border: 0; padding: 0; margin-top: 0.4rem; font-weight: 700; font-size: var(--fs-small); color: var(--error); }
.gform_wrapper.gform-theme--orbital .gfield_validation_message::before { content: "⚠ "; }
.gform_wrapper.gform-theme--orbital .gform_validation_errors { border: 2px solid var(--error); border-radius: var(--radius-sm); background: var(--error-bg); box-shadow: none; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.gform_wrapper.gform-theme--orbital .gform_validation_errors > h2 { font-size: 1.125rem; color: var(--navy); font-weight: 700; }
.gform_wrapper.gform-theme--orbital .gform_validation_errors a { color: var(--navy); font-weight: 700; }
.gform_wrapper.gform-theme--orbital .gform_footer { margin-top: 2rem; padding: 0; }
.gform_wrapper.gform-theme--orbital .gform_button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gform_wrapper.gform-theme--orbital input[type="file"]::file-selector-button { font: inherit; font-weight: 700; color: var(--navy); background: var(--white); border: 2px solid var(--navy); border-radius: 999px; padding: 0.5rem 1.1rem; margin-right: 0.9rem; cursor: pointer; }
.gform_wrapper.gform-theme--orbital input[type="file"]::file-selector-button:hover { background: var(--sky-50); }
.gform_wrapper.gform-theme--orbital .ginput_container_consent .gfield_consent_label { font-weight: 500; }
.gform_wrapper.gform-theme--orbital .ginput_container_consent a { font-weight: 700; text-decoration: none; padding: 0.05em 0.15em; margin: 0 -0.15em; border-radius: 3px; background-image: linear-gradient(var(--yellow), var(--yellow)); background-repeat: no-repeat; background-size: 100% 0.45em; background-position: 0 92%; transition: background-size 0.15s ease; }
.gform_wrapper.gform-theme--orbital .ginput_container_consent a:hover { background-size: 100% 100%; }
.gform_confirmation_message { padding: 1.25rem 1.5rem; border-radius: var(--radius-sm); background: var(--success-bg); border: 2px solid var(--sage); }
.gform_confirmation_message h3 { font-size: 1.25rem; margin-bottom: 0.3em; }
/* Tiedostokenttä ilman Orbitalin kehystä, jotta valintapainike ei leikkaudu */
.gform_wrapper.gform-theme--orbital input[type="file"] { border: 0; box-shadow: none; background: transparent; padding: 0.35rem 0; min-block-size: auto; block-size: auto; height: auto; }
.gform_wrapper.gform-theme--orbital input[type="file"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* Valintanappien ja -ruutujen tekstit samalla koolla kuin muu teksti */
.gform_wrapper.gform-theme--orbital .gchoice label,
.gform_wrapper.gform-theme--orbital .gfield_consent_label { font-size: 1rem; font-weight: 600; color: var(--navy); }
.gform_wrapper.gform-theme--orbital .gfield_consent_label { font-weight: 500; }
.gform_wrapper.gform-theme--orbital input[type="file"]::file-selector-button { block-size: auto; inline-size: auto; height: auto; min-height: 2.5rem; line-height: 1.2; padding: 0.5rem 1.1rem; margin: 0 0.9rem 0 0; overflow: visible; }
/* Tekstialue prototyypin korkuinen (GF antaa rows-attribuutin, joka kasvattaa korkeutta) */
.gform_wrapper.gform-theme--orbital .gfield textarea { height: 8rem !important; min-height: 8rem !important; block-size: 8rem !important; min-block-size: 8rem !important; resize: vertical; }

/* =========================================================
   Osioiden välistysvalinnat (ACF: Välistys ylhäällä / alhaalla)
   ========================================================= */
.nf-block.pt-0 { padding-top: 0 !important; }
.nf-block.pb-0 { padding-bottom: 0 !important; }
.nf-block.pt-s { padding-top: clamp(1.5rem, 3vw, 2.5rem) !important; }
.nf-block.pb-s { padding-bottom: clamp(1.5rem, 3vw, 2.5rem) !important; }
.nf-block.pt-l { padding-top: clamp(4.5rem, 9vw, 8rem) !important; }
.nf-block.pb-l { padding-bottom: clamp(4.5rem, 9vw, 8rem) !important; }
/* CTA:n ylävälistys ja boksin alavälistys ovat näiden lohkojen ainoat säädettävät reunat */
.Cta-wrap.pt-0 { padding-top: 0 !important; }
.Boxi-wrap.pb-0 { padding-bottom: 0 !important; }
.Boxi-wrap.pb-s { padding-bottom: clamp(1.5rem, 3vw, 2.5rem) !important; }
.Boxi-wrap.pb-l { padding-bottom: clamp(4.5rem, 9vw, 8rem) !important; }

/* ---------- Kielivalitsin yläpalkissa (sama tyyli kuin terapiatalonoste.fi) ---------- */
.Topbar-lang { margin-left: 1.5rem; }
.Topbar-lang ul { display: flex; margin: 0; padding: 0; list-style: none; }
.Topbar-lang li { margin: 0; }
.Topbar-lang a, .Topbar-lang span[aria-current] { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; color: var(--white); text-decoration: none; }
.Topbar-lang img { width: 26px; height: 26px; border-radius: 50%; opacity: 0.7; transition: opacity 0.2s ease; }
.Topbar-lang li.is-active span[aria-current] { background: #08203b; }
.Topbar-lang li.is-active img, .Topbar-lang a:hover img, .Topbar-lang a:focus-visible img { opacity: 1; }
.Topbar-lang a:focus-visible { outline-offset: -4px; }
