/* ===========================================================
   Злата — сайт психолога. Общие стили.
   Палитра: тёплый песок, глина, приглушённый терракот.
   =========================================================== */

:root {
  --sand-50:  #FBF8F5;
  --sand-100: #F5EFE8;
  --sand-200: #EFE7DE;
  --sand-300: #E2D5C8;
  --clay-400: #C9A98F;
  --clay-500: #B08968;
  --brown-600:#8A6A55;
  --brown-700:#6B4A3A;
  --brown-800:#4A3527;
  --ink:      #33291F;
  --ink-soft: #5C5044;
  --white:    #FFFFFF;

  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1120px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 12px rgba(74, 53, 39, .06);
  --shadow-md: 0 8px 32px rgba(74, 53, 39, .10);
  --shadow-lg: 0 20px 60px rgba(74, 53, 39, .14);
  --t: .38s cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--brown-800);
  line-height: 1.18;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1.1em; }
a { color: var(--brown-700); text-decoration-color: var(--clay-400); text-underline-offset: 3px; }
a:hover { color: var(--clay-500); }

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

section { padding: clamp(56px, 8vw, 104px) 0; }
section.tight { padding: clamp(40px, 5vw, 64px) 0; }

.bg-sand   { background: var(--sand-100); }
.bg-sand-2 { background: var(--sand-200); }
.bg-white  { background: var(--white); }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-500);
  margin: 0 0 1em;
  font-weight: 600;
}

.lead { font-size: clamp(1.06rem, 1.7vw, 1.24rem); color: var(--ink-soft); line-height: 1.62; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 15px 30px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 1rem; font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
  white-space: nowrap;
}
.btn-primary { background: var(--brown-700); color: var(--sand-50); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brown-800); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--brown-700); border-color: var(--clay-400); }
.btn-ghost:hover { background: var(--sand-200); color: var(--brown-800); transform: translateY(-2px); }
.btn-lg { padding: 18px 38px; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 245, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.site-header.scrolled { border-bottom-color: var(--sand-300); box-shadow: 0 2px 20px rgba(74,53,39,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--clay-400), var(--brown-700));
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-family: var(--serif); font-size: 1.22rem; color: var(--brown-800); }
.logo-sub { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--clay-500); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px; border-radius: 100px;
  font-size: .95rem; text-decoration: none; color: var(--ink-soft);
  transition: background var(--t), color var(--t);
}
.nav a:hover { background: var(--sand-200); color: var(--brown-800); }
.nav a.active { color: var(--brown-800); background: var(--sand-200); }
.nav .btn { margin-left: 10px; padding: 11px 22px; font-size: .93rem; }
.nav .btn:hover { background: var(--brown-800); }

.burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px; border-radius: 12px;
}
.burger span { display: block; height: 2px; background: var(--brown-700); border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.burger span + span { margin-top: 6px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 74px 0 auto; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--sand-50); padding: 18px 24px 30px;
    border-bottom: 1px solid var(--sand-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform var(--t), opacity var(--t);
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 13px 16px; font-size: 1.02rem; }
  .nav .btn { margin: 10px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(44px, 6vw, 84px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -220px; right: -180px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,143,.22), transparent 68%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
.hero h1 { margin-bottom: .45em; }
.hero-quote {
  border-left: 3px solid var(--clay-400);
  padding: 2px 0 2px 22px;
  margin: 0 0 30px;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.9vw, 1.28rem);
  line-height: 1.56;
  color: var(--brown-700);
  font-style: italic;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%; border-radius: 200px 200px var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.hero-badge {
  position: absolute; left: -18px; bottom: 34px;
  background: var(--white); border-radius: var(--radius);
  padding: 14px 20px; box-shadow: var(--shadow-md);
  font-size: .88rem; line-height: 1.4; max-width: 210px;
}
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--brown-700); font-weight: 400; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 380px; margin: 0 auto; }
  .hero-photo img { border-radius: var(--radius-lg); }
  .hero-badge { left: auto; right: -6px; bottom: -14px; }
}

/* ---------- Страничные шапки ---------- */
.page-head { padding: clamp(44px, 6vw, 76px) 0 clamp(28px, 4vw, 44px); background: var(--sand-100); }
.page-head h1 { margin-bottom: .35em; }
.page-head .lead { max-width: 660px; }

