/*
Theme Name: Nutiring
Theme URI: https://nutiring.ee
Author: Nutiring OÜ
Description: Nutiringi kohandatud teema — üheleheline scrollitav sait, mille kogu sisu on hallatav ACF väljade ja päevakeskuste/tagasiside kirjete kaudu. Ilma page builderita, puhas PHP/HTML/CSS.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nutiring
Tags: one-page, custom-colors, accessibility-ready
*/

/* ==========================================================================
   NUTIRING — style.css
   Sisukord:
     1. Muutujad (värvid, fondid, mõõdud)
     2. Alused ja abiklassid
     3. Päis + navigatsioon
     4. Nupud
     5. Hero + kerimisnooled
     6. LOGO (staatiline pilt)
     7. Tagasiside karusell
     8. Missioon (interaktiivne klassiruum: tahvel / õpetaja / õpilased)
     9. Teenused
    10. Kus toimub (kaardid)
    11. Kontakt
    12. Jalus
    13. Responsiivsus
    14. WordPressi-spetsiifiline (admin-riba, sisulehed)
    15. Küsimused ja vastused (lehe päis, vorm, kaardid, filtrid)
   ========================================================================== */

/* ---------------------------------------------------------------- 1. MUUTUJAD */
:root {
  /* Brändivärvid — muuda ainult neid, kogu leht järgneb */
  --brand-dark: #001f65;
  --brand-light: #6895fd;
  --brand-gradient: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-light) 100%);

  /* Tekst ja pinnad */
  --ink: #10193a;
  --ink-soft: #4a5578;
  --ink-muted: #7c86a3;
  --surface: #ffffff;
  --surface-alt: #f4f7ff;
  --border: #dbe3f8;
  --white: #ffffff;

  /* Fondid */
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  /* Mõõdud */
  --maxw: 1120px;
  --maxw-narrow: 760px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --gap: 18px;
  --shadow: 0 12px 32px rgba(0, 31, 101, .10);
  --shadow-soft: 0 4px 14px rgba(0, 31, 101, .07);
}

/* ------------------------------------------------- 2. ALUSED JA ABIKLASSID */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;           /* sujuv kerimine ankurlinkidel */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;                   /* suurem baastekst — sihtgrupp 55+ */
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
}

img, svg { display: block; max-width: 100%; }

a { color: var(--brand-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0; }

:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Ekraanilugejale nähtav, visuaalselt peidetud (nt "Liigu sisu juurde") */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 20px;
  clip: auto;
  background: var(--white);
  color: var(--brand-dark);
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow { max-width: var(--maxw-narrow); }

.section {
  padding: 88px 0;
  scroll-margin-top: var(--header-h);  /* et päis ei kataks pealkirja */
}
.section--light { background: var(--surface-alt); }
.section--brand { background: var(--brand-gradient); }

.eyebrow {
  margin: 0 0 10px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.eyebrow--light { color: rgba(255, 255, 255, .85); }

.section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -.01em;
  margin-bottom: 28px;
  color: var(--brand-dark);
}
.section__title--light { color: var(--white); }

/* ------------------------------------------------- 3. PÄIS + NAVIGATSIOON */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 31, 101, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--white);
}
/* Logo sisaldab juba sõna "Nutiring", seetõttu kõrval eraldi teksti ei ole.
   Kõrgus on fikseeritud, laius järgneb pildi proportsioonile (1292 × 551). */
