/* ==========================================================
   Ирина Стратонова — психолог. Единая таблица стилей.
   Структура: 1 переменные · 2 основа · 3 шапка · 4 первый экран ·
   5 «Обо мне» · 6 консультации · 7 статьи и видео · 8 обучение ·
   9 подвал · 10 страница статьи · 11 адаптив
   ========================================================== */

/* 1. Переменные ------------------------------------------- */
:root {
  --olive: #48531f;
  --olive-dark: #414d29;
  --olive-hover: #626e38;
  --bg: #faf5ee;
  --text: #171916;
  --line: #e3ded1;
  --panel: #eeeae0;
  --panel-light: #f0ece3;
  --font-head: Georgia, "Times New Roman", serif;
  --font-body: Arial, Helvetica, sans-serif;
  --h2: 40px;
  --h3: clamp(23px, 2.2vw, 29px);
  --h4: clamp(21px, 2vw, 25px);
}

/* 2. Основа ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font-body);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
}
h2 { font-size: var(--h2); margin: 0 0 24px; }
h3 { font-size: var(--h3); line-height: 1.25; }
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  text-decoration: underline;
  padding: 0;
}
small {
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #687961;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #75823a;
  outline-offset: 4px;
}

main { padding: 0 6%; }
section { padding: 65px 0; border-top: 1px solid #d9ddd1; scroll-margin-top: 150px; }
section:not(.hero) { max-width: 1200px; margin: 0 auto; }
section p { font-size: 17px; line-height: 1.6; }

/* Общие кнопки */
.btn {
  display: inline-block;
  background: #46521c;
  border: 1px solid #46521c;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 16px;
  margin: 0;
}
.btn.outline { background: transparent; color: #46521c; }
.btn:hover { opacity: .8; }

/* Заголовок раздела с короткой линией */
.section-heading {
  text-align: center;
  color: var(--olive-dark);
  margin: 48px auto 30px;
}
.section-heading::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background: var(--olive);
  margin: 16px auto 0;
}