/* ---------- Сетки и карточки ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sand-300); }
.card h3 { margin-bottom: .5em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--sand-200); color: var(--brown-700);
  display: grid; place-items: center; margin-bottom: 18px;
  font-size: 1.3rem;
}

/* Карточка формата */
.format-card { display: flex; flex-direction: column; }
.format-card .format-meta {
  margin-top: auto; padding-top: 20px; border-top: 1px solid var(--sand-200);
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--ink-soft);
}
.format-card .format-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Список-маркеры */
.ticks { list-style: none; margin: 0 0 1.4em; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.ticks li::before {
  content: ''; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--clay-400);
}
.ticks.dashes li::before { width: 14px; height: 2px; border-radius: 2px; top: .82em; left: 0; }

/* Шаги */
.steps { counter-reset: s; display: grid; gap: 20px; }
.step { position: relative; padding-left: 62px; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: -2px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--sand-200); color: var(--brown-700);
  font-family: var(--serif); font-size: 1.2rem;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: .3em; }
.step p { margin-bottom: 0; }

/* Цитата-врезка */
.pull {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 1.5;
  color: var(--brown-700);
  border-left: 3px solid var(--clay-400);
  padding-left: 26px; margin: 0;
}

/* Двухколоночный блок с фото */
.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.reverse { grid-template-columns: 1.08fr .92fr; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
@media (max-width: 860px) { .split, .split.reverse { grid-template-columns: 1fr; } .split img { max-width: 420px; margin: 0 auto; } }

/* ---------- Расписание ---------- */
.event {
  display: grid; grid-template-columns: 108px 1fr auto; gap: 24px; align-items: center;
  background: var(--white); border: 1px solid var(--sand-200);
  border-radius: var(--radius); padding: 22px 26px; margin-bottom: 14px;
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
.event:hover { box-shadow: var(--shadow-sm); border-color: var(--sand-300); transform: translateX(3px); }
.event.is-free { border-left: 3px solid var(--clay-400); }
.event-date { text-align: center; }
.event-day { font-family: var(--serif); font-size: 2rem; color: var(--brown-700); line-height: 1; }
.event-month { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--clay-500); margin-top: 4px; }
.event-body h3 { font-size: 1.16rem; margin-bottom: .25em; }
.event-body p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: .76rem; letter-spacing: .02em;
  background: var(--sand-200); color: var(--brown-700);
}
.tag.free { background: #E8EFE4; color: #4A6B3A; }
.tag.few { background: #F6E7DE; color: #9A5B3A; }
@media (max-width: 720px) {
  .event { grid-template-columns: 64px 1fr; gap: 16px; padding: 18px; }
  .event .btn { grid-column: 1 / -1; width: 100%; }
  .event-day { font-size: 1.6rem; }
}

.schedule-note {
  background: var(--sand-100); border-radius: var(--radius);
  padding: 22px 26px; font-size: .94rem; color: var(--ink-soft);
}

/* ---------- Статьи ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter {
  padding: 9px 20px; border-radius: 100px; border: 1px solid var(--sand-300);
  background: transparent; color: var(--ink-soft); font-size: .92rem; font-family: var(--sans);
  cursor: pointer; transition: all var(--t);
}
.filter:hover { border-color: var(--clay-400); color: var(--brown-700); }
.filter.active { background: var(--brown-700); border-color: var(--brown-700); color: var(--sand-50); }

.post {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sand-300); color: inherit; }
.post-top { padding: 26px 26px 0; display: flex; gap: 10px; align-items: center; }
.post-body { padding: 16px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 1.24rem; margin-bottom: .45em; }
.post-body p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1em; }
.post-meta { margin-top: auto; padding-top: 14px; font-size: .84rem; color: var(--clay-500); display: flex; gap: 16px; }
.post.is-hidden { display: none; }

/* Текст статьи */
.article-body { font-size: 1.08rem; line-height: 1.78; }
.article-body h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.5em; }
.article-body ul { padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 26px;
  border-left: 3px solid var(--clay-400);
  font-family: var(--serif); font-style: italic; font-size: 1.14rem; color: var(--brown-700);
}

/* ---------- Форма ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 42px);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .92rem; font-weight: 500; color: var(--brown-700); margin-bottom: 7px; }
.field .hint { font-size: .84rem; color: var(--ink-soft); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--sand-300); border-radius: 14px;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--sand-50);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--clay-400); background: var(--white);
  box-shadow: 0 0 0 4px rgba(201,169,143,.16);
}
.field textarea { min-height: 132px; resize: vertical; }
.field.error input, .field.error textarea { border-color: #C2705A; }
.field .err { display: none; color: #C2705A; font-size: .84rem; margin-top: 6px; }
.field.error .err { display: block; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); margin-bottom: 24px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brown-700); }

.form-success {
  display: none; text-align: center; padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .tick {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--sand-200); color: var(--brown-700);
  display: grid; place-items: center; font-size: 1.7rem;
}
form.hidden { display: none; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- Контакты и ссылки ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-line { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.contact-line .ic {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  background: var(--sand-200); color: var(--brown-700);
  display: grid; place-items: center;
}
.contact-line .lb { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--clay-500); }
.contact-line .vl { font-size: 1.06rem; color: var(--brown-800); }
.contact-line a { text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.link-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: 16px;
  background: var(--white); border: 1px solid var(--sand-200);
  text-decoration: none; color: var(--ink);
  transition: all var(--t);
}
.link-tile:hover { border-color: var(--clay-400); transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--brown-800); }
.link-tile .ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--sand-200); }
.link-tile .nm { font-size: .96rem; line-height: 1.25; }
.link-tile .sb { font-size: .78rem; color: var(--ink-soft); }
.link-tile.soon { opacity: .55; pointer-events: none; }

/* ---------- CTA-полоса ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brown-700), var(--brown-800));
  color: var(--sand-100); border-radius: var(--radius-lg);
  padding: clamp(34px, 5vw, 60px); text-align: center;
}
.cta-band h2 { color: var(--sand-50); }
.cta-band p { color: rgba(245,239,232,.86); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: var(--sand-100); color: var(--brown-800); }
.cta-band .btn-primary:hover { background: var(--white); color: var(--brown-800); }
.cta-band .btn-ghost { color: var(--sand-100); border-color: rgba(245,239,232,.42); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 26px; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); border: 1px solid var(--sand-200);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  padding: 20px 26px; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 1.1rem; color: var(--brown-800);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: background var(--t);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--sand-50); }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--clay-500); flex-shrink: 0; transition: transform var(--t); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 26px 22px; color: var(--ink-soft); }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Дисклеймер ---------- */
.disclaimer {
  background: var(--sand-200); border-radius: var(--radius);
  padding: 22px 26px; font-size: .9rem; color: var(--ink-soft); line-height: 1.6;
}

/* ---------- Подвал ---------- */
.site-footer { background: var(--brown-800); color: rgba(245,239,232,.76); padding: 56px 0 30px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.site-footer h4 { color: var(--sand-100); font-size: 1rem; margin-bottom: .8em; font-family: var(--sans); font-weight: 600; letter-spacing: .02em; }
.site-footer a { color: rgba(245,239,232,.76); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(245,239,232,.16); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .85rem; color: rgba(245,239,232,.55);
}

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Утилиты ---------- */
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 22px; }
.mt-3 { margin-top: 34px; }
.stack > * + * { margin-top: 14px; }
.section-head { max-width: 720px; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Иконки ---------- */
.ic-lg { width: 24px; height: 24px; }
.ic-sm { width: 14px; height: 14px; flex-shrink: 0; }
.format-meta span { align-items: center; }

/* Hero: не даём фото растягивать блок сверх меры */
.hero-photo img { max-height: 620px; }
@media (min-width: 861px) { .hero-grid { align-items: center; } }

/* Фикс: .nav a перебивал цвет текста кнопки в шапке */
.nav a.btn.btn-primary { color: var(--sand-50); }
.nav a.btn.btn-primary:hover { color: var(--white); background: var(--brown-800); }
.nav a.btn.btn-ghost { color: var(--brown-700); }

/* ===========================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   =========================================================== */

/* Убираем синюю подсветку тапов и «резину» на iOS */
* { -webkit-tap-highlight-color: transparent; }
body { text-rendering: optimizeLegibility; }

/* Длинные слова и ссылки не рвут вёрстку */
h1, h2, h3, p, li, .vl, .event-body h3 { overflow-wrap: break-word; }

/* Меню на всю высоту экрана с учётом адресной строки iOS */
@media (max-width: 900px) {
  .nav { max-height: calc(100dvh - 74px); padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .nav a { min-height: 46px; display: flex; align-items: center; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Планшет ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero-grid { gap: 30px; }
  section { padding: 52px 0; }
  .cta-band { padding: 34px 24px; }
}

/* ---------- Телефон ---------- */
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }

  h1 { font-size: 2rem; line-height: 1.15; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.18rem; }
  .lead { font-size: 1.02rem; }

  section { padding: 44px 0; }
  section.tight { padding: 34px 0; }
  .section-head { margin-bottom: 26px; }

  /* Hero: фото сверху, компактнее */
  .hero { padding: 18px 0 40px; }
  .hero::before { width: 380px; height: 380px; top: -160px; right: -140px; }
  .hero-photo { max-width: 300px; margin: 0 auto 26px; }
  .hero-photo img { max-height: 380px; border-radius: 22px; }
  .hero-badge { right: -4px; bottom: -16px; padding: 11px 15px; font-size: .8rem; max-width: 175px; }
  .hero-badge strong { font-size: 1.25rem; }
  .hero-quote { padding-left: 16px; font-size: 1.04rem; margin-bottom: 24px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; }

  /* Кнопки: во всю ширину и удобные для пальца */
  .btn { padding: 15px 26px; min-height: 50px; }
  .btn-lg { padding: 16px 28px; font-size: 1rem; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }

  /* Карточки компактнее */
  .card { padding: 24px 20px; border-radius: 22px; }
  .grid { gap: 14px; }
  .card-icon { width: 42px; height: 42px; margin-bottom: 14px; }

  /* Шаги */
  .step { padding-left: 52px; }
  .step::before { width: 36px; height: 36px; font-size: 1.05rem; }

  /* Расписание: дата над текстом, кнопка во всю ширину */
  .event { grid-template-columns: 56px 1fr; gap: 14px; padding: 18px 16px; border-radius: 20px; }
  .event-day { font-size: 1.5rem; }
  .event-month { font-size: .7rem; }
  .event-body h3 { font-size: 1.06rem; }
  .event-body p { font-size: .9rem; }
  .event .btn { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
  .tag { font-size: .72rem; padding: 3px 10px; }

  /* Фильтры статей — горизонтальная лента вместо переноса */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-left: -18px; margin-right: -18px; padding: 0 18px 4px;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; }

  /* Форма */
  .form-card { padding: 22px 18px; border-radius: 22px; }
  .field input, .field textarea { font-size: 16px; padding: 13px 14px; }
  .field textarea { min-height: 110px; }
  .consent { font-size: .85rem; }

  /* Контакты и плитки */
  .contact-line { gap: 13px; margin-bottom: 18px; }
  .links-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .link-tile { padding: 13px 14px; }
  .link-tile .nm { font-size: .88rem; }
  .link-tile .sb { font-size: .72rem; }

  /* Цитаты и текст статей */
  .pull { font-size: 1.14rem; padding-left: 18px; }
  .article-body { font-size: 1.02rem; line-height: 1.72; }
  .article-body blockquote { font-size: 1.06rem; padding-left: 18px; margin: 1.3em 0; }

  /* FAQ */
  .faq summary { padding: 16px 18px; font-size: 1.02rem; }
  .faq .faq-a { padding: 0 18px 18px; }

  /* Врезки */
  .disclaimer, .schedule-note { padding: 18px; font-size: .87rem; }
  .cta-band { padding: 30px 20px; border-radius: 24px; }

  /* Шапки страниц */
  .page-head { padding: 30px 0 24px; }

  /* Подвал с учётом липкой панели */
  .site-footer { padding: 40px 0 calc(90px + env(safe-area-inset-bottom)); }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ---------- Узкие телефоны ---------- */
@media (max-width: 380px) {
  .wrap { padding: 0 15px; }
  h1 { font-size: 1.82rem; }
  .logo-name { font-size: 1.1rem; }
  .logo-sub { font-size: .62rem; }
  .links-grid { grid-template-columns: 1fr; }
  .hero-badge { max-width: 158px; font-size: .76rem; }
}

/* ---------- Липкая кнопка записи (только телефон) ---------- */
.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 248, 245, .93);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--sand-300);
  gap: 10px;
}
.mobile-cta .btn { flex: 1; min-height: 50px; padding: 14px 18px; font-size: .97rem; }
@media (max-width: 620px) {
  .mobile-cta { display: flex; }
}

/* ---------- Горизонтальная ориентация телефона ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .nav { max-height: calc(100dvh - 60px); }
  .hero-photo { max-width: 220px; }
}

/* Фильтры: удобная высота для пальца */
.filter { min-height: 44px; padding: 10px 20px; }

/* Липкая панель появляется только после прокрутки первого экрана */
.mobile-cta { transform: translateY(130%); transition: transform .32s cubic-bezier(.22,.61,.36,1); }
.mobile-cta.show { transform: none; }
