/* ==========================================================================
   LAYOUT.CSS – Grid системи, секции, responsive layouts
   ========================================================================== */

/* ─── Page spacing (за header offset) ───
   Добавя safe-area, защото хедърът също слиза под notch-а на iOS. */
.page-body {
  padding-top: calc(80px + env(safe-area-inset-top, 0px));
}

/* Страници с full-bleed hero: снимката тръгва под прозрачния хедър (без отстъп).
   Важи за началната страница и за всяка подстраница с клас .has-hero. */
body[data-page="home"].page-body,
body.has-hero.page-body {
  padding-top: 0;
}

/* ─── Sections ─── */
.section {
  padding: var(--space-xl) 0;
}

/* Whisper-soft wash for otherwise-white sections so nothing reads as
   dead white. Applied only to plain sections that need it. */
.section--wash {
  background:
    radial-gradient(80% 55% at 100% 0%, color-mix(in srgb, var(--tint-blue) 55%, transparent), transparent 60%),
    radial-gradient(72% 55% at 0% 100%, color-mix(in srgb, var(--tint-green) 45%, transparent), transparent 60%);
}

/* Soft gradient wash + faint themed watermark – kills large dead-white
   content areas on the service pages. Category set via .svc-<name>. */
.section--soft {
  --svc-tint: var(--tint-green);
  --svc-illus: url('../img/illus/terapevtichen-pedikyur.svg');
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, transparent 0%, var(--svc-tint) 100%);
}

.section--soft::before {
  content: '';
  position: absolute;
  left: -80px;
  top: 8%;
  width: 340px;
  height: 340px;
  background: var(--svc-illus) no-repeat center / contain;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}

.section--soft::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: 6%;
  width: 240px;
  height: 240px;
  background: var(--svc-illus) no-repeat center / contain;
  opacity: 0.06;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 0;
}

.section--soft > .container {
  position: relative;
  z-index: 1;
}

.svc-therapy    { --svc-tint: var(--tint-green);    --svc-illus: url('../img/illus/terapevtichen-pedikyur.svg'); }
.svc-corrective { --svc-tint: var(--tint-blue);     --svc-illus: url('../img/illus/korektivni-sistemi.svg'); }
.svc-pedicure   { --svc-tint: var(--tint-lavender); --svc-illus: url('../img/illus/pedikyur.svg'); }
.svc-manicure   { --svc-tint: var(--tint-pink);     --svc-illus: url('../img/illus/manikyur.svg'); }

/* Tinted секции от акцентната палитра – слагат плътен светъл фон върху
   секцията. Всеки модификатор се ползва самостоятелно на .section. */
.section--tint-green {
  background-color: var(--tint-green);
}

/* ─── Амбиентни листа върху тинтирана секция ───
   Пръснати меки листа (леко ротирани, ниска непрозрачност), които „дишат"
   зеленото на секцията – ехо от логото. Клипват се в рамките на секцията. */
.section--leaves {
  position: relative;
  overflow: hidden;
}

.section--leaves > .container {
  position: relative;
  z-index: 1;
}

.section-leaves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.section-leaf {
  position: absolute;
  background: url('../img/leaf.svg') no-repeat center / contain;
  will-change: transform;
}

.section-leaf--1 {
  top: 6%;
  left: -34px;
  width: 150px;
  height: 150px;
  opacity: 0.10;
  rotate: -18deg;
}

.section-leaf--2 {
  top: 42%;
  right: -30px;
  width: 118px;
  height: 118px;
  opacity: 0.08;
  rotate: 34deg;
  scale: -1 1;
}

.section-leaf--3 {
  bottom: 4%;
  left: 12%;
  width: 78px;
  height: 78px;
  opacity: 0.12;
  rotate: 8deg;
}

/* ─── Меки стъпки, вплетени сред листата ───
   Ехо от footprint-пътеката в „Услуги": същите стъпки, но като амбиентен фон –
   пръснати под листата, много ниска непрозрачност. Носят се като листата. */
.section-footprints {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 200px;
  height: 90px;
  background: url('../img/footprints-trail.svg') no-repeat center / contain;
  opacity: 0.11;
  transform: translateX(-50%) rotate(-5deg);
  will-change: transform;
}

