@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&display=swap');

/* ===================================
   :root — Цветовые переменные
====================================== */
:root {
  /* Основные цвета */
  --color-primary: #677fa8;
  --color-secondary: #d4dbe6;
  --color-accent: #677fa8;
  --color-link: var(--color-accent);
  --color-text: #473B30;
  --color-white: #fff;
  --color-black: #000;
  --color-gray-light: #adb5bd;
  --color-gray-border: #aaa;
  --color-placeholder: var(--color-gray-light);
  --color-scrollbar-thumb: #677fa8;

  /* Фоновые цвета */
  --bg-body: #fff;
  --bg-footer: var(--color-primary);
  --bg-menu: #d4dbe6;
  --bg-menu-gradient: linear-gradient(90deg, rgba(103, 127, 168, 1) 10%, rgba(103, 127, 168, 1) 100%);
  --bg-side-menu: linear-gradient(90deg, rgba(255, 153, 102, 1) 50%, var(--bg-menu) 100%);
  --bg-btn-custom: linear-gradient(135deg, #ff6b35, #ff8e35);
  --bg-btn-custom-hover: linear-gradient(135deg, #ff8e35, #ff6b35);

  /* Прочие */
  --border-color: var(--color-text);
  --overlay-opacity: 0.7;
  --submenu-hover-bg: rgba(255, 255, 255, 0.1);
  --submenu-border: rgba(255, 255, 255, 0.15);
  --submenu-border-light: rgba(255, 255, 255, 0.2);
}

/* ===================================
   Border Color
====================================== */
.border-primary{border-color:#677fa8!important}
.border-secondary{border-color:#d4dbe6!important}
.border-success{border-color:#28a745!important}
.border-info{border-color:#17a2b8!important}
.border-warning{border-color:#ffc107!important}
.border-danger{border-color:#dc3545!important}
.border-light{border-color:#f8f9fa!important}
.border-dark{border-color:#343a40!important}
.border-white{border-color:#fff!important}

/* ===================================
   Font Color
====================================== */
.text-primary{color:var(--color-text) !important}a.text-primary:focus,a.text-primary:hover{color:#677fa8!important}
.text-secondary{color:#677fa8!important}a.text-secondary:focus,a.text-secondary:hover{color:#677fa8!important}

/* ===================================
   Background Color
====================================== */
.bg-primary{background-color:#ff9966!important}
.bg-secondary{background-color:#ff6600!important}

/* ===================================
    General
====================================== */

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  width: 100%;
  overflow-x: hidden;
  scrollbar-width: thin; /* Тонкий скролл для Firefox */
  scrollbar-color: var(--color-scrollbar-thumb) transparent;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%; 
    overflow-x: hidden;
    position: relative;
    background-color: transparent;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--color-text);
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

body::before {
    content: "";
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;     
    background: url('/img/bg.webp') no-repeat center center;
    background-size: cover;
    z-index: -1; 
    pointer-events: none; 
    will-change: transform; 
    transform: translateZ(0);
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.main-content {
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px 40px;
    max-width: 1320px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 60px;
    margin-bottom: 120px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    will-change: transform; 
    backface-visibility: hidden; /* Скрывает "изнанку" при анимациях */
    transform: translateZ(0);    /* Включает аппаратное ускорение */
    perspective: 1000px;
}

.main-content p {
  font-size: clamp(1rem, 4vw, 1.3rem);
  margin-bottom: 1.3rem;
  line-height: 1.3;
}

.main-content a {
  color: #677fa8;
  text-decoration: none;
}

.main-content a:hover {
  color: #677fa8;
}

/* Адаптивность */
@media (max-width: 768px) {
  .main-content {
    padding: 20px 15px;
    margin-top: 80px;
    margin-bottom: 100px;
    width: 100%;
  }

  .main-content h1 {
    font-size: 2.2rem;
  }
}

/* =========================================
  КРАСИВЫЙ СКРОЛЛБАР ДЛЯ ПК (Ваш код)
   Работает только на экранах шире 1025px
   ========================================= */
@media (min-width: 1025px) {
  ::-webkit-scrollbar {
    width: 18px;
  }
  ::-webkit-scrollbar-track {
    width: 5px;
    background: var(--color-white);
    border-left: 7px solid var(--color-white);
    border-right: 7px solid var(--color-white);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
    width: 0;
    border-left: 7px solid var(--color-white);
    border-right: 6px solid var(--color-white);
  }
}

/* =========================================
   СКРЫТИЕ СКРОЛЛБАРА ДЛЯ МОБИЛЬНЫХ
   Убирает "мигающую полоску" справа на телефонах
   ========================================= */
@media (max-width: 1024px) {
    ::-webkit-scrollbar {
        width: 0px !important;
        background: transparent !important;
    }
    * {
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE */
    }
}

/* Фокус для интерактивных элементов */
.form-control:focus,
.form-select:focus,
button:focus,
.btn:focus,
a:focus,
[role="button"]:focus,
i:focus {
  outline: none !important;
  box-shadow: transparent !important;
  border-color: transparent !important;
}

/* Плейсхолдеры */
::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder,
:-moz-placeholder,
:-ms-input-placeholder {
  color: var(--color-placeholder) !important;
  opacity: 1;
  font-style: italic;
  font-size: 0.95em;
}

/* ===================================
   Buttons
====================================== */
.form-container {
  max-width: 100%;
  padding: 0 10px;
}

.btn {
  box-sizing: border-box;
  background: var(--bg-menu-gradient);
  box-shadow: 0 0 3px #535353;
  backdrop-filter: blur(20px);
  border-radius: 7px;
  border: none;
  color: #fff !important;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn:hover {
  background: var(--bg-menu-gradient);
  transform: scale(1.01);
  color: var(--color-white);
}
.btn:active {
  transform: scale(0.95);
}

.btn-custom {
  background: var(--bg-btn-custom);
  border: none;
  color: var(--color-white);
  font-weight: 600;
}
.btn-custom:hover {
  background: var(--bg-btn-custom-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-white {
  padding: 0.5em 1.5em;
  border-radius: 2em;
  box-shadow: 2px 2px 2px rgba(105, 73, 73, 0.15);
  background: var(--color-white);
  border-color: var(--color-white);
  color: #1E1F62;
  font-size: 14px;
  white-space: nowrap;
}

.btn-white:hover {
  background: var(--color-accent);
}

a {
  text-decoration: none;
  color: var(--color-link);
}
hr {
  margin: 20px 0;
  padding: 0;
  height: 1px;
  border: none;
  background-color: var(--border-color);
}
section {
  margin: 30px 0;
}
p {
  line-height: 26px;
  margin: 11px 0;
}
h1 { font-size: 28px; font-weight: 900; line-height: 30px; margin: 20px 0; }
h2 { font-size: 26px; font-weight: 900; line-height: 30px; margin: 20px 0; }
h3 { font-size: 24px; font-weight: 600; line-height: 26px; margin: 20px 0; }
h4 { font-size: 18px; font-weight: 600; line-height: 20px; margin: 20px 0; }
h5 { font-size: 16px; font-weight: 600; line-height: 20px; margin: 20px 0; }
h6 { font-size: 12px; font-weight: 600; line-height: 20px; margin: 20px 0; }

@media (max-width: 1200px) {
  h4 { font-size: 16px; }
}
@media (max-width: 767px) {
  h1 { font-size: 28px; line-height: 35px; }
  h2 { font-size: 24px; line-height: 30px; }
  h3 { font-size: 14px; line-height: 17px; font-weight: 700; }
  h4 { font-size: 12px; line-height: 15px; }
}

/* ==============================
   Общие стили меню
============================== */

.dsm-menu,
.dsm-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

/* ==============================
   Десктопное меню
============================== */

.dsm-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  background: none;
}

.dsm-menu > li {
  position: relative;
}

.dsm-menu > li > a {
  display: block;
  font-size: 16px;
  text-decoration: none;  
  color: #024788;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  font-size: 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  
}

.dsm-menu > li > a:hover {
  background: rgba(2, 71, 136, 0.2);
  color: #024788;
}

.dsm-menu li.active > a {
    background: rgba(2, 71, 136, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}


/* Подменю */
.dsm-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: transparent;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

.dsm-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
}

/* Пункты подменю */
.dsm-menu li ul li {
  position: relative;
}

.dsm-menu li ul li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #024788;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #d4dbe6;
}

/* Подразделы: при наведении */
.dsm-menu li ul li a:hover {
    background: #d4dbe6;
    color: #024788;
}

/* Подразделы: активный пункт */
.dsm-menu li ul li.active > a {
    background: #677fa8;
    color: #fff;
}

/* Подменю вложенных уровней */
.dsm-menu li ul ul {
  top: 0;
  left: 100%;
}

/* Разделитель внутри подменю */
.dsm-menu li ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Убираем у последнего */
.dsm-menu li ul li:last-child {
  border-bottom: none;
}

/* ==============================
   Стрелки
============================== */
.dsm-menu li.has-children > a {
  position: relative;
  padding-right: 20px; /* место под стрелку */
}

/* стрелка по умолчанию — вправо */
.dsm-menu li.has-children > a::after {
  content: "▸";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #677fa8
}

/* верхний уровень — стрелка вниз */
.dsm-menu > li.has-children > a::after {
  content: "▾";
}

/* Цвет стрелки у активного раздела */
.dsm-menu li.has-children.active > a::after {
    color: #fff; /* Белый цвет для активного раздела */
}

/* ==============================
   Мобильное меню
============================== */

.dsm-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Общий пункт меню */
.dsm-mobile-menu .nav-item {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Убираем линии у подменю */
.dsm-mobile-submenu .nav-split::after {
  display: none;
}

/* Линия только у верхнего уровня */
.dsm-mobile-menu > .nav-item > .nav-split::after {
  display: block;
}

/* ==============================
   Активные пункты (моб)
============================== */

/* Активный конкретный пункт */
.dsm-mobile-menu .nav-link.active {
  color: #d4dbe6;
}

/* Активный родитель (у которого открыт подменю) */
.dsm-mobile-menu .nav-item.active > .nav-split > .nav-link {
  color: #d4dbe6;
}

/* Чтобы у родителя не было лишнего фона */
.dsm-mobile-menu .nav-item.active > .nav-split > .nav-link:not(.active) {
  background: none;
}


/* ==============================
   Ссылки и стрелка (моб)
============================== */

/* Контейнер делим на 2 части */
.nav-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Разделительная линия (по умолчанию) */
.nav-split::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.15);
}

/* фокус для accessibility (скроем дефолтный outline, но добавим видимую дин. индикацию при клавиатуре) */
.nav-split .submenu-toggle:focus {
  outline: none;
}

/* Убираем линию у последнего элемента в подменю */
.dsm-mobile-submenu > li:last-child > .nav-split::after {
  display: none;
}

/* Линия по умолчанию только у верхнего уровня */
.dsm-mobile-menu > .nav-item > .nav-split::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Убираем линию у открытых пунктов верхнего уровня */
.dsm-mobile-menu > .nav-item.open > .nav-split::after {
  display: none;
}

/* Ссылка слева (только текст, не растягивается) */
.nav-split .nav-link {
  flex: 0 0 auto;
  padding: 14px 18px;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  outline: none;
}

/* Правая часть (стрелка + кликабельная область) */
.submenu-toggle {
  flex: 1;
  height: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  padding: 15px;
  outline: none;
}

.submenu-toggle:focus {
    outline: none;
}

/* Стрелка */
.submenu-toggle::after {
  content: "▾";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #d4dbe6;
  transition: transform 0.3s ease;
}

.has-children.open > .nav-split > .submenu-toggle::after {
  transform: translateY(-50%) rotate(180deg);
}

/* ==============================
   Подменю (моб)
============================== */

.dsm-mobile-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Когда открыто */
.dsm-mobile-submenu.open {
  max-height: 1000px;
}

/* Пункты подменю */
.dsm-mobile-submenu li a {
  display: block;
  padding: 10px 16px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}
.dsm-mobile-submenu li a:hover {
  color: #d4dbe6;
}

/* Верхний уровень (level-0) */
.dsm-mobile-menu .level-0 > .nav-split .nav-link {
  font-size: 18px;
  padding: 14px 18px;
  font-weight: 600;
}

/* Подменю (level-1 и глубже) */
.dsm-mobile-menu .level-1 > .nav-split .nav-link,
.dsm-mobile-menu .level-2 > .nav-split .nav-link,
.dsm-mobile-menu .level-3 > .nav-split .nav-link,
.dsm-mobile-menu .level-4 > .nav-split .nav-link {
  font-size: 16px;       /* меньше размер */
  padding: 8px 5px;    /* чуть компактнее отступы */
  line-height: 10px;
  font-weight: 400;      /* тоньше шрифт */
}

/* Уменьшенные отступы между пунктами подменю */
.dsm-mobile-submenu > li > .nav-split {
  margin-bottom: 4px; /* расстояние между пунктами */
}

/* ==============================
   Отступы для уровней вложенности
============================== */
.dsm-mobile-menu .level-0 > .nav-split .nav-link { padding-left: 18px; }
.dsm-mobile-menu .level-1 > .nav-split .nav-link { padding-left: 36px; }
.dsm-mobile-menu .level-2 > .nav-split .nav-link { padding-left: 54px; }
.dsm-mobile-menu .level-3 > .nav-split .nav-link { padding-left: 72px; }
.dsm-mobile-menu .level-4 > .nav-split .nav-link { padding-left: 90px; }

/* Линии для уровней */
.dsm-mobile-menu .level-1 > .nav-split::after { left: 36px; }
.dsm-mobile-menu .level-2 > .nav-split::after { left: 54px; }
.dsm-mobile-menu .level-3 > .nav-split::after { left: 72px; }
.dsm-mobile-menu .level-4 > .nav-split::after { left: 90px; }

/* ==============================
   Адаптивность
============================== */

/* Десктопное меню скрываем на планшетах/телефонах */
@media (max-width: 1024px) {
  .dsm-menu {
    display: none;
  }

  .dsm-mobile-menu {
    display: block;
    background: rgba(5, 0, 16, 0);
    padding: 10px 0;
  }

  .dsm-mobile-menu .nav-item {
    border-bottom: none; /* линии рисуются через ::after */
  }
}

/* На больших экранах мобильное меню скрыто */
@media (min-width: 1025px) {
  .dsm-mobile-menu {
    display: none;
  }
}

.breadcrumbs {
    margin-top: 10px;
    padding: 12px 0;
    font-size: 0.9rem;
    color: #677fa8;
    font-weight: 600;
}
.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
    margin-right: 8px;
}
.breadcrumbs li::after {
    content: "›";
    margin-left: 8px;
    color: #aaa;
}
.breadcrumbs li:last-child::after {
    content: "";
}
.breadcrumbs a {
    color: #677fa8;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.breadcrumbs a:hover {
    text-decoration: none;
    color: #677fa8;
}
.breadcrumbs .home-icon svg {
    width: 18px;
    height: 18px;
}
.breadcrumbs .active {
    font-weight: 600;
    color: #677fa8;
}

.small {
  font-size: 14px;
  font-weight: 400;
  font-family: 'Roboto', sans-serif;
  line-height: 20px;
}

.microsmall {
  font-size: 10px;
  font-weight: 400;
  font-family: 'Roboto', sans-serif;
  line-height: 14px;
}

.navbar {
  padding: 0;
  z-index: 111;
  height: 150px;
  width: 100%;
  background: transparent;
  font-family: 'Roboto', sans-serif;  
  font-size: 18px;
  color: #fff;
  font-weight: 500;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: var(bg-menu-gradient);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* для Safari */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  padding: 0px;
  margin-left: 0px;
  max-height: 150px;
}

@media (max-width: 1023px) {
   .navbar-brand img {
     padding: 0px;
     margin-left: 0px;
     max-height: 150px;
   }
}

.navbar .navbar-nav .nav-link {
  font-size: 20px;
  color: #fff;
  font-weight: 400;
  padding: 6px 6px;
  margin-left: 15px;
  margin-right: 15px;
  transition: .5s ease;
  border: 2px solid transparent;
  display: block;
  font-family: 'Roboto', sans-serif;
  border: 0px solid #fff;
  white-space: nowrap; 
}

.navbar .navbar-nav {
  margin-left: 5rem;
}

.navbar .navbar-nav .nav-link.active {
  color: #d4dbe6;
  transition: all .6s ease;
}

.navbar .navbar-nav .nav-link:hover {
  color: #d4dbe6;
  transition: all .6s ease;
}

.navbar .navbar-nav .nav-link:last-child {
  margin-right: 0;
}

.navbar .navbar-nav .nav-link:after {
  content: '';
  display: block;
  margin: auto;
  height: 3px;
  width: 0;
  background: transparent;
  transition: width .5s ease, background-color .5s ease;
}

.navbar .navbar-nav .nav-link:hover:after {
  width: 100%;
  background: #d4dbe6;
}

.navbar .navbar-nav .button {
  margin-left: 30px;
}

.navbar-fixed-top.scrolled {
  /* background-color: #fff !important; */
  transition: .2s linear;
  box-shadow: 0 10px 10px -10px rgba(0, 0, 0, 0.35);
}

/* Скрывать кнопку "Запись на прием" на мобильных */
@media (max-width: 1210px) {
  a.btn-appointment {
    display: none !important;
  }
}

a.sidemenu_btn {
  display: block;
}

@media (min-width: 1025px) {
  a.sidemenu_btn {
    display: none;
  }
}

.sidemenu_btn {
  width: 36px;
  padding: 6px;
  right: 40px;
  top: 12px;
  z-index: 999;
  margin-top: 12px;
  margin-left: 16px;
  cursor: pointer;
  position: absolute;
  display: inline-block;
  transition: all .3s linear;
/*   border: 1px solid #fff; */
}

.sidemenu_btn span {
  height: 2px;
  width: 100%;
  background: #024788;
  display: block;
  margin: auto;
  transition: .5s ease;
}

.sidemenu_btn:hover span:first-child,
.sidemenu_btn:hover span:last-child {
  width: 70%;
  background-color: #024788;
}

.sidemenu_btn:hover span:nth-child(2) {
  background-color: #024788;
}

.sidemenu_btn span:nth-child(2) {
  margin: 4px 0;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
}

/* На мобильных */
@media (max-width: 1399px) {
    .navbar-wrapper {
        padding-left: 25px;
        padding-right: 45px;
    }
}


/* ===================================
    Side Menu
====================================== */

/* Side Menu */
.side-menu {
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh; 
    height: 100dvh;
    z-index: 9999;
    background: var(--bg-menu);
    background: var(--bg-menu-gradient);
    will-change: transform; 
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translate3d(100%, 0, 0);
    position: fixed;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.side-menu.side-menu-active {
    transform: translate3d(0, 0, 0);
}

#close_side_menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

/* Mobile menu items */
.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu .nav-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu .nav-link {
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
}

.mobile-menu .nav-link.active {
    color: #d4dbe6;
}

.mobile-sub-menu {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0 0 0;
    display: none;
}

.mobile-toggle {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
    cursor: pointer;
}

.mobile-toggle:before,
.mobile-toggle:after {
    content: '';
    position: absolute;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-toggle:before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.mobile-toggle:after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.mobile-toggle.active:after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

@media (max-width: 767px) {
    .side-menu {
        width: 80%;
    }
}

.side-menu.left {
  left: 0;
  right: auto;
  transform: translate3d(-100%, 0, 0);
}

.side-menu.before-side {
  width: 280px;
}

.side-menu.side-menu-active,
.side-menu.before-side {
  transform: translate3d(0, 0, 0);
}

.pul-menu .side-menu.side-menu-active {
  visibility: visible;
  opacity: 1;
}

.side-menu .navbar-brand {
  margin: 0 0 1.5rem 0;
}

/*Side overlay*/
#close_side_menu {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1031;
  opacity: 0.7;
  background-color: #fff;
  position: fixed;
  transition: opacity 300ms cubic-bezier(0.895, 0.03, 0.685, 0.22);
}

/*side menu image*/
.sidemenu-image {
  position: absolute;
  top: 20px;
  left: 50px;
  max-width: 150px;
}

/*side menu close btn*/
.side-menu .btn-close {
  height: 25px;
  width: 25px;
  top: 34px;
  right: 25px;
  cursor: pointer;
  text-align: center;
  position: absolute;
  display: inline-block;
  border: 0px solid #fff;
}

.side-menu.before-side .btn-close {
  display: none;
}

.side-menu .btn-close::before,
.side-menu .btn-close::after {
  top: 5px;
  left: 16px;
  height: 25px;
  width: 3px;
  content: ' ';
  background: #fff;
  position: absolute;
}

.side-menu .btn-close:before {
  transform: rotate(45deg);
}

.side-menu .btn-close:after {
  transform: rotate(-45deg);
}

.side-menu .btn-close:hover {
  transform: scale(0.9);
  overflow: hidden;
  transition: all .5s ease;
}

/*side menu inner-wrapper*/
.side-menu .inner-wrapper {
  height: 100%;
  padding: 2.0rem 3rem;
  position: relative;
  overflow-y: auto;
  display: flex;
  align-items: top;
  text-align: left;
  flex-wrap: wrap;
  border: 1px solid var(--bg-menu);
}

.pul-menu.pushwrap .side-menu .inner-wrapper {
  padding: 3.5rem 2.5rem;
}

.side-menu .side-nav {
  margin-bottom: 0;
  margin-top: 0px;
  display: block;
}

.side-nav .navbar-nav .nav-item {
  opacity: 0;
  display: block;
  margin: 5px 0;
  padding: 0 !important;
  transition: all 0.8s ease 500ms;
  transform: translateY(30px);
}

.side-nav .navbar-nav .nav-item:first-child {
  transition-delay: .1s;
}

.side-nav .navbar-nav .nav-item:nth-child(2) {
  transition-delay: .2s;
}

.side-nav .navbar-nav .nav-item:nth-child(3) {
  transition-delay: .3s;
}

.side-nav .navbar-nav .nav-item:nth-child(4) {
  transition-delay: .4s;
}

.side-nav .navbar-nav .nav-item:nth-child(5) {
  transition-delay: .5s;
}

.side-nav .navbar-nav .nav-item:nth-child(6) {
  transition-delay: .6s;
}

.side-nav .navbar-nav .nav-item:nth-child(7) {
  transition-delay: .7s;
}

.side-nav .navbar-nav .nav-item:nth-child(8) {
  transition-delay: .8s;
}

.side-nav .navbar-nav .nav-item:nth-child(9) {
  transition-delay: .9s;
}

.side-menu.side-menu-active .side-nav .navbar-nav .nav-item {
  transform: translateY(0);
  opacity: 1;
}

.side-nav .navbar-nav .nav-link {
  display: inline-table;
  color: #fff;
  padding: 2px 0 3px 0 !important;
  font-size: 18px;
  line-height: 22px;
  font-weight: 600;
  line-height: normal;
  position: relative;
  border-radius: 0;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
}

.side-nav .navbar-nav .nav-link::after {
  content: "";
  left: 0;
  width: 0;
  bottom: 0;
  height: 2px;
  background: var(--bg-menu);
  overflow: hidden;
  position: absolute;
  display: inline-block;
  transition: all 0.5s cubic-bezier(0, 0, 0.2, 1);
}

.side-nav .navbar-nav .nav-link:hover::after,
.side-nav .navbar-nav .nav-link:focus::after,
.side-nav .navbar-nav .nav-link.active::after {
  width: 100%;
}

.side-nav .navbar-nav .nav-link.active {
  background: transparent;
}

/*side menu footer */
.side-menu-footer .navbar-nav {
  transform: translateY(0);
}

.side-menu-footer {
  color: #fff;
  font-size: 18px;
}

.side-menu-footer p {
  color: #fff;
  font-size: 18px !important;
}

.side-menu-footer a {
  color: #fff;
  font-size: 18px;
}

.side-menu-footer .banner-icons ul {
  margin-bottom: 0;
}

.side-menu-footer .banner-icons ul li {
  display: inline-block;
}

.side-menu-footer .banner-icons ul li i {
  color: #fff;
  font-size: 22px;
}

.side-menu-footer .banner-icons ul li a:hover {
  background-color: #fff;
  transition: all .8s ease;
}

.side-menu-footer .banner-icons ul li a {
  border-radius: 50%;
  color: #fff;
  height: 40px;
  line-height: 38px;
  width: 40px;
  display: block;
  overflow: hidden;
  text-align: center;
  border: 1px solid transparent;
}

.side-menu-footer .banner-icons ul li a:hover i {
  color: #fff;
}

/* скрываем подменю по умолчанию */
.mobile-sub-menu {
  display: none;
  padding-left: 15px;
  margin: 5px 0 0 0;
  list-style: none;
}

/* стиль ссылок внутри подменю */
.mobile-sub-menu .nav-link {
  font-size: 16px;
  font-weight: 400;
  color: #ddd;
  padding: 5px 0 !important;
}

/* активное подменю */
.mobile-sub-menu.open {
  display: block;
}

 /* Точки навигации */
#sliderDots {
    z-index: 10;
}

#sliderDots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

#sliderDots .dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Hero Banner Styles */
 .hero {
    margin-top: 0px;
     min-height: 100vh;
 }
 .hero .btn-dsm {
     font-size: 1.25rem;
     padding: 15px 30px;
 }
 /* Для мобильных устройств */
 @media (max-width: 768px) {
     .hero h1 {
         font-size: 2.5rem;
     }
     .hero .btn-dsm {
         font-size: 1.1rem;
         padding: 12px 24px;
     }
 }

/* ===================================
    Contact-Section
 ====================================== */
 .contact-section .card {
     background-color: #eee;
     border-radius: 10px;
     border: 1px solid rgba(0, 0, 0, 0.1);
 }
 .contact-section .card-title-service {
     color: #ff9966;
     font-weight: bold;
     font-size: 1.5rem;
 }
 .contact-section .form-control {
     border: 1px solid #ced4da;
     border-radius: 5px;
     padding: 10px;
 }
 .contact-section .form-control:focus {
     border-color: #ff9966;
     box-shadow: none;
     outline: none;
 }
 .contact-section .form-control:focus {
     border-color: #80bdff;
     box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
 }
 .contact-section .btn-primary {
     background-color: #ff9966;
     border-color: #ff9966;
     padding: 10px 20px;
     border-radius: 25px;
 }
 .contact-section .btn-primary:hover {
     background-color: #15433d;
     border-color: #15433d;
 }
 .contact-section .form-label {
     color: #ff9966;
     font-weight: 500;
 }
 .contact-section .form-select {
     border: 1px solid #ced4da;
     border-radius: 5px;
     padding: 10px;
 }
 
 .contact-section .form-select:focus {
     border-color: #ff9966;
     box-shadow: none;
     outline: none;
 }

/* ===================================
  Footer
====================================== */

.footer {
  margin-top: auto; /* Футер прижимается к низу */
  flex-shrink: 0; /* Футер не сжимается */
  padding-top: 0px;
  padding-bottom: 15px;
  background: #ff9966;
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  color: #ffffff;
  border: 0px solid #fff;
}

.footer p {
  margin-top: 0em;
  margin-bottom: 0.2em;
}

.footer h3 {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: #ffffff;
}

.footer h4 {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: #fff;
}

.footer .social-icons {
  margin-top: 10px;
  text-align: center;
}

.footer a {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  color: #ffffff;
}

.footer a:hover {
  color: color(display-p3 1 0.322 0.91);
}

#message-warning {
   display: none;
  background: none;
  padding: 5px 5px;
  margin-bottom: 5px;
   width: 100%;
}

#message-warning { white-space: pre-line; }
#message-succes { white-space: pre-line; }

/* ===================================
    Основной дизайн
====================================== */

/* Декоративные элементы — фиксированы относительно экрана */
.decoration {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.decoration:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Мандала в правом верхнем углу — белая, крупнее, сдвинута ниже */
.mandala-top {
    width: clamp(120px, 25vw, 350px);
    height: auto;
    top: 80px;
    right: 30px;
    transform-origin: top right;
    filter: brightness(0) invert(1); /* делаем белой */
}

/* Мандала в левом нижнем углу */
.mandala-bottom {
    width: clamp(80px, 15vw, 200px);
    height: auto;
    bottom: 20px;
    left: 20px;
    transform-origin: bottom left;
}

/* Портрет женщины — прижат к низу, справа, чёткий */
.woman {
    width: clamp(100px, 20vw, 250px);
    height: auto;
    bottom: 0;
    right: 20px;
    transform-origin: bottom right;
    z-index: 1;
}

@media (max-width: 1298px) {
  .woman {
      display: none;
  }
}

/* Лепестки — ОБЩИЙ СТИЛЬ С ОДИНАКОВОЙ ТЕНЬЮ */
.petal {
    width: clamp(80px, 15vw, 200px);
    height: auto;
    opacity: 0.6;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

/* Позиционирование лепестков */
.left-top {
    top: 410px;
    left: 0px;
    transform-origin: top left;
    transform: rotate(-15deg);
}

.right-bottom {
    bottom: 300px;
    right: 20px;
    transform-origin: bottom right;
    transform: rotate(10deg);
}

.top-left-center {
    top: 0px;
    left: 350px;
    transform-origin: top left;
    transform: rotate(5deg);
}

@media (max-width: 768px) {
    .mandala-top {
        top: 60px;
        right: 20px;
        width: clamp(80px, 20vw, 200px);
    }

    .mandala-bottom {
        bottom: 10px;
        left: 10px;
        width: clamp(60px, 12vw, 120px);
    }

    .woman {
        bottom: 0;
        right: 10px;
        width: clamp(80px, 18vw, 180px);
    }

    .left-top {
        top: 300px;
        left: 5px;
        width: clamp(60px, 12vw, 120px);
    }

    .right-bottom {
        bottom: 150px;
        right: 30px;
        width: clamp(60px, 12vw, 120px);
    }

    .top-left-center {
        top: 40px;
        left: 100px;
        width: clamp(60px, 12vw, 120px);
    }
}

/* --- Стили для Hero секции --- */
.smriti-hero-new {
    color: #3e2b22; /* Темно-коричневый текст */
}

.smriti-main-title {
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #4a3b30;
}

.smriti-subtitle {
    font-weight: 700;
    font-size: 1.5rem;
    color: #3e2b22;
    line-height: 1.4;
}

.smriti-desc {
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Выделение слов (подчеркивание или цвет, как на макете) */
.highlight-text {
    color: #7a2e18; /* Красновато-коричневый акцент */
    text-decoration: underline;
    text-decoration-color: rgba(122, 46, 24, 0.3);
    text-underline-offset: 4px;
}

/* --- Фото и декорация --- */
.hero-photo {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.6);
}

/* Градиентный круг за фото */
.hero-decoration-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(218,168,189,0.8) 0%, rgba(196,142,168,0.2) 60%, rgba(255,255,255,0) 80%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}



/* --- Секция "О методе" --- */
.method-heading {
    font-weight: 700;
    font-size: 2rem;
    color: #3e2b22;
}

.method-list {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #3e2b22;
    text-align: left;
}

.method-list li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* Галочка для списка */
.method-list li::before {
    content: "✓"; 
    position: absolute;
    left: 0.5rem;
    top: 0;
    font-size: 1.3rem;
    font-weight: bold;
    color: #3e2b22; /* Цвет галочки */
}

.method-link {
    color: #7a2e18;
    text-decoration: underline;
    font-weight: 600;
}

.method-link:hover {
    color: #a33e20;
    text-decoration: none;
}

/* Адаптив */
@media (max-width: 991px) {
    .smriti-main-title, .smriti-subtitle, .smriti-desc {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-decoration-circle {
        width: 320px;
        height: 320px;
    }
    
    .hero-photo {
        width: 220px;
        height: 220px;
    }
}

/* Списки с галочками */
.smriti-check-list {
    max-width: 800px;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #4a3b30;
}

.smriti-check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.smriti-check-list li::before {
    content: "✓"; /* Или можно использовать иконку url('img/check.svg') */
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: #512003; /* Темно-коричневый цвет галочки */
    font-size: 1.2rem;
}

/* Розовая кнопка "Записаться" */
.btn-pink {
    background-color: #b0426d; /* Цвет с макета */
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-pink:hover {
    background-color: #96325a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(176, 66, 109, 0.3);
}

a.btn-pink {
    color: #fff;
}

a:hover.btn-pink {
    color: #fff;
}

/* Баннер обучения */
.neuro-banner-card {
    background-color: #FF9750;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    max-width: 900px;
    border: 1px solid rgba(255,255,255,0.5);
}

.neuro-title {
    font-size: 2rem;
    color: #512003;
    line-height: 1.1;
}

.neuro-link {
    font-size: 1.3rem;
    color: #512003;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.neuro-link:hover {
    color: #b0426d;
    border-bottom-color: #b0426d;
}

a.neuro-link {
    color: #fff;
}

a:hover.neuro-link {
    color: #fff;
}

.rotate-n2 {
    transform: rotate(-3deg) scale(1.05);
}

/* Декоративный круг на фоне баннера (имитация градиента макета) */
.banner-bg-circle {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 151, 80, 1) 0%, rgba(255, 224, 153, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .neuro-title {
        font-size: 1.6rem;
    }
    .neuro-link {
        font-size: 1.1rem;
    }
    .banner-bg-circle {
        display: none;
    }
}

/* Секция с кругом */
.how-it-works-circle-section {
    /* Можно задать легкий фон секции, если нужно, или оставить прозрачным */
}

.circle-wrapper {
    width: 650px;
    height: 650px;
    background-color: #FF9750;
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); /* Мягкая тень */
    position: relative;
    z-index: 2;
    margin: 2rem auto;
}

.circle-content {
    max-width: 520px; /* Ограничиваем ширину текста внутри круга */
    color: #3e2b22;   /* Темно-коричневый цвет текста */
}

.circle-title {
    font-weight: 700;
    font-size: 2rem;
    color: #3e2b22;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.2);
}

.circle-list {
    font-size: 1.05rem;
    line-height: 1.4;
}

.circle-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
}

/* Галочки */
.circle-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3e2b22;
}

/* Декоративная тень/градиент справа (имитация объема как на макете) */
.circle-bg-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
    z-index: -1; 
}

/* Адаптивность */
@media (max-width: 768px) {
    .circle-wrapper {
        width: 100%;
        height: auto;       /* На мобильных убираем жесткую высоту */
        aspect-ratio: unset; /* Убираем пропорцию круга */
        border-radius: 40px; /* Делаем просто скругленный прямоугольник */
        padding: 2rem 1rem !important;
    }
    
    .circle-content {
        max-width: 100%;
        padding: 0 !important;
    }

    .circle-title {
        font-size: 1.6rem;
    }

    .circle-list {
        font-size: 1rem;
    }
}

/* ==========================================================================
   БЛОГ (Instagram-Grid + Modals + Video)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Сетка постов (Instagram-стиль)
   -------------------------------------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Карточка поста */
.instagram-post {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.instagram-post:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* --------------------------------------------------------------------------
   Универсальный контейнер медиа (16:9)
   -------------------------------------------------------------------------- */
.post-media-container,
.post-slider {
    position: relative;
    width: 100%;
    height: 0;
    /* Было 100% (квадрат), меняем на 56.25% (16:9) */
    padding-bottom: 56.25%; 
    background: #000;
    overflow: hidden;
    /* Убираем скругление здесь, если оно есть у карточки .instagram-post */
}

/* Общее правило для всего контента внутри превью */
.post-media, 
.post-video, 
.grid-slide-img,
.video-wrapper.preview,
.video-wrapper.preview iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото заполняют контейнер */
    border: none;
    margin: 0;
}

/* Видео внутри превью (если используется iframe в сетке) */
.video-wrapper.preview iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none; /* Чтобы клик открывал пост, а не запускал видео */
}

/* Слайдер в превью */
.grid-slide-img { display: none; }
.grid-slide-img:first-child { display: block; }

/* Стрелки слайдера (общие) */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 18px;
    padding: 0;
    transition: background 0.2s;
}
.slider-arrow:hover { background: rgba(0, 0, 0, 0.8); }
.slider-arrow.left { left: 10px; }
.slider-arrow.right { right: 10px; }

/* Инфо-блок под фото */
.post-info { padding: 12px 16px; }
.post-title { font-weight: 600; margin-bottom: 6px; font-size: 1.05rem; }
.post-content { text-align: left !important; display: none; }
.show-more {
    color: #3897f0;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.show-more::after { 
    content: '↓'; 
    font-size: 12px; 
    transition: transform 0.3s ease; /* Добавим анимацию */
}

/* Стрелка вверх, когда добавлен класс .open */
.show-more.open::after {
    transform: rotate(180deg);
}

/* Кнопка "Загрузить ещё" */
#load-more-container { margin-top: 30px; margin-bottom: 20px; }
#load-more-btn { min-width: 160px; border-radius: 20px; }


/* --------------------------------------------------------------------------
   2. Видео плееры (YouTube/Rutube) — Адаптивные
   -------------------------------------------------------------------------- */
/* Этот класс используется, когда мы раскрываем видео (не превью) */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    background: #000;
    background-size: cover;
    background-position: center;
}
.video-16-9 { padding-bottom: 56.25%; }  /* 16:9 Standard */
.video-9-16 { padding-bottom: 177.78%; } /* 9:16 Shorts */

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* -------------------------------------------------------------------------- */
/*                                3. blogModal                                */
/* -------------------------------------------------------------------------- */

/* === БАЗОВЫЕ НАСТРОЙКИ (КЛИКИ РАБОТАЮТ) === */

/* 1. Сам контейнер модалки (серый фон) */
#blogModal {
    /* Не трогаем display! Bootstrap сам переключит его в block при открытии. */
    padding-right: 0 !important;      /* Убираем сдвиг */
    overflow: hidden !important;      /* Скрываем лишние скроллы */
}

/* 2. Диалоговое окно (Белая карточка) - ЦЕНТРИРОВАНИЕ */
#blogModal .modal-dialog {
    /* Используем margin для центрирования, это безопаснее для кликов */
    position: relative !important;
    margin: 1.75rem auto !important;  /* Центр по горизонтали */
    
    /* Размеры */
    width: 70vw !important;           
    max-width: 1000px !important;
    min-width: 350px;
    height: calc(100% - 3.5rem) !important; /* Высота с отступами */
    
    /* Flex для вертикального центрирования контента */
    display: flex !important;
    align-items: center !important;   /* Центр по вертикали */
    justify-content: center !important;
    
    /* Сброс смещений */
    left: auto !important;
    right: auto !important;
    transform: none !important;
    pointer-events: none; /* Пропускаем клики сквозь пустое место вокруг карточки */
}

/* 3. Сама карточка (Контент) */
#blogModalContent {
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    
    /* Уменьшил верхний отступ до 20px (было 30px) */
    padding: 20px 40px 50px !important; 
    
    font-size: 1.1rem;
    line-height: 1.6; /* Восстанавливаем нормальный line-height для текста */
    color: #333;
    background: #fff;
    white-space: pre-wrap;
    width: 100%;
    display: block !important;
}

/* Адаптив */
@media (max-width: 768px) {
    #blogModal .modal-dialog {
        width: 95vw !important;
        margin: 10px auto !important;
        height: calc(100% - 20px) !important;
    }
}

/* === ШАПКА === */
#blogModal .modal-header {
    flex-shrink: 0;
    padding: 20px 25px 15px 25px; 
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#blogModal .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
    text-align: left; /* Заголовок слева */
}

/* === ТЕЛО (СКРОЛЛ ТУТ) === */
#blogModal .modal-body {
    flex: 1;                /* Занимает всё место */
    overflow-y: auto;       /* Скролл внутри */
    padding: 0 !important;
    display: block !important;
    text-align: left !important; /* Сбрасываем центрирование текста */
}

#blogModalMedia {
    width: 100%;
    background: #fff;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Важно: flex, чтобы центрировать, но height: auto */
    display: flex !important;
    justify-content: center;
    align-items: flex-start; /* Прижимаем к верху! */
    min-height: 0 !important; /* Убираем минимальную высоту, чтобы не было дыр */
}

/* === ОДИНОЧНЫЕ КАРТИНКИ === */
#blogModalMedia > img {
    display: block;
    width: 100% !important;
    height: auto !important; 
    max-height: 60vh !important; 
    object-fit: contain !important; 
    background: #fff;
    margin: 0 auto;
}