.brand__mark {
  height: 40px;
  width: auto;
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.site-nav a:hover { background: rgba(255, 255, 255, .16); color: var(--white); }

/* ---------------------------------------------------------------- 4. NUPUD */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.btn--brand {
  background: var(--brand-dark);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn--brand:hover { background: #002d90; transform: translateY(-2px); }

.btn--disabled {
  background: #e8ecf7;
  color: var(--ink-muted);
  cursor: default;
  font-weight: 600;
}

/* ------------------------------------------ 5. HERO + KERIMISNOOLED */
.hero {
  background: var(--brand-gradient);
  color: var(--white);
  padding: 60px 0 56px;
  text-align: center;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 116px);
  min-height: calc(100svh - var(--header-h) - 116px);
}

/* Pealkiri peab jääma ühele reale nii desktopis kui mobiilis:
   font-size on seotud vaate laiusega ja tekst ei murdu. */
.hero__title {
  margin-top: 30px;
  font-size: min(4.1vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 16, 60, .28);
}

/* Kaks minimalistlikku noolt, mis kutsuvad alla kerima */
.scroll-cue {
  display: block;
  margin-top: 42px;
  color: var(--white);
  text-decoration: none;
  line-height: 0;
}
.scroll-cue__arrow {
  width: 34px;
  height: auto;
  opacity: .55;
  animation: cueBounce 2.1s ease-in-out infinite;
}
.scroll-cue__arrow:last-child { margin-top: -12px; animation-delay: .18s; }
.scroll-cue:hover .scroll-cue__arrow { opacity: .95; }

@keyframes cueBounce {
  0%, 100% { transform: translateY(-3px); opacity: .4; }
  50%      { transform: translateY(4px);  opacity: .95; }
}

/* ------------------------------------------- 6. LOGO (staatiline pilt) */
/* Logo on valge graafika läbipaistval taustal (assets/nutiringi-logo.png),
   seetõttu töötab see ainult tumedal pinnal — päis, hero gradient ja jalus
   on kõik tumesinised. Heledale taustale see logo ei sobi.
   Animatsiooni ei ole: pilt kuvatakse staatilisena. */

/* Hero — suur logo gradiendil */
.logo {
  width: clamp(240px, 60vw, 440px);
}
.logo__img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 34px rgba(0, 14, 55, .32));
}

/* --------------------------------------------- 7. TAGASISIDE KARUSELL */
.carousel {
  display: block;
  overflow: hidden;                  /* riba liigub transform'iga, mitte kerimisega */
  padding: 6px 2px 22px;
  touch-action: pan-y;               /* püstine lehekerimine jääb alles */
  cursor: grab;
}
.carousel.is-dragging { cursor: grabbing; }

.carousel__track {
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  will-change: transform;            /* sujuv, GPU-l joonistatud liikumine */
}
.carousel__track .quote-card { user-select: none; }

/* Kolm kaarti korraga nähtaval */
.quote-card {
  position: relative;
  flex: 0 0 calc((var(--maxw) - 48px - 2 * var(--gap)) / 3);
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quote-card::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 6px;
  border-radius: 999px;
  background: var(--brand-gradient);
}
.quote-card__text {
  margin: 0 0 16px;
  font-size: 1.04rem;
  color: var(--ink-soft);
}
.quote-card__author {
  margin: auto 0 0;
  font-weight: 700;
  color: var(--brand-dark);
}

.carousel-nav { display: flex; justify-content: center; gap: 12px; }
.carousel-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-dark);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background-color .18s ease, transform .18s ease;
}
.carousel-btn svg { width: 24px; height: 24px; }
.carousel-btn:hover { background: var(--brand-dark); color: var(--white); transform: translateY(-2px); }

/* ----------------------- 8. MISSIOON (interaktiivne illustratsioon) */
.mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;            /* tekstikast algab pealkirja kõrguselt, mitte keskelt */
  gap: 40px;
}

.mission-box {
  position: relative;
  padding: 30px 30px 30px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mission-box::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 6px;
  border-radius: 999px;
  background: var(--brand-gradient);
}

/* Kõik kolm teksti on samas ruudustiku lahtris — kasti kõrgus ei hüppa. */
.mission-box__texts { display: grid; }
.mission-text {
  grid-area: 1 / 1;
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.mission-text.is-active { opacity: 1; visibility: visible; transform: none; }

.mission-figure { margin: 0; }
.mission-figure__hint {
  margin-top: 10px;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-muted);
}
.hint--touch { display: none; }