.section-footprints--2 {
  left: auto;
  right: 7%;
  bottom: auto;
  top: 26%;
  width: 150px;
  height: 68px;
  opacity: 0.08;
  transform: rotate(14deg);
}

.section--tint-blue {
  background-color: var(--tint-blue);
}

.section--tint-lavender {
  background-color: var(--tint-lavender);
}

.section--tint-pink {
  background-color: var(--tint-pink);
}

/* ─── Homepage rhythm: warm→green run-up toward the deep footer ───
   Тези три градиента ескалират наситеността в долната част на страницата и се
   „верижат" (дъното на всеки ≈ върха на следващия), за да усетите плавно
   изкачване до тъмнозеления футър. Всички са достатъчно светли за тъмен текст. */
.section--rise-ochre {
  background: linear-gradient(180deg,
    var(--tint-ochre) 0%,
    color-mix(in srgb, var(--color-ochre) 30%, #ffffff) 100%);
}

.section--rise-coral {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--color-ochre) 22%, #ffffff) 0%,
    color-mix(in srgb, var(--color-coral) 26%, #ffffff) 100%);
}

.section--rise-green {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--color-coral) 12%, #ffffff) 0%,
    color-mix(in srgb, var(--color-primary-light) 55%, #ffffff) 100%);
}

/* Универсален „финален" run-up: последната секция преди футъра се спуска към
   светлозелено, така че тъмнозеленият футър каца плавно (за подстраниците).
   Дефиниран СЛЕД .section--soft, за да го замести на страниците с услуги. */
.section--to-footer {
  background: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--color-primary-light) 48%, #ffffff) 100%);
}

/* ─── Organic wave divider (echoes the footer crest) ───
   Пълни „мъртвото" пространство на върха на секцията с брандова форма вместо
   твърда линия. Fill-ът = цветът на секцията ОТГОРЕ (--wave-fill), така че
   върхът е безшевен, а вълнистото дъно се влива в текущата секция. Статичен. */
.section--wave {
  position: relative;
  overflow: hidden;
}

.section--wave > .container {
  position: relative;
  z-index: 1;
}

.wave-divider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.wave-divider path {
  fill: var(--wave-fill, var(--tint-green));
}

.wave-fill-lavender { --wave-fill: var(--tint-lavender); }
.wave-fill-pink     { --wave-fill: var(--tint-pink); }
.wave-fill-coral    { --wave-fill: color-mix(in srgb, var(--color-coral) 26%, #ffffff); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 640px;
  margin: 0 auto;
}

/* ─── Hero Section (full-bleed, 100dvh) ───
   Снимката е отделен <img> (LCP-safe и лесно за смяна). Overlay-ят (зелено→синьо
   + скрим) и илюстрираните акценти стоят НАД снимката чрез слоеве и НЕ бавят
   рендера ѝ. Текстът е защитно четим и върху ярка реална снимка. */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  /* Резервен брандов фон – ако снимката липсва/се бави, hero-ът пак „работи" */
  background: linear-gradient(150deg, var(--color-primary) 0%, var(--color-blue) 100%);
}

/* Full-bleed снимка (swap point) */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Брандов overlay: скрим горе (за хедъра) + скрим долу (за текста) + зелено→синьо тон.
   Пази бял текст ≥ 4.5:1 дори върху светла снимка. */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 41, 28, 0.34) 0%, transparent 20%),
    linear-gradient(2deg, rgba(9, 58, 38, 0.82) 4%, rgba(9, 58, 38, 0.28) 40%, transparent 66%),
    linear-gradient(125deg, color-mix(in srgb, var(--color-primary) 58%, transparent) 0%, color-mix(in srgb, var(--color-blue) 42%, transparent) 100%);
}

/* Илюстрирани акценти (leaf + органични blob-ове). Контейнерът се паралаксира
   от nav.js; blob-овете „дишат" вътре в него. */
.hero__accents {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: var(--radius-blob);
  filter: blur(2px);
  will-change: transform;
}

.hero__blob--green {
  width: 320px;
  height: 320px;
  top: -90px;
  right: -70px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-primary-light) 75%, transparent), transparent);
}

.hero__blob--blue {
  width: 260px;
  height: 260px;
  bottom: -70px;
  left: -60px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-blue) 70%, transparent), transparent);
}