/* Контейнер слайдера */
.post-slider-modal {
    width: 100%;
    height: 55vh !important; /* Для слайдера высоту оставляем */
    background: #fff !important;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center; /* Слайдер центрируем по вертикали */
}

.post-slider-modal img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Видео - исключение (черный фон) */
#blogModalMedia:has(.video-wrapper),
#blogModalMedia:has(video) {
    background: #000 !important;
    display: flex; justify-content: center;
}
#blogModalMedia .video-wrapper { width: 100%; }

/* === ТЕКСТ === */
#blogModalContent {
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 30px 40px 50px !important;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    background: #fff;
    white-space: pre-wrap;
    width: 100%;
    display: block !important;
}

/* Уменьшаем отступы между абзацами */
#blogModalContent p {
    margin-bottom: 0rem !important; /* Было скорее всего 1rem или больше */
    margin-top: 0 !important;
}

/* Если есть списки, им тоже можно уменьшить отступ */
#blogModalContent ul, 
#blogModalContent ol {
    margin-bottom: 0.7rem !important;
}

/* Заголовки внутри текста (h2, h3...) можно чуть прижать */
#blogModalContent h2, 
#blogModalContent h3,
#blogModalContent h4 {
    margin-top: 1.2rem !important;
    margin-bottom: 0.5rem !important;
}

