/* ===== ESTET-PODBOR.RU GLOBAL CSS ===== */
/* v2.0 — комплексный фикс мобильной вёрстки и дизайна */

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: #1a1a2e !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3) !important;
}
.header-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 60px !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box;
}
.logo {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.logo span { color: #7B5EA7 !important; }
.header-phone {
  color: #e8c4a0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  margin-left: auto !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.header-phone:hover { color: #fff !important; }
.btn-header {
  background: #7B5EA7 !important;
  color: #fff !important;
  padding: 7px 14px !important;
  border-radius: 50px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.btn-header:hover { background: #5a3f8a !important; }

/* ============================================================
   MEGA MENU
   ============================================================ */
.nav-mega {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 1 !important;
  min-width: 0;
  overflow: visible !important;
}
.nav-group {
  position: relative !important;
  padding-bottom: 8px !important;
  margin-bottom: -8px !important;
}
.nav-category {
  display: flex !important;
  align-items: center !important;
  padding: 5px 8px !important;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  cursor: default !important;
}
.nav-category:hover,
.nav-group:hover .nav-category {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}
span.nav-category {
  display: flex !important;
  align-items: center !important;
  padding: 5px 8px !important;
  color: rgba(255,255,255,0.85) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  cursor: default !important;
  user-select: none !important;
}
span.nav-category:hover,
.nav-group:hover span.nav-category {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}
.nav-dropdown {
  display: none !important;
  position: absolute !important;
  top: calc(100% + 0px) !important;
  left: 0 !important;
  background: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18) !important;
  min-width: 230px !important;
  padding: 8px 0 !important;
  z-index: 99999 !important;
  margin-top: 0 !important;
}
.nav-group:hover .nav-dropdown { display: block !important; }
.nav-dropdown:hover { display: block !important; }
.nav-dropdown a {
  display: block !important;
  padding: 9px 18px !important;
  color: #1a1a2e !important;
  text-decoration: none !important;
  font-size: 13px !important;
  background: #fff !important;
}
.nav-dropdown a:hover {
  background: #f0eafa !important;
  color: #7B5EA7 !important;
}
.nav-link {
  padding: 5px 8px !important;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  border-radius: 6px !important;
}
.nav-link:hover {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
}

/* ============================================================
   HERO — ГЛАВНЫЙ ФИХ КНОПКИ И SVG-ИЗОБРАЖЕНИЯ
   ============================================================ */

/* Универсальный hero layout */
/* hero-inner десктоп — не трогаем, пусть страница держит свой layout */

.hero-content {
  min-width: 0; /* страховка от переполнения */
}



/* SVG / og-images — единый стиль для всех страниц */
.hero-image img,
.hero-img img,
.hero-photo img {
  width: 100% !important;
  height: auto !important;
    object-fit: contain !important;
  border-radius: 16px !important;
  display: block !important;
}

/* Кнопка hero — не должна касаться картинки */
.btn-primary,
.hero-content .btn-primary,
.hero-content a[class*="btn"] {
  display: inline-block;
  position: relative;
  z-index: 1;
}

/* Отступ между кнопкой и картинкой на планшете */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-inner,
  .hero-wrapper {
    gap: 24px !important;
  }
  .hero-image,
  .hero-img,
  .hero-photo {
  }
}

/* Мобильный hero — полная перестройка в колонку */
@media (max-width: 768px) {
  .hero-inner,
  .hero-wrapper {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
    text-align: center !important;
  }

  .hero-content {
    width: 100% !important;
    min-width: 0 !important;
    order: 1 !important;
  }

  .hero-image,
  .hero-img,
  .hero-photo {
    width: 100% !important;
    max-width: 340px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    order: 2 !important;        /* Картинка ПОСЛЕ кнопки — не перекрывает */
  }

  .hero-image img,
  .hero-img img,
  .hero-photo img {
    max-height: 220px !important;
  }

  /* hero stats — 2 в ряд */
  .hero-stats,
  .stats-row,
  .hero-numbers {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
  }
  .hero-stat,
  .stat-item,
  .stat {
    flex: 0 0 calc(50% - 8px) !important;
    text-align: center !important;
    min-width: 0 !important;
  }

  /* Паддинги hero */
  .hero,
  .hero-section {
    padding: 36px 16px 32px !important;
  }

  h1 { font-size: 22px !important; line-height: 1.35 !important; }
  h2 { font-size: 19px !important; line-height: 1.4 !important; }
  h3 { font-size: 16px !important; }
}

@media (max-width: 480px) {
  .hero-image,
  .hero-img,
  .hero-photo {
    max-width: 260px !important;
  }
  .hero-image img,
  .hero-img img,
  .hero-photo img {
    max-height: 180px !important;
  }
}

/* ============================================================
   КНОПКИ — единообразный стиль
   ============================================================ */
@media (max-width: 768px) {
  /* CTA-кнопки на мобиле — по центру, не на всю ширину (лучше выглядит) */
  .btn-primary,
  .btn-cta,
  .hero-content .btn-primary {
    display: inline-block !important;
    width: auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  /* Но submit кнопки в формах — на всю ширину */
  .btn-submit,
  .cta-form .btn-submit,
  button[type="submit"] {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* CTA форма */
  .cta-form {
    padding: 24px 16px !important;
  }
  .cta-form input,
  .cta-form select,
  .form-row input,
  .form-row select {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   ТАБЛИЦЫ — горизонтальный скролл + карточный вид на мобиле
   ============================================================ */

/* Базовые стили таблиц */
.price-table, .prices-table, .comparison-table, table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

/* Обёртка — горизонтальный скролл на среднем экране */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  margin-bottom: 24px;
}
.table-wrapper table {
  min-width: 520px;
}

/* На узком — карточный вид */
@media (max-width: 680px) {
  .table-wrapper {
    overflow-x: visible !important;
    border-radius: 0;
  }
  .table-wrapper table {
    min-width: 0 !important;
  }

  /* Секции не обрезают */
  .prices-section, .price-section, .cost-section, .table-section {
    overflow-x: visible !important;
  }

  /* Карточный вид */
  .price-table, .prices-table {
    display: block !important;
    overflow-x: visible !important;
    width: 100% !important;
  }
  .price-table thead, .prices-table thead {
    display: none !important;
  }
  .price-table tbody, .prices-table tbody {
    display: block !important;
    width: 100% !important;
  }
  .price-table tr, .prices-table tr {
    display: block !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    padding: 12px 16px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
  }
  .price-table td, .prices-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 0 !important;
    border: none !important;
    border-bottom: 1px solid #f5f5f5 !important;
    font-size: 14px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .price-table td:last-child,
  .prices-table td:last-child {
    font-weight: 700 !important;
    color: #7B5EA7 !important;
    border-bottom: none !important;
    font-size: 16px !important;
  }
  /* Сравнительная — горизонтальный скролл */
  .comparison-table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .comparison-table thead { display: table-header-group !important; }
  .comparison-table tbody { display: table-row-group !important; }
  .comparison-table tr { display: table-row !important; border: none !important; padding: 0 !important; }
  .comparison-table td, .comparison-table th { display: table-cell !important; padding: 8px !important; min-width: 80px !important; }
}

@media (max-width: 768px) {
  .prices-table { width: 100% !important; }
  .prices-table thead { display: none !important; }
  .prices-table tbody tr {
    display: block !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
  }
  .prices-table tbody td {
    display: flex !important;
    justify-content: space-between !important;
    padding: 5px 0 !important;
    border: none !important;
    font-size: 14px !important;
    gap: 8px;
  }
  .prices-table tbody td:last-child {
    font-weight: 700 !important;
    font-size: 15px !important;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.site-footer {
  background: #1a1a2e !important;
  color: #ccc !important;
  padding: 48px 0 24px !important;
  margin-top: 60px !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
footer.site-footer > .container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: block !important;
  height: auto !important;
  box-sizing: border-box !important;
}
footer.site-footer .footer-grid {
  display: grid !important;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr !important;
  gap: 32px !important;
  margin-bottom: 40px !important;
}
footer.site-footer .footer-brand p {
  margin: 8px 0 4px !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  color: #aaa !important;
}
footer.site-footer .footer-brand a { color: #e8c4a0 !important; text-decoration: none !important; }
footer.site-footer .footer-brand a:hover { color: #fff !important; }
footer.site-footer .footer-col h4 {
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  margin: 0 0 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}
footer.site-footer .footer-col ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 16px !important;
  display: block !important;
}
footer.site-footer .footer-col li {
  margin-bottom: 7px !important;
  display: list-item !important;
}
footer.site-footer .footer-col a {
  color: #888 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  display: inline !important;
  background: none !important;
}
footer.site-footer .footer-col a:hover { color: #7B5EA7 !important; }
footer.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  padding-top: 20px !important;
  text-align: center !important;
  display: block !important;
}
footer.site-footer .footer-bottom p {
  font-size: 12px !important;
  color: #555 !important;
  margin-bottom: 6px !important;
}

@media (max-width: 1024px) {
  footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr 1fr !important; }
}
@media (max-width: 768px) {
  footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
}
@media (max-width: 480px) {
  footer.site-footer .footer-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   СЕТКИ СЕКЦИЙ — мобильный адаптив
   ============================================================ */
@media (max-width: 768px) {
  .nav-mega { display: none !important; }

  .trust-items,
  .cards-grid,
  .zones-grid,
  .features-grid,
  .doctors-grid,
  .reviews-grid,
  .blog-grid,
  .stats-grid,
  .services-grid,
  .procedures-grid,
  .benefits-grid,
  .steps-grid,
  .methods-grid,
  .results-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .clinics-grid,
  .partners-grid,
  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Шаги/процесс */
  .process-steps,
  .steps,
  .steps-row,
  .how-steps,
  .how-it-works {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .process-step::after, .step::after { display: none !important; }

  /* Контейнер */
  .container {
    padding: 0 16px !important;
  }

  /* Изображения */
  img { max-width: 100% !important; height: auto !important; }
}

@media (max-width: 480px) {
  .trust-items,
  .cards-grid,
  .zones-grid,
  .doctors-grid,
  .reviews-grid,
  .blog-grid,
  .features-grid,
  .services-grid,
  .procedures-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   FAQ
   ============================================================ */
@media (max-width: 768px) {
  .faq-section { padding: 40px 0 !important; }
  .faq-list { max-width: 100% !important; padding: 0 4px !important; }
  .faq-item summary,
  details summary { padding: 14px 16px !important; font-size: 14px !important; }
  .faq-answer,
  details p { padding: 12px 16px !important; font-size: 14px !important; }
  .faq-section h2 { font-size: 20px !important; }
}

/* ============================================================
   OVERFLOW — убираем горизонтальный скролл страницы
   Используем clip вместо hidden чтобы не блокировать дочерние overflow:auto
   ============================================================ */
html {
  overflow-x: clip !important;
  max-width: 100% !important;
}
body {
  overflow-x: clip !important;
  max-width: 100% !important;
}

section, .section, header, footer {
  max-width: 100vw !important;
  box-sizing: border-box !important;
}
/* container не ограничиваем 100vw — это мешает внутреннему padding */
.container {
  box-sizing: border-box !important;
}

/* ============================================================
   ОТСТУПЫ СЕКЦИЙ — равномерность
   ============================================================ */
@media (max-width: 768px) {
  section,
  .section,
  .content-section,
  .prices-section,
  .reviews-section,
  .faq-section,
  .how-prices,
  .cta-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Выравниваем вертикальные отступы */
  .content-section,
  .prices-section,
  .reviews-section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
}

/* ============================================================
   HERO — ФИНАЛЬНЫЕ ПЕРЕОПРЕДЕЛЕНИЯ (перекрывают inline styles)
   ============================================================ */

/* На всех экранах — базовые нормализующие правила */
.hero-content {
  min-width: 0 !important;   /* Перекрываем inline min-width: 300px */
}

/* На мобиле принудительно колонка */
@media (max-width: 768px) {
  .hero-inner,
  .hero-wrapper,
  div.hero-inner {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    align-items: center !important;
    text-align: center !important;
  }

  .hero-content,
  div.hero-content {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    order: 1 !important;
  }

  .hero-image,
  .hero-img,
  .hero-photo,
  div.hero-image {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 320px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    order: 2 !important;   /* КАРТИНКА ПОСЛЕ ТЕКСТА И КНОПКИ */
  }

  .hero-image img,
  .hero-img img,
  .hero-photo img,
  div.hero-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain !important;
  }
}

/* ============================================================
   ЦЕНТРИРОВАННЫЙ HERO (без hero-inner) — страховка
   Страницы где текст центрирован, кнопка, потом картинка ниже
   ============================================================ */
@media (max-width: 768px) {
  /* hero-image в центрированном layout */
  .hero > .container > .hero-image,
  .hero .hero-image {
    margin-top: 24px !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-shadow: none !important;
  }
  .hero > .container > .hero-image img,
  .hero .hero-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
    object-fit: contain !important;
    display: block !important;
  }
  /* Кнопка — без z-index конфликтов */
  .hero .btn,
  .hero a.btn,
  .hero .btn-primary {
    position: relative !important;
    z-index: 2 !important;
    display: inline-block !important;
  }
}
@media (max-width: 480px) {
  .hero .hero-image img,
  .hero > .container > .hero-image img {
    max-height: 180px !important;
  }
}

/* ===== LOGO BLOCK + CITY BADGE ===== */
.logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  line-height: 1;
}
.header-city {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-top: 1px;
  white-space: nowrap;
}

/* ===== HERO IMAGE — единый размер на всех страницах ===== */

/* Десктоп: SVG не должны растягиваться по cover/fixed height */
.hero-image img,
.hero-img img,
.hero-photo img {
  height: auto !important;
  max-height: 400px !important;
  object-fit: contain !important;
}

/* Мобиль */
@media (max-width: 768px) {
  .hero-image img,
  .hero-img img,
  .hero-photo img {
    max-height: 220px !important;
    width: 100% !important;
  }
}
@media (max-width: 480px) {
  .hero-image img,
  .hero-img img,
  .hero-photo img {
    max-height: 180px !important;
  }
}
