/* =========================================================
   Gydomojo judesio studija — pagrindinis stilius
   Spalvos ir šriftai keičiami vienoje vietoje (:root žemiau).
   ========================================================= */

:root {
  --red:    #9E0B0F;   /* logotipo raudona */
  --ink:    #363636;   /* logotipo pilka, pagrindinis tekstas */
  --muted:  #6B6F73;   /* antraeilis tekstas */
  --mist:   #EEF0F1;   /* šviesus fonas (kaip kamuoliai salėje) */
  --line:   #D8DBDD;   /* linijos */
  --paper:  #FFFFFF;

  --font: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wrap: 1000px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Viršus: logotipas + meniu ---------- */

.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; padding-top: 18px; padding-bottom: 10px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .logo-mark { width: 58px; height: auto; }
.brand .logo-word { width: 300px; height: auto; }

.menu-toggle {
  display: none;
  font: 600 0.95rem var(--font);
  color: var(--ink); background: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 14px; cursor: pointer;
}

.site-nav { width: 100%; }
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2px 4px;
}
.site-nav a {
  display: block; padding: 8px 12px;
  font-weight: 500; font-size: 0.98rem;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Juosta (keičiami paveikslėliai) ---------- */

.banner {
  position: relative; margin: 0 0 44px;
  aspect-ratio: 940 / 250;
  overflow: hidden; border-radius: var(--radius);
  background: var(--mist);
}
.banner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1s ease;
}
.banner img.is-active { opacity: 1; }
.banner figcaption {
  position: absolute; left: 0; bottom: 0;
  background: var(--ink); color: #fff;
  font-size: 0.9rem; font-weight: 500;
  padding: 6px 14px; border-top-right-radius: var(--radius);
}

/* ---------- Turinys ---------- */

main { flex: 1; padding: 32px 0 72px; }

.prose { max-width: 70ch; }

h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.1; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 30px; padding-bottom: 22px;
  /* raudonas lankas po antrašte — iš logotipo */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 16'%3E%3Cpath d='M2 13 C 40 2, 90 1, 138 4' fill='none' stroke='%239E0B0F' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left bottom / 140px 16px;
}

h2 { font-size: 1.4rem; line-height: 1.25; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; margin: 1.6em 0 0.4em; }

p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.55; }

ul { padding-left: 1.2em; margin: 0 0 1.2em; }
li { margin-bottom: 0.5em; }
li::marker { color: var(--red); }

/* ---------- Išskleidžiami blokai (<details>) ---------- */

details {
  border-top: 1px solid var(--line);
}
details:last-of-type { border-bottom: 1px solid var(--line); }
.accordion { margin: 0.6em 0 1.6em; }

summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 2px;
  font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--red);
  font-weight: 500; font-size: 1.2rem; line-height: 1;
}
details[open] > summary::after { content: "–"; background: var(--red); border-color: var(--red); color: #fff; }
summary:hover { color: var(--red); }
details > div { padding: 0 2px 18px; }
summary small { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }

/* Nuotraukos priemonių aprašymuose */
.photos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.photos img { height: 200px; width: auto; border-radius: var(--radius); background: var(--mist); }

/* ---------- Paslaugos: 4 žingsniai ---------- */

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative; padding: 0 0 26px 64px; margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 700;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 20px; top: 46px; bottom: 6px;
  width: 2px; background: var(--line);
}
.steps h2 { margin: 4px 0 8px; }
.steps ul { list-style: disc; }

.motto { font-size: 1.3rem; font-weight: 700; color: var(--red); margin-bottom: 1.4em; }

/* ---------- Kainos ---------- */

.prices { width: 100%; max-width: 70ch; border-collapse: collapse; margin-bottom: 2em; }
.prices th, .prices td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prices td:last-child { text-align: right; white-space: nowrap; font-weight: 700; padding-left: 20px; }
.prices caption { text-align: left; font-weight: 700; font-size: 1.15rem; padding: 18px 0 4px; }

/* ---------- Tvarkaraštis ---------- */

.table-scroll { overflow-x: auto; margin-bottom: 1.2em; }
.schedule { border-collapse: separate; border-spacing: 4px; min-width: 720px; width: 100%; font-size: 0.95rem; }
.schedule th { text-align: left; font-weight: 600; padding: 8px 10px; }
.schedule tbody th { white-space: nowrap; color: var(--muted); }
.schedule td { padding: 12px 10px; border-radius: 4px; line-height: 1.35; }
/* Programų spalvos — naudokite šias klases langeliuose */
.schedule .p-individual { background: var(--mist); }
.schedule .p-judesio    { background: #F6E7E7; }
.schedule .p-stuburo    { background: var(--red); color: #fff; }
.schedule .p-funkciniu  { background: var(--ink); color: #fff; }

.note { color: var(--muted); font-size: 0.95rem; }

/* ---------- Kontaktai ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.contact-list li { margin-bottom: 14px; }
.contact-list span { display: block; color: var(--muted); font-size: 0.9rem; }
.contact-list strong, .contact-list a { font-size: 1.15rem; }

form label { display: block; font-weight: 500; margin-bottom: 14px; }
form input, form textarea {
  display: block; width: 100%; margin-top: 4px;
  font: inherit; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
}
form input:focus, form textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.button {
  display: inline-block; font: 600 1rem var(--font);
  background: var(--red); color: #fff; border: 0; border-radius: var(--radius);
  padding: 12px 26px; cursor: pointer;
}
.button:hover { background: #7f090c; }

.map { margin-top: 48px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; background: var(--mist); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Galerija ---------- */

.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery li { margin: 0; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.03); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 20, 20, 0.92); }
.lightbox img { max-width: 92vw; max-height: 86vh; width: auto; border-radius: 4px; }
.lightbox button {
  position: fixed; background: rgba(255,255,255,0.12); color: #fff; border: 0;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
}
.lightbox button:hover { background: var(--red); }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }

/* ---------- Naujienos ---------- */

.news { list-style: none; padding: 0; }
.news li { border-top: 1px solid var(--line); padding: 16px 0; margin: 0; }
.news time { color: var(--muted); font-size: 0.9rem; display: block; }

/* ---------- Apačia ---------- */

.site-footer { background: var(--ink); color: #fff; padding: 36px 0 28px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-bottom: 22px; }
.footer-grid span { display: block; color: #B9BCBF; font-size: 0.85rem; }
.copyright { color: #B9BCBF; margin: 0; border-top: 1px solid #4a4a4a; padding-top: 18px; }

/* ---------- Mobilūs ekranai ---------- */

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .brand .logo-mark { width: 44px; }
  .brand .logo-word { width: 190px; }
  .js .menu-toggle { display: block; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .banner { margin-bottom: 28px; }
  .banner figcaption { font-size: 0.8rem; }
  main { padding: 16px 0 56px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .photos img { height: 150px; }
  .steps > li { padding-left: 54px; }
  .map { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