/* Стрелки */
.slider-arrow, .slider-prev, .slider-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: rgba(0,0,0,0.1) !important;
    color: #333 !important; border-radius: 50%; border:none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.post-slider .grid-slide-img {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0; 
    left: 0;
    object-fit: contain !important;
    background: #fff;
}

/* -------------------------------------------------------------------------- */
/*                                4. Комментарии                              */
/* -------------------------------------------------------------------------- */

/* Список комментариев */
.comment {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
}
.avatar-placeholder, .avatar-img {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #555;
    font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    object-fit: cover;
}
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 0.95rem; color: #000; }
.comment-date { font-size: 0.8rem; color: #888; margin-left: 8px; font-weight: normal; }
.comment-text { margin-top: 4px; font-size: 0.95rem; line-height: 1.4; color: #333; }

/* Шторка (BottomSheet) для мобильных комментариев */
#commentsModalMobile {
    z-index: 10000;
}
#commentsModalMobile .modal-dialog-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 85vh;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}
#commentsModalMobile .modal-dialog-bottom.show { transform: translateY(0); }

#commentsModalMobile .modal-content {
    height: 100%;
    border-radius: 20px 20px 0 0;
    border: none;
    display: flex;
    flex-direction: column;
}

#commentsModalMobile .modal-header {
    flex-shrink: 0;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    justify-content: center;
}
.modal-swipe-indicator {
    width: 40px; height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: absolute; top: 8px; left: 50%;
    transform: translateX(-50%);
}