.hero__leaf {
  position: absolute;
  top: 15%;
  left: 6%;
  width: 66px;
  height: 66px;
  background: url('../img/leaf.svg') no-repeat center / contain;
  opacity: 0.55;
}

@keyframes leafDrift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(14px, -20px) rotate(10deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Носене само по translate, за да не се засягат rotate/scale на листата */
@keyframes leafFloat {
  0%   { translate: 0 0; }
  50%  { translate: 10px -16px; }
  100% { translate: 0 0; }
}

@keyframes blobBreathe {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50%      { transform: scale(1.08) translate(10px, -12px); }
}

/* Нежно вертикално носене на ъгловата илюстрация в .page-hero::before.
   (Дефиницията липсваше – анимацията реферираше несъществуващ keyframe.) */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Съдържание – вертикално центрирано; trust лентата е долепена до долу */
.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding-top: calc(80px + var(--space-lg) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-width: 760px;
}

.hero__content .chip {
  align-self: center;
}

.hero h1 {
  color: #ffffff;
  max-width: 16ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.30);
}

/* По-светлото зелено се чете върху тъмния overlay (голям текст ≥ 3:1) */
.hero h1 .text-primary {
  color: var(--color-primary-light);
}

.hero__subtext {
  color: rgba(255, 255, 255, 0.92);
  max-width: 52ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
}

.hero__cta {
  margin-top: var(--space-xs);
}

/* Trust лента – светъл вариант върху снимката, долепена до долу */
.hero__trust {
  justify-content: center;
  margin-top: 0;
}

.hero__trust .trust-badge {
  color: rgba(255, 255, 255, 0.92);
}

.hero__trust .trust-badge .material-symbols-outlined {
  color: var(--color-primary-light);
}

/* Entrance – само CSS, не блокира рендера на снимката (LCP) */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__blob--green { animation: blobBreathe 11s ease-in-out infinite; }
  .hero__blob--blue  { animation: blobBreathe 14s ease-in-out infinite reverse; }
  .hero__leaf        { animation: leafDrift 19s ease-in-out infinite; }

  /* Меко носене на амбиентните листа (translate само – базовите
     rotate/scale остават непокътнати). */
  .section-leaf--1 { animation: leafFloat 21s ease-in-out infinite; }
  .section-leaf--2 { animation: leafFloat 26s ease-in-out infinite reverse; }
  .section-leaf--3 { animation: leafFloat 18s ease-in-out infinite; }
  .section-footprints    { animation: leafFloat 25s ease-in-out infinite; }
  .section-footprints--2 { animation: leafFloat 31s ease-in-out infinite reverse; }

  .hero__content > *,
  .hero__trust {
    animation: heroRise 0.7s var(--ease-fluid) both;
  }

  .hero__content > :nth-child(1) { animation-delay: 0.10s; }
  .hero__content > :nth-child(2) { animation-delay: 0.20s; }
  .hero__content > :nth-child(3) { animation-delay: 0.30s; }
  .hero__content > :nth-child(4) { animation-delay: 0.40s; }
  .hero__trust { animation-delay: 0.55s; }
}

/* ─── Sub-page hero (компактен вариант на full-bleed hero-а) ───
   Споделя цялата визуална система на началния hero (снимка + брандов overlay +
   листо/blob акценти + бял заглавен текст), но е ~60vh, за да остане част от
   съдържанието видимо над сгъвката. Използва се на всички подстраници. */
.hero--sub {
  min-height: 74vh;
  min-height: 74dvh;
}

.hero--sub .hero__inner {
  min-height: 74vh;
  min-height: 74dvh;
  gap: var(--space-md);
  padding-top: calc(80px + var(--space-lg) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
}

/* ─── Hero (page sub-headers, e.g. Services, About) ───
   Акцентният цвят на blob-а се сменя само чрез --hero-accent. */
.page-hero {
  --hero-accent: var(--color-primary);
  --hero-heading: var(--color-primary-dark);
  --hero-tint: var(--tint-green);
  --hero-tint-2: var(--tint-blue);
  --hero-illus: url('../img/illus/terapevtichen-pedikyur.svg');
  position: relative;
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-md);
  overflow: hidden;
  /* Layered wash so the hero never reads as dead white */
  background:
    radial-gradient(65% 85% at 88% 4%, var(--hero-tint-2), transparent 62%),
    radial-gradient(55% 80% at 4% 96%, var(--hero-tint), transparent 60%),
    linear-gradient(180deg, var(--hero-tint) 0%, transparent 58%);
}