/* Tasemenupud — nähtaval puuteseadmetes / kitsal ekraanil */
.level-chips { display: none; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.chip.is-active { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }

@media (hover: none) and (pointer: coarse) {
  .level-chips { display: flex; }
  .hint--hover { display: none; }
  .hint--touch { display: inline; }
}

.illus { max-width: 440px; margin: 0 auto; }

/* Klassiruumi pilt: E-RIIK.png täpne geomeetria maskidena, värvid lehe omad.
   Iga ala on oma kiht, mille värvi ja tugevust saab eraldi muuta.
   NB! Maskipilte saab wp-adminis üle kirjutada — front-page.php väljastab
   siis vastavad mask-image reeglid inline <style> plokina. */
.classroom { position: relative; }
.classroom::before { content: ""; display: block; padding-top: 102.12%; }  /* 772/756 */

.ink, .zones {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ink {
  -webkit-mask-repeat: no-repeat;          mask-repeat: no-repeat;
  -webkit-mask-position: center;           mask-position: center;
  -webkit-mask-size: contain;              mask-size: contain;
  transition: opacity .28s ease, background-color .25s ease;
}
/* Taust ainult siis, kui brauser maske toetab — muidu jääks siia värviline kast */
@supports ((-webkit-mask-image: url(a.png)) or (mask-image: url(a.png))) {
  .ink { background-color: var(--brand-dark); }
  .ink--board-fill { background: var(--brand-gradient); }
}

.ink--board      { -webkit-mask-image: url(assets/e-riik-tahvel.png);      mask-image: url(assets/e-riik-tahvel.png); }
.ink--board-text { -webkit-mask-image: url(assets/e-riik-tahvel-kiri.png); mask-image: url(assets/e-riik-tahvel-kiri.png); }
.ink--teacher    { -webkit-mask-image: url(assets/e-riik-opetaja.png);     mask-image: url(assets/e-riik-opetaja.png); }
.ink--students   { -webkit-mask-image: url(assets/e-riik-opilased.png);    mask-image: url(assets/e-riik-opilased.png); }
.ink--board-fill { -webkit-mask-image: url(assets/e-riik-tahvel-sisu.png); mask-image: url(assets/e-riik-tahvel-sisu.png);
                   opacity: 0; }

/* Aktiivne tahvel täitub gradiendiga; raam jääb tumedaks, kiri muutub valgeks */
.illus.level-board .ink--board-fill { opacity: 1; }
.illus.level-board .ink--board-text { background-color: var(--white); }

/* Mitteaktiivsed alad tagasi hoitud */
.illus:not(.level-board) .ink--board,
.illus:not(.level-board) .ink--board-text  { opacity: .45; }
.illus:not(.level-teacher) .ink--teacher   { opacity: .45; }
.illus:not(.level-students) .ink--students { opacity: .45; }

/* Läbipaistvad hiire- ja puutealad (joon üksi oleks liiga peenike) */
.lvl { cursor: pointer; }
.hit { fill: transparent; }

/* ------------------------------------------------------------ 9. TEENUSED */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.service-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.service-card__mark { width: 64px; height: 64px; flex: 0 0 auto; }
.service-card__title { font-size: 1.35rem; color: var(--brand-dark); }
.service-card__text { margin: 8px 0 0; font-size: 1rem; color: var(--ink-soft); }

/* ------------------------------------------------- 10. KUS TOIMUB (KAARDID) */
.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 40px 0 18px;
  font-size: 1.22rem;
  color: var(--brand-dark);
}
.group-title:first-of-type { margin-top: 8px; }

.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.dot--live { background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .18); }
.dot--soon { background: var(--ink-muted); box-shadow: 0 0 0 4px rgba(124, 134, 163, .16); }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.card__name { font-size: 1.16rem; color: var(--brand-dark); }
.card__meta { margin: -4px 0 0; font-size: .95rem; color: var(--ink-muted); }
.card .btn { margin-top: auto; }

.card--live {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  border: 2px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card--live:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card--soon { background: #fbfcff; }
.card--soon .card__name { color: var(--ink-soft); }

.note {
  margin: 30px 0 0;
  font-size: .98rem;
  font-style: italic;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------- 11. KONTAKT */
.contact { text-align: center; }

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 30px;
  background: var(--white);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: clamp(1rem, 3.4vw, 1.28rem);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 15, 58, .26);
  transition: transform .18s ease, box-shadow .18s ease;
  word-break: break-word;
}
.contact__link:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 15, 58, .3); }
.contact__icon { display: flex; color: var(--brand-light); }

/* --------------------------------------------------------------- 12. JALUS */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, .82);
  padding: 34px 0;
}
.footer-inner { text-align: center; }
.footer__logo {
  width: 190px;
  margin: 0 auto 16px;
}
.footer__logo img {
  width: 100%;
  height: auto;
}
.footer__brand {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--white);
}
.footer__note { margin: 6px 0 0; font-size: .92rem; }

/* -------------------------------------------------------- 13. RESPONSIIVSUS */
@media (max-width: 1160px) {
  /* Kaardi laius arvutatakse vaate laiusest, kui leht on kitsam kui --maxw */
  .quote-card { flex-basis: calc((100vw - 48px - 2 * var(--gap)) / 3); }
}

@media (max-width: 980px) {
  .mission-grid { grid-template-columns: 1fr; gap: 26px; }
  /* Mobiilis on pilt ees ja tekst selle all — nii näeb muutuvat teksti kohe */
  .mission-figure { order: -1; }
  .quote-card { flex-basis: calc((100vw - 48px - var(--gap)) / 2); }   /* 2 kaarti */
}

@media (max-width: 860px) {
  .section { padding: 68px 0; }
}