#mobileCommentsContent {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    padding-bottom: 80px; 
}

/* Форма отправки */
.comment-form-mobile {
    position: absolute; 
    bottom: 0; left: 0; right: 0;
    background: #fff;
    padding: 10px;
    border-top: 1px solid #eee;
    z-index: 10;
}

.mobile-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f2f6;
    border-radius: 24px;
    padding: 4px 4px 4px 15px;
}
.mobile-comment-form textarea {
    flex: 1;
    border: none;
    background: transparent;
    height: 40px;
    padding: 8px 0;
    resize: none;
    outline: none;
    font-size: 14px;
}
.mobile-comment-form button[type="submit"] {
    border: none;
    background: #3897f0;
    color: #fff;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
}
.emoji-button {
    background: none; border: none; font-size: 20px; cursor: pointer; padding: 0 8px;
}

.auth-message {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    width: 100%;
    padding: 8px;
}

/* Стили для модального окна */
#contactModal .modal-content {
  border-radius: 20px !important;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

#contactModal .modal-header {
  background: #677fa8;
  border-radius: 20px 20px 0 0 !important;
  border-color: #677fa8;
  padding: 1.5rem 2rem !important;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#contactModal .modal-title {
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  flex: none;
}

#contactModal .btn-close {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  transform: none;
  margin: 0;
}

