* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sand: #FDFAF5;
  --olive: #9AA97C;
  --olive-deep: #7B8A5E;
  --terracotta: #D4A27A;
  --sea: #8BA7A7;
  --fig: #5C504B;
  --stone: #E8E2D5;
  --white: #FFFFFF;
  --text-dark: #3A3530;
  --text-soft: #6B635C;
  --shadow: 0 20px 35px -12px rgba(0,0,0,0.05);
}

body {
  background: var(--sand);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

h1, h2, h3, .logo {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 2.6rem; margin-bottom: 1.5rem; position: relative; display: inline-block; }
h2:after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 2px; background: var(--terracotta); }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

.section { padding: 60px 0; border-bottom: 1px solid var(--stone); }

/* НАВИГАЦИЯ */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; flex-wrap: wrap; gap: 20px; }
.logo { font-size: 1.9rem; font-weight: 600; }
.logo span { color: var(--olive); }
.nav-links { display: flex; gap: 36px; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: 0.2s; }
.nav-links a:hover { color: var(--terracotta); }

/* КНОПКИ */
.btn { display: inline-block; padding: 12px 32px; border-radius: 60px; font-weight: 600; text-decoration: none; transition: 0.25s; font-family: 'Inter', sans-serif; cursor: pointer; border: none; }
.btn-primary { background: var(--olive); color: white; }
.btn-primary:hover { background: var(--olive-deep); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--olive); color: var(--olive); background: transparent; }
.btn-outline:hover { background: var(--olive); color: white; }
.btn-small { padding: 8px 20px; font-size: 0.8rem; }

/* HERO */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 0 0 40px 0; }
.hero-badge { background: var(--stone);
  display: inline-block;
  padding: 2px 18px;
  border-radius: 60px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fig); }
.hero-image { background: linear-gradient(135deg, #E2DCCF 0%, #CEC6B7 100%);
  border-radius: 35% 65% 40% 60% / 55% 45% 55% 45%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Сдвиг текстового блока вверх на ПК */
.hero > div:first-child {
  margin-top: -80px;
}

/* СЕТКИ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-top: 32px; }
.card { background: var(--white); border-radius: 28px; padding: 40px 32px; transition: 0.3s; box-shadow: var(--shadow); }
.card:hover { transform: translateY(-5px); }
.card i { font-size: 2.2rem; color: var(--terracotta); margin-bottom: 24px; }

/* ОБО МНЕ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-photo {
  background: var(--stone);
  border-radius: 32px;
  min-height: 370px;
  display: flex;
  align-items: center;
  background: none;
  justify-content: center;
  overflow: hidden;
}
.about-photo img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  display: block;
  border-radius: 32px;
  transform: scale(1.5);
}

/* СЧЁТЧИКИ */
.counters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; margin: 40px 0; }
.counter-number { font-size: 2.8rem; font-weight: 700; color: var(--olive); font-family: 'Playfair Display'; }
.counter-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* ПОСТЫ */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 40px 0; }
.post-card { background: var(--white); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.post-card h4 { font-size: 1.4rem; margin-bottom: 12px; }
.post-summary { color: var(--text-soft); margin-bottom: 16px; }

/* ПРОМО-СОВЕТЫ */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 40px 0; }
.promo-card { background: var(--white); border-radius: 28px; padding: 28px 24px; box-shadow: var(--shadow); text-align: center; }
.promo-card i { font-size: 2rem; color: var(--olive); margin-bottom: 16px; }

/* ДИПЛОМЫ И ОТЗЫВЫ */
.diploma-grid, .reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.diploma-card, .review-card { background: var(--white); border-radius: 24px; padding: 24px; text-align: center; }
.review-card i { color: var(--terracotta); margin-bottom: 12px; }

/* КАК ПРОХОДЯТ КОНСУЛЬТАЦИИ */
.howto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 40px 0; }
.howto-step { text-align: center; }
.howto-step .step-number { font-size: 2.5rem; font-weight: 700; color: var(--olive); font-family: 'Playfair Display'; }