@media (max-width: 720px) {
  /* Mobiilis jäävad menüüsse ainult kõige olulisemad lingid.
     $= (mitte =), sest alamlehtedel on ankru ees ka lehe täisaadress. */
  .site-nav a[href$="#tagasiside"],
  .site-nav a[href$="#missioon"],
  .site-nav a[href$="#teenused"] { display: none; }
}

@media (max-width: 620px) {
  .quote-card { flex-basis: calc(100vw - 62px); }                      /* 1 kaart */
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 34px 0 44px; }
  .hero__title { margin-top: 24px; font-size: min(4.4vw, 3rem); }
  .scroll-cue { margin-top: 30px; }
  .scroll-cue__arrow { width: 30px; }
  .site-nav a { padding: 8px 10px; font-size: .9rem; }
  .brand__mark { height: 30px; }
  .footer__logo { width: 160px; }
  .quote-card { flex-basis: calc(100vw - 50px); padding: 22px 22px 18px 26px; }
  .mission-box { padding: 24px 22px 24px 26px; }
  .service-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
  .services { grid-template-columns: 1fr; }
  .btn { width: 100%; }              /* suured, mugavad puutealad */
}

@media (max-width: 380px) {
  .site-nav a[href$="#kontakt"] { display: none; }
}

/* Vähendatud liikumise eelistus — animatsioonid välja */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ------------------------------------------- 14. WORDPRESSI-SPETSIIFILINE */

/* Sisselogitud kasutaja admin-riba ei tohi kleepuvat päist katta */
.admin-bar .site-header { top: 32px; }
.admin-bar .section { scroll-margin-top: calc(var(--header-h) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar .section { scroll-margin-top: calc(var(--header-h) + 46px); }
}

/* Tavalised sisulehed ja postitused (index.php / page.php / single.php).
   Avaleht ei kasuta neid stiile. */
.entry {
  padding: 56px 0 72px;
}
.entry__title {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--brand-dark);
}
.entry__meta {
  margin: 0 0 24px;
  font-size: .95rem;
  color: var(--ink-muted);
}
.entry__content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry__content h2,
.entry__content h3 { margin-top: 1.6em; margin-bottom: .6em; color: var(--brand-dark); }
.entry__content img { border-radius: var(--radius-sm); }
.entry__content blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 22px;
  border-left: 6px solid var(--brand-light);
  color: var(--ink-soft);
  font-style: italic;
}
.entry + .entry { border-top: 1px solid var(--border); }

.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 0 72px;
}
.pager a, .pager span {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.pager .current { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }

/* Joonduse abiklassid Gutenbergi plokkidele */
.alignleft  { float: left;  margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .9rem; color: var(--ink-muted); }

/* ==========================================================================
   15. KÜSIMUSED JA VASTUSED
   Sisaldab ka oma responsiivsed reeglid, et kogu funktsioon oleks ühes kohas.
   ========================================================================== */

/* Menüüpunkt, mis viib päris lehele (ülejäänud on avalehe ankrud) */
.site-nav__page {
  border: 1px solid rgba(255, 255, 255, .38);
}
.site-nav__page:hover { border-color: transparent; }

/* --------------------------------------------- Lehe päis (gradient) */
.page-hero {
  background: var(--brand-gradient);
  color: var(--white);
  padding: 72px 0 64px;
  text-align: center;
}
.page-hero--compact { padding: 56px 0 52px; }

.page-hero__inner { display: block; }

.page-hero__title {
  font-size: clamp(1.8rem, 4.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(0, 16, 60, .28);
}
/* Küsimus pealkirjana võib olla pikk — väiksem ja vasakule joondatud */
.page-hero__title--question {
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 700;
  text-align: left;
}

.page-hero__lead {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .92);
}

.page-hero__inner .btn { margin-top: 28px; }

.page-hero__back {
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
}
.page-hero__back:hover { color: var(--white); text-decoration: underline; }

/* Hele nupp gradiendil */
.btn--light {
  background: var(--white);
  color: var(--brand-dark);
  box-shadow: 0 14px 34px rgba(0, 15, 58, .26);
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 15, 58, .3); }

/* ------------------------------------------- Otsing ja teemafilter */
.qa-toolbar {
  padding: 26px;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.qa-search__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--brand-dark);
}
.qa-search__row { display: flex; gap: 10px; }

.qa-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  transition: border-color .18s ease;
}
.qa-search__input:focus { border-color: var(--brand-light); outline: none; }
.qa-search__btn { flex: 0 0 auto; }