#contactModal .form-control {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  height: auto;
}

#contactModal .form-control::placeholder,
#contactModal .form-control::-webkit-input-placeholder,
#contactModal .form-control:-moz-placeholder,
#contactModal .form-control::-moz-placeholder,
#contactModal .form-control:-ms-input-placeholder,
#contactModal textarea.form-control::placeholder {
  font-style: italic;
  color: #aaa;
  opacity: 0.6;
  font-weight: 300;
}

#contactModal .form-control:focus {
  background-color: #ffffff;
  border: 1px solid #0c4385 !important;
  box-shadow: 0 0 0 3px rgba(12, 67, 133, 0.1);
}

#contactModal .form-label {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.5rem;
}

#contactModal .btn-primary {
  background-color: #0c4385;
  border: none;
  padding: 14px 32px;
  font-size: 1rem;
  transition: none;
  cursor: pointer;
}

#contactModal .btn-primary:hover,
#contactModal .btn-primary:active,
#contactModal .btn-primary:focus,
#contactModal .btn-primary:visited {
  background-color: #0c4385 !important;
  border-color: #0c4385 !important;
  color: white !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

#contactModal .form-check-input {
  width: 1.25em;
  height: 1.25em;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#contactModal .form-check-input:checked {
  background-color: #0c4385;
  border-color: #0c4385;
}