/* FAQ */
.faq-item { margin-bottom: 24px; border-bottom: 1px solid var(--stone); padding-bottom: 16px; }
.faq-question { font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.faq-answer { display: none; margin-top: 12px; color: var(--text-soft); }

/* СОЦСЕТИ */
.social-links { display: flex; gap: 32px; justify-content: center; margin: 40px 0; }
.social-links a { font-size: 2.2rem; color: var(--olive); transition: 0.2s; }
.social-links a:hover { color: var(--terracotta); }

/* ФОРМА */
.form-card { background: var(--white); border-radius: 32px; padding: 48px; max-width: 700px; margin: 0 auto; box-shadow: var(--shadow); }
input, textarea { width: 100%; padding: 14px 0; border: none; border-bottom: 1px solid var(--stone); background: transparent; margin-bottom: 28px; outline: none; font-family: 'Inter', sans-serif; }
input:focus, textarea:focus { border-bottom-color: var(--terracotta); }
.checkbox { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 0.85rem; }

/* ФУТЕР */
.footer { background: var(--fig); color: #E4DDD2; padding: 56px 0 32px; }
.footer a { color: var(--stone); text-decoration: none; }
.footer-col { flex: 1; min-width: 180px; }
.footer .social-icons a { font-size: 1.4rem; margin-right: 16px; }

/* COOKIE И МОДАЛКА */
.cookie-bar { position: fixed; bottom: 24px; left: 24px; right: 24px; background: var(--fig); color: white; padding: 14px 28px; border-radius: 60px; display: flex; justify-content: space-between; align-items: center; gap: 20px; z-index: 1000; flex-wrap: wrap; }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1100; visibility: hidden; opacity: 0; transition: 0.2s; }
.modal.active { visibility: visible; opacity: 1; }
.modal-content { background: white; max-width: 560px; padding: 40px; border-radius: 32px; }

/* ==================== */
/* ПК: ЗАГОЛОВКИ ПО ЦЕНТРУ, ПОДЧЁРКИВАНИЕ СЛЕВА */
/* ==================== */
@media (min-width: 851px) {
  .section h2,
  .container > h2,
  .container > div > h2 {
    text-align: center !important;
    display: inline-block !important;
    width: auto !important;
  }
  
  .section h2:after,
  .container > h2:after {
    left: 0 !important;
    transform: none !important;
  }
  
  /* ОТМЕНА ДЛЯ ABOUT И HERO */
  #about h2,
  .about-grid h2,
  .hero h1,
  .hero h2,
  .hero-badge {
    text-align: left !important;
  }
  
  #about h2:after,
  .about-grid h2:after {
    left: 0 !important;
    transform: none !important;
  }
  
  /* Сдвиг текстового блока вверх на ПК (уже есть выше, но добавим и сюда для надёжности) */
  .hero > div:first-child {
    margin-top: -30px;
  }
}

/* ==================== */
/* ТЕЛЕФОН: ВСЕ ЗАГОЛОВКИ СЛЕВА, СДВИГ ОТМЕНЁН */
/* ==================== */
@media (max-width: 850px) {
  .container { padding: 0 28px; }
  .hero, .about-grid, .grid-3, .promo-grid, .diploma-grid, .reviews-grid, .howto-grid, .posts-grid, .grid-2, .counters-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.8rem; }
  .section { padding: 60px 0; }
  .cookie-bar { flex-direction: column; text-align: center; border-radius: 28px; }

  /* ФОТО В БЛОКЕ "ОБО МНЕ" НА ТЕЛЕФОНЕ */
  .about-photo {
    border-radius: 40px;
    overflow: hidden;
    min-height: auto;
    background: var(--stone);
  }
  .about-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
    object-fit: cover;
    transform: scale(1.02);
  }
  
  /* ЗАГОЛОВКИ НА ТЕЛЕФОНЕ — СЛЕВА */
  .section h2,
  .container > h2,
  .container > div > h2,
  .services h2,
  .programs h2,
  .howto h2,
  .diplomas h2,
  .reviews-section h2,
  .promo-tips h2,
  .faq h2,
  .contact h2,
  .posts-nutrition h2,
  .posts-aroma h2 {
    text-align: left !important;
  }
  
  .section h2:after,
  .container > h2:after {
    left: 0 !important;
    transform: none !important;
  }
  
  /* ОТМЕНЯЕМ СДВИГ ТЕКСТОВОГО БЛОКА НА ТЕЛЕФОНЕ */
  .hero > div:first-child {
    margin-top: 0;
  }
}

/* АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== */
/* СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ДИПЛОМОВ */
/* ==================== */
.diploma-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.diploma-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: zoom 0.3s ease-in-out;
}

@keyframes zoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.diploma-modal-close {
  position: absolute;
  top: 25px;
  right: 40px;
  color: #f1f1f1;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2001;
}

.diploma-modal-close:hover {
  color: var(--terracotta);
}

@media (max-width: 850px) {
  .diploma-modal-close {
    font-size: 40px;
    top: 15px;
    right: 20px;
  }
}
/* ======================================== */
/* БУРГЕР-МЕНУ (мобильная версия) */
/* ======================================== */

/* По умолчанию всё скрыто */
.burger-menu,
.mobile-nav,
.mobile-overlay {
  display: none;
}

/* Бургер-кнопка */
.burger-menu {
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  padding: 10px 5px;
  background: none;
  border: none;
  position: relative;
}

.burger-menu span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.4s ease-in-out;
  transform-origin: center;
}

/* Анимация в крестик */
.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Затемнение */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Мобильное меню */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 320px;
  height: 100%;
  background: var(--sand);
  z-index: 999;
  padding: 100px 30px 40px;
  transition: right 0.4s ease-in-out;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  margin: 0;
  border-bottom: 1px solid var(--stone);
}

.mobile-nav ul li a {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-nav ul li a:hover {
  color: var(--terracotta);
  padding-left: 8px;
}

/* ======================================== */
/* БАЗОВЫЙ АДАПТИВ (страховка) */
/* ======================================== */

/* Показываем бургер только на узких экранах */
@media (max-width: 850px) {
  .burger-menu {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .mobile-overlay {
    display: block;
  }
  
  .nav-links {
    display: none !important;
  }
}

/* Для широких экранов — скрываем бургер и показываем обычное меню */
@media (min-width: 851px) {
  .burger-menu,
  .mobile-nav,
  .mobile-overlay {
    display: none !important;
  }
  
  .nav-links {
    display: flex !important;
  }
}

/* Дополнительная страховка для горизонтальных телефонов */
@media (max-width: 850px) and (orientation: landscape) {
  /* Если экран горизонтальный и шире 650px — показываем обычное меню */
  @media (min-width: 651px) {
    .burger-menu,
    .mobile-nav,
    .mobile-overlay {
      display: none !important;
    }
    
    .nav-links {
      display: flex !important;
    }
  }
}
/* ======================================== */
/* УБИРАЕМ МОБИЛЬНУЮ ПОДСВЕТКУ ПРИ НАЖАТИИ */
/* ======================================== */

/* Для всех элементов, которые могут быть нажаты */
button,
a,
.burger-menu,
.selector-btn,
.btn,
.btn-retrit,
.day-header,
.faq-question,
.slider-prev,
.slider-next,
.dot,
.diploma-card img,
[onclick] {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Дополнительная страховка для iOS Safari */
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent !important;
}

/* Для элементов с курсором pointer (ссылки, кнопки) */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Если хотите оставить минимальный отклик, можно задать свой цвет */
/* Например, легкий оттенок оливкового вместо синего */
/*
* {
    -webkit-tap-highlight-color: rgba(154, 169, 124, 0.3);
}
*/