.qa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.qa-chip {
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.qa-chip:hover { border-color: var(--brand-light); color: var(--brand-dark); }
.qa-chip.is-active {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--white);
}

.qa-count {
  margin: 0 0 20px;
  font-size: .98rem;
  color: var(--ink-muted);
}
.qa-count strong { color: var(--brand-dark); }

/* ------------------------------------------------------- Kaardid */
.qa-list { display: grid; gap: var(--gap); }

.qa-card {
  position: relative;
  padding: 28px 28px 22px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.qa-card::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 6px;
  border-radius: 999px;
  background: var(--brand-gradient);
}

.qa-card__question {
  margin: 0 0 12px;
  font-size: 1.24rem;
  color: var(--brand-dark);
}
.qa-card__question a { color: inherit; text-decoration: none; }
.qa-card__question a:hover { text-decoration: underline; }

.qa-card__answer { color: var(--ink-soft); font-size: 1.02rem; }
.qa-card__answer > *:first-child { margin-top: 0; }
.qa-card__answer > *:last-child { margin-bottom: 0; }
.qa-card__answer p { margin: 0 0 .9em; }
.qa-card__answer ul,
.qa-card__answer ol { margin: 0 0 .9em; padding-left: 1.4em; }
.qa-card__answer li { margin-bottom: .35em; }
.qa-card__answer a { color: var(--brand-dark); font-weight: 600; }

.qa-card__pending {
  margin: 0;
  font-style: italic;
  color: var(--ink-muted);
}

.qa-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.qa-card__topics { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-card__asker { font-size: .92rem; color: var(--ink-muted); }

.qa-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--brand-dark);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}
.qa-badge:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }

.qa-card--single { padding-top: 30px; }
.qa-single-cta { margin: 28px 0 0; text-align: center; }

/* --------------------------------------------------- Tühi tulemus */
.qa-empty {
  padding: 44px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.qa-empty__title {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.qa-empty p { color: var(--ink-soft); }
.qa-empty .btn { margin-top: 10px; }

/* ---------------------------------------------------------- Vorm */
.qa-intro {
  margin-bottom: 26px;
  color: var(--ink-soft);
}

.qa-form {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.qa-field { margin-bottom: 24px; }

.qa-field__label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.qa-field__req { color: #d63638; margin-left: 2px; }

.qa-field__hint {
  margin: 4px 0 10px;
  font-size: .92rem;
  color: var(--ink-muted);
}

.qa-field__input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease;
}
.qa-field__input:focus { border-color: var(--brand-light); outline: none; }
textarea.qa-field__input { resize: vertical; min-height: 140px; }

/* Honeypot — inimesele nähtamatu, aga mitte display:none, sest osa roboteid
   jätab peidetud väljad täitmata. Jääb voost välja ja ekraanilugeja jaoks
   on vanemelemendil aria-hidden. */
.qa-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.qa-form__submit { margin-top: 4px; }

.qa-form__note {
  margin: 18px 0 0;
  font-size: .92rem;
  color: var(--ink-muted);
}

/* -------------------------------------------------------- Teated */
.qa-notice {
  padding: 26px 28px;
  margin-bottom: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.qa-notice__title {
  margin: 0 0 8px;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.qa-notice p { margin: 0 0 8px; color: var(--ink-soft); }
.qa-notice p:last-child { margin-bottom: 0; }

.qa-notice--success { border-left: 6px solid #1f9d55; }
.qa-notice--error   { border-left: 6px solid #d63638; }
.qa-notice--error p { color: var(--ink); }

.qa-notice__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.qa-notice__again { color: var(--brand-dark); font-weight: 600; }

/* ------------------------------------------------- Responsiivsus */
@media (max-width: 720px) {
  /* Küsimuste link jääb mobiilis alles — see on ainus päris leht menüüs */
  .site-nav__page { display: inline-block; }
}

@media (max-width: 560px) {
  .page-hero { padding: 48px 0 44px; }
  .page-hero--compact { padding: 38px 0 36px; }
  .page-hero__lead { font-size: 1rem; }

  .qa-toolbar { padding: 20px; }
  .qa-search__row { flex-direction: column; }
  .qa-search__input { border-radius: var(--radius-sm); }
  .qa-search__btn { width: 100%; }

  .qa-card { padding: 22px 20px 18px 24px; }
  .qa-card__question { font-size: 1.12rem; }
  .qa-card__meta { flex-direction: column; align-items: flex-start; }

  .qa-form { padding: 22px 20px; }
  .qa-notice { padding: 22px 20px; }
  .qa-notice__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .qa-notice__actions .btn { width: 100%; }
}