#contactModal .form-check-input:focus {
  border-color: #0c4385;
  box-shadow: 0 0 0 3px rgba(12, 67, 133, 0.1);
}

#contactModal .form-check-label {
  cursor: pointer;
  color: #555;
  margin-left: 0.5rem;
}

#contactModal .btn-outline-primary {
  color: #0c4385;
  border-color: #0c4385;
}

#contactModal .btn-outline-primary:hover {
  background-color: transparent !important;
  border-color: #0c4385 !important;
  color: #0c4385 !important;
}

#contactModal .text-success {
  color: #28a745 !important;
}

/* Анимация появления */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* На мобильных устройствах */
@media (max-width: 576px) {
  #contactModal .modal-content {
    border-radius: 16px;
  }

  #contactModal .modal-header {
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.5rem !important;
  }

  #contactModal .modal-title {
    font-size: 1.25rem;
  }

  #contactModal .form-control {
    font-size: 16px;
  }
}

.services-section {
  background-color: transparent;
}

/* Карточка услуги */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Изображение карточки */
.service-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

/* Содержимое карточки */
.service-card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #003d6b;
  margin-bottom: 15px;
  line-height: 1.3;
}

.service-card-text {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.service-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: white !important;
  background: #677fa8;
  border: none;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  width: fit-content;
  margin-top: auto;
  box-shadow: 0 2px 6px rgba(103, 127, 168, 0.2);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.service-btn:hover {
  background: #5a6f95;
  box-shadow: 0 3px 10px rgba(103, 127, 168, 0.3);
  text-decoration: none;
  color: white !important;
}

.service-btn:active {
  background: #4f5f85;
}

.service-btn::after {
  content: "  →";
}

/* Адаптив */
@media (max-width: 991px) {
  .service-card-body {
    padding: 25px;
  }

  .service-card-title {
    font-size: 18px;
  }

  .service-card-text {
    font-size: 13px;
  }

  .service-btn {
    padding: 9px 20px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .service-image {
    height: 200px;
  }

  .service-card-body {
    padding: 20px;
  }

  .service-card-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .service-card-text {
    font-size: 13px;
    margin-bottom: 15px;
  }

  .service-btn {
    padding: 8px 18px;
    font-size: 12px;
  }
}

.documents-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.contract-cta {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 50px;
  text-align: center;
}

.contract-cta .btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  background: white;
  color: #0066cc !important;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.contract-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.contract-cta .icon {
  margin-right: 8px;
}

.documents-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.doc-category {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  border-left: 4px solid #0066cc;
}

.category-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon {
  font-size: 24px;
}

.doc-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.doc-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #0066cc;
  transition: all 0.3s ease;
  cursor: pointer;
}

.doc-item:hover {
  background: #e3f2fd;
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
  transform: translateY(-2px);
}

.doc-icon {
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}

.doc-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.doc-type {
  font-size: 12px;
  background: #e3f2fd;
  color: #0066cc;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.doc-subcategories {
  display: grid;
  gap: 20px;
}

.doc-subcategory {
  background: white;
  padding: 20px;
  border-radius: 8px;
}

.subcategory-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #0066cc;
}

.doc-subcategory .doc-items {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.documents-note {
  margin-top: 40px;
  padding: 20px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 14px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .documents-section {
  padding: 20px 15px;
  }

  .contract-cta {
  padding: 20px;
  margin-bottom: 30px;
  }

  .contract-cta .btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  }

  .doc-items {
  grid-template-columns: 1fr;
  gap: 12px;
  }

  .doc-item {
  padding: 14px;
  flex-direction: column;
  align-items: flex-start;
  }

  .doc-icon {
  margin-bottom: 8px;
  margin-right: 0;
  }

  .doc-name {
  margin-bottom: 8px;
  font-size: 13px;
  }

  .doc-type {
  align-self: flex-start;
  margin-left: 0;
  }

  .category-title {
  font-size: 18px;
  margin-bottom: 15px;
  }

  .doc-category {
  padding: 20px;
  margin-bottom: 20px;
  }

  .doc-subcategory {
  padding: 15px;
  }

  .subcategory-title {
  font-size: 14px;
  margin-bottom: 12px;
  }

  .documents-container {
  gap: 20px;
  }
}