/* Soft accent glow behind the heading */
.page-hero::after {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 460px;
  height: 380px;
  background: radial-gradient(closest-side, var(--hero-accent), transparent);
  opacity: 0.22;
  pointer-events: none;
}

/* Service illustration – a themed corner accent that fills the space */
.page-hero::before {
  content: '';
  position: absolute;
  right: -12px;
  bottom: -18px;
  width: 220px;
  height: 220px;
  background: var(--hero-illus) no-repeat center / contain;
  opacity: 0.9;
  pointer-events: none;
  animation: floatY 8s ease-in-out infinite;
}

.page-hero--therapy {
  --hero-accent: var(--accent-therapy);
  --hero-heading: var(--accent-therapy-deep);
  --hero-tint: var(--tint-green);
  --hero-tint-2: var(--tint-blue);
  --hero-illus: url('../img/illus/terapevtichen-pedikyur.svg');
}

.page-hero--corrective {
  --hero-accent: var(--accent-corrective);
  --hero-heading: var(--accent-corrective-deep);
  --hero-tint: var(--tint-blue);
  --hero-tint-2: var(--tint-lavender);
  --hero-illus: url('../img/illus/korektivni-sistemi.svg');
}

.page-hero--pedicure {
  --hero-accent: var(--accent-pedicure);
  --hero-heading: var(--accent-pedicure-deep);
  --hero-tint: var(--tint-lavender);
  --hero-tint-2: var(--tint-pink);
  --hero-illus: url('../img/illus/pedikyur.svg');
}

.page-hero--manicure {
  --hero-accent: var(--accent-manicure);
  --hero-heading: var(--accent-manicure-deep);
  --hero-tint: var(--tint-pink);
  --hero-tint-2: var(--tint-ochre);
  --hero-illus: url('../img/illus/manikyur.svg');
}

/* Neutral hero (about / gallery / contact) – gradient + leaf, no service icon */
.page-hero--plain {
  --hero-accent: var(--color-primary);
  --hero-heading: var(--color-primary-dark);
  --hero-tint: var(--tint-green);
  --hero-tint-2: var(--tint-blue);
}

.page-hero--plain::before {
  background: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--hero-heading);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto;
}

/* A drifting leaf in the opposite corner, echoing the logo */
.page-hero .container::before {
  content: '';
  position: absolute;
  top: -46px;
  left: 6px;
  width: 46px;
  height: 46px;
  background: url('../img/leaf.svg') no-repeat center / contain;
  opacity: 0.5;
  pointer-events: none;
  animation: leafDrift 19s ease-in-out infinite;
}

/* ─── Grid Utilities ─── */
.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

/* ─── Service Detail Layout (alternating image/text) ─── */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.service-detail--reverse .service-detail__content {
  order: 1;
}

.service-detail--reverse .service-detail__image {
  order: 2;
}

.service-detail__image {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  min-height: 400px;
  position: relative;
}

.service-detail__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-detail__content .chip {
  margin-bottom: var(--space-sm);
  align-self: flex-start;
}

.service-detail__content h2 {
  margin-bottom: var(--space-xs);
}

.service-detail__content > p {
  margin-bottom: var(--space-md);
}

/* ─── Themed service rows (страница „Услуги") ───
   Всеки ред е мек панел в цвета на категорията + илюстрация-воден знак и
   акцентно заглавие, за да се четат 4-те реда като различни (както bento-то). */
.service-detail--therapy    { --row-accent: var(--accent-therapy-deep);    --row-tint: var(--tint-green);    --row-illus: url('../img/illus/terapevtichen-pedikyur.svg'); }
.service-detail--corrective { --row-accent: var(--accent-corrective-deep); --row-tint: var(--tint-blue);     --row-illus: url('../img/illus/korektivni-sistemi.svg'); }
.service-detail--pedicure   { --row-accent: var(--accent-pedicure-deep);   --row-tint: var(--tint-lavender); --row-illus: url('../img/illus/pedikyur.svg'); }
.service-detail--manicure   { --row-accent: var(--accent-manicure-deep);   --row-tint: var(--tint-pink);     --row-illus: url('../img/illus/manikyur.svg'); }