/* 3. Шапка ------------------------------------------------ */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 25px;
  min-height: 76px;
  padding: 12px 6%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 34px/1.1 var(--font-head);
  white-space: nowrap;
}
.brand span {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  font: 14px var(--font-body);
  letter-spacing: 4px;
}
.brand span::after { content: ""; flex: 1; height: 1px; background: #555; }
nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 15px;
}
nav a:hover { text-decoration: underline; }
nav .header-book {
  background: var(--olive);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
nav .header-book:hover { text-decoration: none; opacity: .85; }
.search { font-size: 22px; padding: 4px 8px; text-decoration: none; }

.searchpanel { max-width: 1200px; margin: 0 auto; padding: 20px 6%; }
.searchpanel[hidden] { display: none; }
.searchpanel input {
  font: inherit;
  padding: 10px;
  width: min(100%, 420px);
  border: 1px solid #aaa;
  border-radius: 6px;
}

/* 4. Первый экран ----------------------------------------- */
.hero {
  --scene: url("images/hero.webp");
  position: relative;
  aspect-ratio: 1536 / 750;
  padding: 0;
  border: 0;
  background: var(--scene) center / 100% 100% no-repeat;
  overflow: hidden;
}
.hero-text {
  position: absolute;
  top: 6.4%;
  left: 8.15%;
  width: 39%;
  z-index: 1;
}
.rule { width: 64px; height: 3px; background: var(--olive); }
.hero h1 {
  font-size: clamp(36px, 3.55vw, 56px);
  font-style: italic;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 20px 0 24px;
  color: #171a16;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-book {
  display: inline-block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 2.9vw 6%;
  max-width: 1440px;
  margin: 0 auto;
}
.features a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 16px;
  font-size: 17px;
  line-height: 1.35;
  border-right: 1px solid #d9c9b6;
}
.features a:last-child { border: 0; }
.features a:hover { opacity: .8; }
.features svg { width: 48px; height: 48px; flex: none; color: #46521c; }

/* 5. «Обо мне» ------------------------------------------- */
#about { padding: 70px 32px; }
.about-intro { margin: 0 auto 58px; padding: 8px 0 24px; }
.about-intro h2 { text-align: center; }
.about-intro p { font-size: 18px; line-height: 1.8; margin: 20px 0; }

.request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 38px;
}
.request-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  min-width: 0;
  padding: 26px 28px;
  border-radius: 24px;
  background: var(--card-bg);
}
.request-card svg { width: 36px; height: 36px; flex: none; color: var(--card-title); }
.request-card h4 { margin: 0; font-size: var(--h4); line-height: 1.3; color: var(--card-title); }
.request-card p { margin: 0; color: var(--card-text); }
/* цвета карточек */
.rc-1 { --card-bg: #414D29; --card-title: #FFFFFF; --card-text: #E8E9DC; }
.rc-2 { --card-bg: #E5E6D6; --card-title: #414D29; --card-text: #555C4A; }
.rc-3 { --card-bg: #E0E7E7; --card-title: #35565E; --card-text: #49626A; }
.rc-4 { --card-bg: #D8C5AD; --card-title: #57442E; --card-text: #64543F; }
.rc-5 { --card-bg: #EADDD5; --card-title: #795347; --card-text: #765D52; }
.rc-6 { --card-bg: #626A54; --card-title: #FFFFFF; --card-text: #F3F0E8; }
.rc-7 { --card-bg: #EEE3C9; --card-title: #78602F; --card-text: #786A4C; }
.rc-8 { --card-bg: #B89A8D; --card-title: #48362F; --card-text: #483A34; }

.approach {
  margin: 20px 0 55px;
  padding: clamp(20px, 3vw, 40px);
  background: #eee9df;
  border-radius: 22px;
}
.approach-lead {
  max-width: none;
  margin: 0 0 24px;
  font: italic clamp(19px, 2vw, 25px)/1.5 var(--font-head);
  color: #555b42;
}
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.method { padding: 22px; background: #faf7f1; border-radius: 14px; }
.method:last-child { grid-column: 1 / -1; }
.method h4 { margin: 0 0 8px; font-size: var(--h4); line-height: 1.3; color: var(--olive-dark); }
.method-sub {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666d54;
}
.method p { margin: 0 0 5px; }

.certgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.certgrid figure {
  margin: 0;
  padding: 10px;
  background: #f8f4ed;
  border: 1px solid #ded6c7;
  border-radius: 8px;
}
.certgrid img { display: block; width: 100%; height: 155px; object-fit: contain; }

/* 6. Консультации и контакты ------------------------------ */
#contact { max-width: 1180px; padding: 64px 24px; }
.consult-intro {
  margin: 0 0 28px;
  text-align: center;
  font-size: 20px;
  line-height: 1.5;
  color: #666b59;
}
.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}
.consult-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  background: var(--panel);
  border-radius: 24px;
}
.consult-card img {
  display: block;
  width: min(100%, 224px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 22px;
}
.consult-card h3 { margin: 20px 0 8px; color: var(--olive); }
.consult-card p { margin: 8px 0; }
.consult-card .consult-time { font-size: 20px; font-weight: 600; }
.consult-btn {
  display: block;
  margin-top: auto;
  padding: 14px;
  text-align: center;
  background: var(--olive);
  color: #fff;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.consult-note { text-align: center; color: #626b50; margin: 20px 0 40px; }

.consult-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 36px 0; }
.info-tile { padding: 26px; background: var(--panel-light); border: 1px solid var(--line); border-radius: 20px; }
.info-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e1e4d2;
  color: var(--olive);
  font-size: 27px;
}
.info-tile h3 { margin: 16px 0 12px; }
.info-tile p { margin: 0; line-height: 1.7; }

.consult-faq { margin: 44px 0; }
.consult-faq h3 { text-align: center; margin-bottom: 22px; }
.consult-faq details {
  margin: 10px 0;
  padding: 0 20px;
  background: var(--panel-light);
  border: 1px solid var(--line);
  border-radius: 14px;
}
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
.consult-faq summary::after { content: "+"; font-size: 25px; color: var(--olive); }
.consult-faq details[open] summary::after { content: "−"; }
.consult-faq details p { margin: 0 0 18px; }

.contact-panel {
  margin: 44px 0;
  padding: 32px 20px;
  text-align: center;
  background: var(--panel);
  border-radius: 24px;
  scroll-margin-top: 110px;
}
.contact-panel h3 { margin: 0 0 12px; }
.contact-phone {
  display: inline-block;
  margin: 12px 0 22px;
  font-size: 30px;
  font-weight: 600;
  color: var(--olive);
}
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.contact-links a {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  padding: 15px;
  border-radius: 50%;
  background: var(--olive);
  color: #fff;
  transition: transform .2s;
}
.contact-links a:hover { transform: translateY(-3px); background: var(--olive-hover); }
.contact-links svg { width: 30px; height: 30px; }
.contact-panel .note { margin: 22px 0 0; font-size: 14px; color: #666; }

.consult-location { margin: 36px 0 0; padding: 24px; background: var(--panel); border-radius: 24px; }
.consult-location h3 { margin: 0 0 12px; }
.consult-location iframe { display: block; width: 100%; height: 320px; border: 0; border-radius: 16px; }
.consult-map-link {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 22px;
  background: var(--olive);
  color: #fff;
  border-radius: 24px;
}

/* 7. Статьи и видео --------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  max-width: 580px;
  padding: 25px;
  background: #fffdf8;
  border: 1px solid #e2e0d7;
  border-radius: 8px;
}
.card img { display: block; width: 100%; height: auto; border-radius: 10px; }
.card-link { text-decoration: underline; }
#videos .btn { margin-top: 24px; }

/* 8. Обучение --------------------------------------------- */
#course { padding: 70px 32px; }
.course-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.course-image img { display: block; width: 100%; height: auto; border-radius: 10px; }
#course .section-heading + h2 { text-align: center; margin: 0 0 28px; }
.course-status {
  display: inline-block;
  padding: 6px 14px;
  background: #e5e9d7;
  color: var(--olive);
  border-radius: 20px;
  font-size: 14px;
}
.course-cta {
  display: inline-block;
  padding: 12px 22px;
  background: var(--olive);
  color: #fff;
  border-radius: 7px;
}

.course-more {
  margin: 24px 0;
  background: #f4efe6;
  border: 1px solid #d8d2c3;
  border-radius: 16px;
  overflow: hidden;
}
.course-more > summary { padding: 20px 26px; font-size: 19px; color: var(--olive); }
.course-more > summary::after { content: "+"; font-size: 26px; }
.course-more[open] > summary::after { content: "−"; }
.course-more-content { padding: 0 26px 26px; }
.course-more-content h3 { margin-top: 24px; }
.course-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.course-blocks article { padding: 22px; background: #fbf8f2; border: 1px solid #ded6c7; border-radius: 10px; }
.course-blocks h4 { margin: 8px 0; font-size: var(--h4); line-height: 1.3; }
.course-copy { max-width: 900px; margin: 40px auto 0; line-height: 1.75; }
.course-copy h3 { margin-top: 36px; }
.course-benefits { padding-left: 24px; }
.course-benefits li { margin: 10px 0; }
.course-benefits li::marker { color: var(--olive); }
.course-cert { margin: 32px 0; padding: 18px 26px; background: #eee9dd; border-left: 4px solid var(--olive); }
.course-cert h3 { margin: 0; }

/* 9. Подвал ----------------------------------------------- */
footer { padding: 58px 5% 24px; background: #3e4929; color: #f7f4ed; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 44px;
  max-width: 1080px;
  margin: 0 auto;
}
.footer-inner h2, .footer-inner h3 { margin: 0 0 16px; color: inherit; line-height: 1.25; }
.footer-inner h2 { font-size: 28px; }
.footer-inner h3 { font-size: 22px; }
.footer-inner p, .footer-inner a { font-size: 16px; line-height: 1.65; color: #eeeade; }
.footer-inner p { margin: 0 0 12px; }
.footer-inner a:hover { text-decoration: underline; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.footer-inner .footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff18;
  color: #fff;
}
.footer-inner .footer-social a:hover { background: #ffffff30; text-decoration: none; }
.footer-social svg { width: 21px; height: 21px; }
.footer-bottom {
  max-width: 1080px;
  margin: 36px auto 0;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #e0ddce;
  border-top: 1px solid #ffffff30;
}

/* 10. Страница статьи ------------------------------------- */
.article-page { max-width: 850px; margin: 0 auto; padding: 48px 20px 72px; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--olive); text-decoration: underline; text-underline-offset: 4px; }
.article-page h1 { font-size: clamp(30px, 4vw, 40px); margin: 0 0 24px; }
.article-page > img { display: block; width: 100%; height: auto; border-radius: 8px; }
.love-text p { line-height: 1.75; margin: 1.2em 0; }
.love-text blockquote {
  margin: 1.5em 0;
  padding: 18px 24px;
  border-left: 3px solid var(--olive);
  background: #eee9dc;
  color: var(--olive);
  font-weight: 600;
}
.love-text h3 { margin-top: 1.8em; font-size: 25px; }

/* 11. Адаптив --------------------------------------------- */
@media (max-width: 1100px) {
  header { justify-content: center; padding: 10px 5%; }
  .brand { font-size: 30px; }
  .brand span { font-size: 13px; }
  nav { justify-content: center; gap: 14px; font-size: 14px; }
  .search { font-size: 20px; }

  .hero { aspect-ratio: auto; display: flex; flex-direction: column; background: #f8eee3; }
  .hero-text { position: static; width: auto; padding: 30px 7%; }
  .hero h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; margin: 20px 0; }
  .hero .rule { width: 55px; height: 2px; }
  .hero .btn { font-size: 15px; padding: 12px 17px; border-radius: 7px; }
  .hero::after {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: .98;
    background: var(--scene) right center / auto 100% no-repeat;
  }

  .features { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 20px 6%; }
  .features a { padding: 5px; gap: 10px; font-size: 14px; }
  .features a:nth-child(even) { border-right: 0; }
  .features svg { width: 32px; height: 32px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  section p { font-size: 16px; }
  section { padding: 40px 0; }
  .hero h1 { line-height: 1.12; }

  #about { padding: 36px 20px; }
  .about-intro { padding: 0 0 16px; margin-bottom: 36px; }
  .method-grid { grid-template-columns: 1fr; }
  .method { padding: 16px; }
  .approach-lead br { display: none; }
  .certgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .certgrid img { height: 120px; }
  .section-heading { margin: 32px auto 24px; }

  .cards { grid-template-columns: 1fr; }
  #course { padding: 40px 20px; }
  .course-layout, .course-blocks { grid-template-columns: 1fr; }
  .course-more-content { padding: 0 16px 18px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 40px 5% 22px; }
  .footer-bottom { margin-top: 28px; }
}

@media (max-width: 650px) {
  .request-grid { grid-template-columns: 1fr; }
  .request-card { padding: 22px; }
  #contact { padding: 40px 16px; }
  .consult-grid, .consult-info { grid-template-columns: 1fr; }
  .contact-links { gap: 10px; }
  .contact-links a { width: 48px; height: 48px; padding: 10px; }
}

/* Баннер согласия на аналитику (analytics.js) ------------- */
.analytics-panel[hidden] { display: none; }
.analytics-panel {
  position: fixed;
  z-index: 9999;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 560px;
  margin: 0 auto;
  padding: 22px;
  max-height: 85vh;
  overflow: auto;
  background: var(--bg);
  color: #302e27;
  border: 1px solid #d9d3c6;
  border-radius: 16px;
  box-shadow: 0 8px 32px #0002;
  text-align: left;
  font: 15px/1.5 var(--font-body);
}
.analytics-panel h2 { margin: 0 0 10px; font: 600 22px var(--font-head); color: #46522b; }
.analytics-panel p { margin: 8px 0; font-size: 14px; line-height: 1.5; }
.analytics-panel a { color: #46522b; text-decoration: underline; }
.analytics-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.analytics-actions button {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  background: #46522b;
  color: #fff;
  border: 1px solid #46522b;
  border-radius: 8px;
  text-decoration: none;
}
.analytics-settings { display: block; margin: 12px auto 0; color: inherit; }