@media (max-width: 480px) {
  .documents-section {
  padding: 15px 10px;
  }

  .contract-cta {
  padding: 15px;
  }

  .category-title {
  font-size: 16px;
  gap: 8px;
  }

  .category-icon {
  font-size: 20px;
  }

  .doc-category {
  padding: 15px;
  border-radius: 8px;
  }

  .doc-item {
  padding: 12px;
  border-radius: 6px;
  }

  .doc-icon {
  font-size: 18px;
  }

  .doc-name {
  font-size: 12px;
  }

  .doc-type {
  font-size: 11px;
  padding: 3px 6px;
  }
}

/* Дополнительные интерактивные эффекты */
.doc-item {
  position: relative;
  overflow: hidden;
}

.doc-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.doc-item:hover::before {
  left: 100%;
}

/* Цветовые акценты для разных категорий */
.doc-category[data-category="implantation"] {
  border-left-color: #0066cc;
  background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
}

.doc-category[data-category="extraction"] {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffe5e5 100%);
}

.doc-category[data-category="therapy"] {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e9 100%);
}

.doc-category[data-category="orthodontics"] {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff9e6 100%);
}

.doc-category[data-category="prosthetics"] {
  border-left-color: #ff9800;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffe8d6 100%);
}

.doc-category[data-category="pediatric"] {
  border-left-color: #e91e63;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffe8f3 100%);
}

.doc-category[data-category="legal"] {
  border-left-color: #6c757d;
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
}

/* Состояние фокуса для доступности */
.doc-item:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.contract-cta .btn:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Анимация при загрузке */
@keyframes fadeInUp {
  from {
  opacity: 0;
  transform: translateY(20px);
  }
  to {
  opacity: 1;
  transform: translateY(0);
  }
}

.doc-category {
  animation: fadeInUp 0.6s ease-out forwards;
}

.doc-category:nth-child(1) { animation-delay: 0.1s; }
.doc-category:nth-child(2) { animation-delay: 0.2s; }
.doc-category:nth-child(3) { animation-delay: 0.3s; }
.doc-category:nth-child(4) { animation-delay: 0.4s; }
.doc-category:nth-child(5) { animation-delay: 0.5s; }
.doc-category:nth-child(6) { animation-delay: 0.6s; }
.doc-category:nth-child(7) { animation-delay: 0.7s; }

/* Печать документов */
@media print {
  .contract-cta,
  .documents-note {
  display: none;
  }

  .doc-item {
  break-inside: avoid;
  page-break-inside: avoid;
  }

  .doc-category {
  page-break-inside: avoid;
  }
}

/* Поддержка темного режима */
@media (prefers-color-scheme: dark) {
  .documents-section {
  background: #1a1a1a;
  }

  .doc-category {
  background: #2a2a2a;
  border-left-color: #66b2ff;
  }

  .category-title {
  color: #ffffff;
  }

  .doc-item {
  background: #333333;
  border-color: #444444;
  color: #66b2ff;
  }

  .doc-item:hover {
  background: #3a3a3a;
  border-color: #66b2ff;
  }

  .doc-subcategory {
  background: #242424;
  }

  .subcategory-title {
  color: #ffffff;
  border-bottom-color: #66b2ff;
  }

  .documents-note {
  background: #3a2a00;
  border-color: #664400;
  color: #ffcc99;
  }
}

/* Альтернативный стиль с таблицей (для больших экранов) */
@media (min-width: 1024px) {
  .doc-items.table-view {
  display: table;
  width: 100%;
  gap: 0;
  }

  .doc-items.table-view .doc-item {
  display: table-row;
  border: none;
  border-bottom: 1px solid #e0e0e0;
  }

  .doc-items.table-view .doc-item:hover {
  background: #f5f5f5;
  }
}

/* ============================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ДОГОВОРА
   Специфичные селекторы для избежания конфликтов
   ============================================ */

#contractForm,
.contract-page,
.contract-container {
  /* Сброс глобальных стилей */
  all: revert;
}

.contract-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f8f9fa;
  min-height: calc(100vh - 200px);
}

.contract-container {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contract-page .page-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 40px 0;
  text-align: center;
}

.contract-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

/* ФОРМ-ГРУППЫ */
.contract-form .form-group {
  display: grid;
  gap: 8px;
}

.contract-form .form-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.contract-form .required {
  color: #dc3545;
  font-weight: 700;
}

/* ТЕКСТОВЫЕ ПОЛЯ ВВОДА */
.contract-form .form-input,
.contract-form .form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #f9f9f9;
  box-sizing: border-box;
  color: #333;
}

.contract-form .form-input::-webkit-input-placeholder,
.contract-form .form-textarea::-webkit-input-placeholder {
  color: #999;
}

.contract-form .form-input::placeholder,
.contract-form .form-textarea::placeholder {
  color: #999;
}

.contract-form .form-input:focus,
.contract-form .form-textarea:focus {
  outline: none;
  border-color: #0066cc;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.contract-form .form-input:invalid:not(:placeholder-shown),
.contract-form .form-textarea:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

.contract-form .form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.contract-form .form-hint {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  display: block;
}

/* СЕКЦИИ ФОРМЫ */
.contract-form .form-section {
  background: #f0f4f8;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
}

.contract-form .form-section fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.contract-form .form-section legend {
  padding: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  display: block;
  width: 100%;
  margin: 0;
}

.contract-form .form-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.contract-form .form-text:last-of-type {
  margin-bottom: 20px;
}

/* РАДИОКНОПКИ */
.contract-form .radio-group {
  display: grid;
  gap: 12px;
}

.contract-form .radio-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.contract-form .radio-item input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  cursor: pointer;
  accent-color: #0066cc;
  flex-shrink: 0;
}