.service-detail--therapy,
.service-detail--corrective,
.service-detail--pedicure,
.service-detail--manicure {
  position: relative;
  overflow: hidden;
  padding: var(--space-lg);
  border-radius: var(--radius-2xl);
  border: 1px solid color-mix(in srgb, var(--row-accent) 18%, var(--color-surface-variant));
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--row-tint) 75%, #ffffff) 0%, #ffffff 68%);
  box-shadow: var(--shadow-sm);
}

.service-detail--therapy::before,
.service-detail--corrective::before,
.service-detail--pedicure::before,
.service-detail--manicure::before {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 200px;
  height: 200px;
  background: var(--row-illus) no-repeat center / contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.service-detail--therapy > *,
.service-detail--corrective > *,
.service-detail--pedicure > *,
.service-detail--manicure > * {
  position: relative;
  z-index: 1;
}

.service-detail--therapy .service-detail__content h2,
.service-detail--corrective .service-detail__content h2,
.service-detail--pedicure .service-detail__content h2,
.service-detail--manicure .service-detail__content h2 {
  color: var(--row-accent);
}

/* ─── About Section (side-by-side) ─── */
.about-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-xl);
}

.about-layout__image {
  flex: 1;
  position: relative;
}

/* Мек органичен blob зад снимката – брандова рамка вместо гол правоъгълник */
.about-layout__image::before {
  content: '';
  position: absolute;
  top: -22px;
  right: -22px;
  width: 62%;
  height: 62%;
  border-radius: var(--radius-blob);
  background: linear-gradient(135deg, var(--tint-green), var(--tint-lavender));
  z-index: 0;
  pointer-events: none;
}

.about-layout__image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  /* Резервира височина преди зареждане (снимката е отдалечена и без
     intrinsic размери) – спира layout shift (CLS). object-fit пази кадъра. */
  aspect-ratio: 4 / 3;
  /* лека органична форма, отекваща листото/blob-овете на бранда */
  border-radius: 46% 54% 52% 48% / 48% 46% 54% 52%;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.about-layout__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-layout__content p {
  line-height: 1.7;
}

/* ─── Contact Layout ─── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;   /* асиметричен сплит */
  gap: var(--space-lg);
  align-items: start;
}

/* Инфо-страната е брандов, органично оформен панел (мек зелено→лилав тон) */
.contact-info {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-surface-variant);
  background: linear-gradient(150deg, var(--tint-green) 0%, var(--tint-lavender) 100%);
  box-shadow: var(--shadow-sm);
}

/* Органичен blob акцент + листо – езикът на бранда */
.contact-info::before {
  content: '';
  position: absolute;
  top: -55px;
  right: -55px;
  width: 180px;
  height: 180px;
  border-radius: var(--radius-blob);
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
  pointer-events: none;
}

.contact-info::after {
  content: '';
  position: absolute;
  left: -14px;
  bottom: -14px;
  width: 96px;
  height: 96px;
  background: url('../img/leaf.svg') no-repeat center / contain;
  opacity: 0.14;
  pointer-events: none;
}

.contact-info > * {
  position: relative;
  z-index: 1;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-actions-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.map-container {
  height: 250px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-surface-variant);
}

.map-container img,
.map-container iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

/* ─── Gallery Grid (варирана мозайка) ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: var(--space-sm);
}

/* Няколко по-големи плочки → мозайка вместо еднакви квадрати.
   Позициите се пакетират плътно (dense) без празнини за 9 снимки в 3 колони. */
.gallery-grid .gallery-item:nth-child(1) { grid-column: span 2; }
.gallery-grid .gallery-item:nth-child(4) { grid-row: span 2; }
.gallery-grid .gallery-item:nth-child(7) { grid-row: span 2; }

/* ─── Two Centers Grid (Терапевтичен / Естетичен) ─── */
.centers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  align-items: stretch;
}

/* ─── Steps Grid („Как протича посещението") ─── */
.steps-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Numbered-steps connector – a soft accent line linking the three number
   badges. The footprint trail now lives in Services (§services), so this
   section stays a clean, plain numbered layout. */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 58px;                 /* спрямо центъра на кръглите номера (pad + 72px/2) */
  left: 18%;
  right: 18%;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg,
    var(--accent-therapy-deep), var(--accent-corrective-deep), var(--color-ochre-deep));
  opacity: 0.45;
  pointer-events: none;
}