.contract-form .radio-item label {
  font-size: 15px;
  color: #333;
  cursor: pointer;
  flex: 1;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* КНОПКИ ДЕЙСТВИЙ */
.contract-form .form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.contract-form .btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.contract-form .btn-primary {
  background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
  color: white;
}

.contract-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.contract-form .btn-primary:active {
  transform: translateY(0);
}

.contract-form .btn-secondary {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
}

.contract-form .btn-secondary:hover {
  background: #e8e8e8;
  border-color: #999;
}

.contract-form .btn-secondary:active {
  background: #e0e0e0;
}

/* СООБЩЕНИЕ ФОРМЫ */
.contract-form .form-message {
  padding: 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 16px;
}

.contract-form .form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.contract-form .form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.contract-form .form-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ИНФОРМАЦИОННЫЙ БЛОК */
.contract-info {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 20px;
  margin-top: 30px;
}

.contract-info p {
  font-size: 13px;
  color: #856404;
  line-height: 1.6;
  margin: 0;
}

.contract-info strong {
  font-weight: 600;
}

/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
  .contract-page {
    padding: 20px 15px;
  }

  .contract-container {
    padding: 24px;
  }

  .contract-page .page-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .contract-form {
    gap: 20px;
  }

  .contract-form .form-actions {
    grid-template-columns: 1fr;
  }

  .contract-form .form-label {
    font-size: 15px;
  }

  .contract-form .form-input,
  .contract-form .form-textarea {
    font-size: 16px;
    padding: 10px 12px;
  }

  .contract-form .form-section {
    padding: 16px;
  }

  .contract-form .form-section legend {
    font-size: 14px;
    padding-bottom: 12px;
  }

  .contract-form .form-text {
    font-size: 12px;
  }

  .contract-form .radio-item label {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .contract-page {
    padding: 15px 10px;
  }

  .contract-container {
    padding: 16px;
  }

  .contract-page .page-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .contract-form {
    gap: 16px;
  }

  .contract-form .form-label {
    font-size: 14px;
  }

  .contract-form .form-input,
  .contract-form .form-textarea {
    font-size: 16px;
    padding: 10px;
  }

  .contract-form .btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .contract-form .form-section {
    padding: 12px;
  }

  .contract-form .form-section legend {
    font-size: 13px;
  }

  .contract-info {
    padding: 16px;
  }

  .contract-info p {
    font-size: 12px;
  }
}

/* ПОДДЕРЖКА ТЕМНОГО РЕЖИМА */
@media (prefers-color-scheme: dark) {
  .contract-page {
    background: #1a1a1a;
  }

  .contract-container {
    background: #242424;
    color: #ffffff;
  }

  .contract-page .page-title {
    color: #ffffff;
  }

  .contract-form .form-label {
    color: #e0e0e0;
  }

  .contract-form .form-input,
  .contract-form .form-textarea {
    background: #333333;
    border-color: #444444;
    color: #ffffff;
  }

  .contract-form .form-input:focus,
  .contract-form .form-textarea:focus {
    border-color: #66b2ff;
    box-shadow: 0 0 0 3px rgba(102, 178, 255, 0.1);
  }

  .contract-form .form-input::placeholder,
  .contract-form .form-textarea::placeholder {
    color: #999999;
  }

  .contract-form .form-section {
    background: #2a3a4a;
    border-left-color: #66b2ff;
  }

  .contract-form .form-section legend {
    color: #e0e0e0;
  }

  .contract-form .form-text {
    color: #cccccc;
  }

  .contract-form .radio-item label {
    color: #e0e0e0;
  }

  .contract-form .btn-secondary {
    background: #333333;
    color: #e0e0e0;
    border-color: #555555;
  }

  .contract-form .btn-secondary:hover {
    background: #404040;
    border-color: #666666;
  }

  .contract-info {
    background: #3a3a1a;
    border-color: #666633;
  }

  .contract-info p {
    color: #ccaa33;
  }
}

/* ПЕЧАТЬ */
@media print {
  .contract-page {
    background: white;
    padding: 0;
  }

  .contract-container {
    box-shadow: none;
    padding: 0;
  }

  .contract-form .form-actions {
    display: none;
  }

  .contract-form .form-input,
  .contract-form .form-textarea {
    border: 1px solid #000;
    background: white;
  }

  .contract-form .radio-item input[type="radio"] {
    appearance: none;
    width: 12px;
    height: 12px;
    border: 1px solid #000;
    border-radius: 50%;
  }

  .contract-form .radio-item input[type="radio"]:checked::after {
    content: '●';
    position: absolute;
    margin-left: 2px;
  }
}

<!-- CSS СТИЛИ  doctors-page-->

.doctors-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.doctors-header {
  text-align: center;
  margin-bottom: 50px;
}

.doctors-header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.doctors-subtitle {
  font-size: 16px;
  color: #666;
}

/* ФИЛЬТРЫ */
.doctors-filters {
  margin-bottom: 40px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-group label {
  font-weight: 600;
  color: #333;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* СЕТКА ВРАЧЕЙ */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* КАРТОЧКА ВРАЧА */
.doctor-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
}

.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.doctor-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f0f0f0;
}

.doctor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-info {
  padding: 20px;
}

.doctor-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.doctor-position {
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  margin: 0 0 5px 0;
}

.doctor-specialty {
  font-size: 13px;
  color: #666;
  margin: 0 0 12px 0;
}

.doctor-description {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-details {
  width: 100%;
  padding: 10px;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-details:hover {
  background: #0052a3;
}

/* МОДАЛЬНОЕ ОКНО */
.doctor-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.doctor-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 30px;
}

.modal-doctor-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-doctor-name {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.modal-doctor-position {
  font-size: 14px;
  color: #0066cc;
  font-weight: 600;
  margin-bottom: 20px;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.modal-section-text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
  .doctors-header h1 {
  font-size: 26px;
  }

  .doctors-grid {
  grid-template-columns: 1fr;
  gap: 20px;
  }

  .modal-content {
  width: 95%;
  }
}

    /* Основной контейнер */
    .push-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 99999; /* Поверх всего */
        padding: 1rem 1rem 2rem 1rem; /* Чуть больше отступа снизу для iPhone X+ */
        display: flex;
        justify-content: center;
        pointer-events: none; /* Пропускаем клики мимо контейнера */
    }

    /* Сама плашка */
    .push-banner-content {
        pointer-events: auto; /* Возвращаем клики на плашку */
        background: rgba(255, 255, 255, 0.98); /* Почти непрозрачный белый */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        width: 100%;
        max-width: 420px;
        border-radius: 22px;
        padding: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(0, 0, 0, 0.04);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    /* Иконка колокольчика */
    .push-icon-box {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #007AFF, #0056b3); /* iOS Blue */
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    }

    /* Кнопки (сброс стилей сайта) */
    .push-btn-group {
        display: flex;
        gap: 12px;
        margin-top: 5px;
    }

    .push-btn {
        flex: 1;
        border: none;
        outline: none;
        padding: 12px 0;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: transform 0.1s, opacity 0.2s;
        height: 48px; /* Фиксированная высота */
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .push-btn:active {
        transform: scale(0.97);
    }

    /* Кнопка "Позже" */
    .push-btn-secondary {
        background-color: #F2F2F7; /* iOS Light Gray */
        color: #8E8E93 !important;
    }

    /* Кнопка "Включить" */
    .push-btn-primary {
        background-color: #677fa8; /* iOS Blue */
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
    }

/* ===================================
       1. КНОПКА "НАВЕРХ" (ТЕПЕРЬ В САМОМ НИЗУ)
       =================================== */
    .back-to-top {
        width: 60px !important;
        height: 60px !important;
        line-height: 56px !important; /* Центровка иконки */
        border-radius: 50%;
        text-align: center;
        display: none; /* JS сам включит display: block */
        
        position: fixed !important;
        /* САМЫЙ НИЗ */
        bottom: 20px !important; 
        right: 5px !important;
        
        z-index: 9980 !important;
        background-color: #677fa8;
        border: 2px solid #677fa8;
        font-size: 24px;
        color: #fff !important;
        
        /* Обязательно для анимации вылета стрелки */
        overflow: hidden; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
    }
    
    .back-to-top:hover {
        background-color: #677fa8;
        border-color: #677fa8;
        transform: translateY(-3px);
    }
    
    /* АНИМАЦИЯ СТРЕЛКИ (Улетает вверх, появляется снизу) */
    .back-to-top i {
        display: inline-block;
        vertical-align: middle;
        transition: transform 0.3s ease;
    }
    
    /* При наведении запускаем анимацию */
    .back-to-top:hover i {
        animation: toTopFromBottom 0.5s forwards;
    }
    
    @keyframes toTopFromBottom {
        49% { transform: translateY(-100%); }
        50% { opacity: 0; transform: translateY(100%); }
        51% { opacity: 1; }
        100% { transform: translateY(0); }
    }
    
    
    /* ===================================
       2. КОНТЕЙНЕР "СВЯЗЬ" (ТЕПЕРЬ ВЫШЕ)
       =================================== */
    .contact-widget {
        position: fixed !important;
        /* РАСЧЕТ ВЫСОТЫ: 
           20px (отступ снизу) + 60px (кнопка Back-to-Top) + 15px (зазор) = 95px */
        bottom: 95px !important; 
        right: 5px !important;
        z-index: 9999 !important;
        
        display: flex;
        /* column: сначала опции, потом кнопка -> меню будет сверху */
        flex-direction: column; 
        align-items: center;
        gap: 10px;
        width: 60px; /* Чтобы не растягивался */
    }
    
    /* ГЛАВНАЯ КНОПКА (ПУЛЬСИРУЕТ) */
    .main-contact-btn {
        width: 60px !important;
        height: 60px !important;
        border-radius: 50%;
        background: #677fa8;
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0;
        z-index: 2;
    }
    
    /* Пульсация */
    .main-contact-btn::before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        border-radius: 50%;
        background: inherit;
        z-index: -1;
        animation: pulse-ring 4s infinite;
    }
    
    @keyframes pulse-ring {
        0% { transform: scale(1); opacity: 0.6; }
        50% { transform: scale(1.5); opacity: 0; }
        100% { transform: scale(1.5); opacity: 0; }
    }
    
    /* МЕНЮ ОПЦИЙ (Скрыто, выезжает ВВЕРХ над кнопкой) */
    .contact-options {
        display: flex;
        flex-direction: column;
        gap: 10px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        margin-bottom: 5px;
        align-items: center;
    }
    
    .contact-widget.active .contact-options {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Маленькие иконки */
    .contact-btn {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        color: white !important;
        text-decoration: none;
        font-size: 22px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        flex-shrink: 0;
        transition: transform 0.2s;
    }
    
    .contact-btn:hover { transform: scale(1.1); }
    
    /* Брендовые цвета */
    .telegram { background: #229ED9; }
    .whatsapp { background: #25D366; }
    .email    { background: #fd7e14; }
    .phone    { background: #dc3545; }
    
/* 1. Настройка для тач-устройств (стабилизация) */
    @media (hover: none) and (pointer: coarse) {
        body {
            /* Если вдруг фон остался на body, это его успокоит */
            background-attachment: scroll !important; 
            min-height: 100dvh !important; 
        }
        .hero {
            min-height: 100dvh !important;
        }
    }
    
    /* 2. Блокировка дерганья при ОТКРЫТОМ меню (Объединил всё в один блок) */
    body.modal-open, 
    body:has(.side-menu-active) {