/* With JS: the line draws in left-to-right when the section is reached. */
.js .steps-grid::before {
  transform: scaleX(0);
  transform-origin: left center;
}

.js .steps-grid.trail-in::before {
  transform: scaleX(1);
  transition: transform 1.2s var(--ease-fluid);
}

.steps-grid .step-card {
  z-index: 1;
}

/* ─── FAQ List ─── */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ─── Privacy Page ─── */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--container-padding);
}

.legal-content h1 {
  margin-bottom: var(--space-lg);
  color: var(--color-primary-dark);
}

.legal-content h2 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--font-title-md-size);
}

.legal-content p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.legal-content ul {
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

.legal-content ul li {
  list-style-type: disc;
  margin-bottom: var(--space-xs);
  color: var(--color-on-surface-variant);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.7s var(--ease-fluid) forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scroll-reveal: скрито начално състояние САМО при работещ JS
   (nav.js слага .js на <html>; без JS всичко е видимо). */
.js .animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
}

.js .animate-on-scroll.animate-fade-in {
  transform: none;
}

/* ─── Reduced motion: без движение, всичко видимо ─── */
@media (prefers-reduced-motion: reduce) {
  .hero__content > *,
  .hero__trust,
  .animate-fade-in,
  .js .animate-on-scroll {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .btn,
  .center-card,
  .contact-cta,
  /* Hover/state transforms that were previously ungated – snap, don't animate */
  .header-logo__mark,
  .footer-logo__mark,
  .service-detail-item,
  .social-icon,
  .faq-item summary::after {
    transition: none;
  }

  /* Stop the decorative motion (hero blobs/leaf, page-hero accents) */
  .hero__blob,
  .hero__leaf,
  .section-leaf,
  .section-footprints,
  .page-hero::before,
  .page-hero .container::before {
    animation: none;
  }

  /* Show the connector line fully, no draw-in */
  .js .steps-grid::before {
    transform: none;
    transition: none;
  }

  /* Footprint trail: reveal every step & connector, no walk-in */
  .foot-step__pad::before {
    transform: scale(1);
    transition: none;
  }

  .js .foot-step::after {
    clip-path: none;
    transition: none;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .service-detail {
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .page-body {
    padding-top: calc(68px + env(safe-area-inset-top, 0px));
  }

  .section {
    padding: var(--space-lg) 0;
  }

  /* Тематичните редове с услуги – по-стегнат панел на телефон */
  .service-detail--therapy,
  .service-detail--corrective,
  .service-detail--pedicure,
  .service-detail--manicure {
    padding: var(--space-md);
  }

  /* По-нисък wave divider, за да не застъпва съдържанието при по-малкия отстъп */
  .wave-divider {
    height: 40px;
  }

  /* Full-bleed hero: по-нисък отстъп под мобилния хедър, по-малки акценти */
  .hero__inner {
    padding-top: calc(64px + var(--space-md) + env(safe-area-inset-top, 0px));
  }

  .hero__blob--green {
    width: 220px;
    height: 220px;
    top: -60px;
    right: -50px;
  }

  .hero__blob--blue {
    width: 190px;
    height: 190px;
    bottom: -50px;
    left: -50px;
  }

  .hero__leaf {
    width: 48px;
    height: 48px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .service-detail {
    grid-template-columns: 1fr;
  }

  .service-detail--reverse .service-detail__content {
    order: 2;
  }

  .service-detail--reverse .service-detail__image {
    order: 1;
  }

  .service-detail__image {
    min-height: 280px;
  }

  .about-layout {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-info {
    padding: var(--space-md);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: var(--space-xs);
  }

  .centers-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .steps-grid::before {
    display: none;
  }

  .page-hero {
    margin-top: var(--space-md);
    padding: var(--space-xl) 0 var(--space-lg);
  }

  /* Smaller corner illustration so it never crowds the centered heading */
  .page-hero::before {
    width: 130px;
    height: 130px;
    opacity: 0.7;
    right: -20px;
    bottom: -12px;
  }

  .section--soft::before,
  .section--soft::after {
    width: 200px;
    height: 200px;
  }

  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}
