/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
  font-size: 20px;
  color: #57ad59;
  transition: 0.2s ease;
}

a:hover {
  transform: translateY(-4px);
}

.footer-info a {
  font-size: 16px;
}

.footer-requase a {
  color: #fff !important;
}

p {
  line-height: 1.5em;
  font-size: 18px;
}

.price-info-p {
  margin: 10px 0px 10px 0px;
}

strong {
  color: #504d42;
}

.template-content p {
  margin: 20px auto;
  color: #504d42;
}

.header-3 {
  font-size: 28px;
  font-weight: 400;
  color: #504d42;
}

.green-color {
  color: #57ad59;
}

.brown-color {
  color: #504d42;
}

body {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  background: #f8fafb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 5px;
}

.site-brand {
  font-weight: 500;
  font-size: 20px;
}

.site-brand .logo-doc {
  color: #504d42;
}

.site-brand .logo-plus {
  color: #57ad59;
}

.btn-round {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-round img {
  display: block;
  max-width: 60%;
  max-height: 60%;
}

/* Хлебные крошки */
.breadcrumbs {
  font-size: 16px;
  margin: 60px auto 20px auto;
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li a {
  text-decoration: none;
  color: #504d42;
  /*transition: color 0.2s ease;*/
}

.breadcrumbs li a:hover {
  color: #57ad59;
  transform: none;
}

.breadcrumbs li + li:before {
  content: "›"; /* или '>' */
  margin: 0 8px;
  color: #999;
}

.breadcrumbs li:last-child a {
  pointer-events: none;
  color: #999;
}

@media (max-width: 1199px) {
  .breadcrumbs {
    font-size: 15px;
  }

  .breadcrumbs li + li:before {
    margin: 0 6px;
  }
}

@media (max-width: 991px) {
  .breadcrumbs {
    font-size: 14px;
  }

  .breadcrumbs ul {
    /*row-gap: 6px;*/
  }
}

@media (max-width: 767px) {
  .breadcrumbs {
    font-size: 13px;
  }

  .breadcrumbs li + li:before {
    margin: 0 5px;
  }
}

@media (max-width: 575px) {
  .breadcrumbs {
    font-size: 12px;
  }

  .breadcrumbs ul {
    gap: 4px 0;
  }

  .breadcrumbs li {
    white-space: nowrap;
  }

  .breadcrumbs li a {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.site-wrapper {
  min-height: 100vh; /* минимум 100% высоты окна */
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1 0 auto;
}

.main-content::after {
  content: "";
  display: block;
  height: 20px; /* высота отступа под футером */
}

ul {
  list-style: none;
  line-height: 1.5em;
  font-size: 18px;
  margin: 0px 0px 0px 30px;
  color: #504d42;
}

.template-content ul li {
  position: relative;
  padding-left: 15px;
  margin: 15px auto;
}

.template-content ul li::before {
  content: "–";
  position: absolute;
  left: 0;
}

h2,
h2 a {
  font-size: 48px;
  margin-bottom: 40px;
  margin-top: 90px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  margin-top: 90px;
}

.section-header h2 {
  margin: 0;
}

.section-link {
  text-decoration: none;
  color: #57ad59;
  white-space: nowrap;
}

.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

/* Шапка */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s;
}

.header-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-img {
  height: 44px;
  width: auto;
}

/* Десктопное меню и кнопки */
.desktop-menu-buttons {
  display: flex;
  align-items: center;
  gap: 40px;
  background: #f8fafb;
  padding: 5px 30px;
  border-radius: 25px;
  height: 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.header-menu {
  display: flex;
  align-items: center;
}

.menu-list {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.menu-list > li > a {
  color: #504d42;
  text-decoration: none;
  padding: 10px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.menu-list > li > a:hover {
  color: #57ad59;
}

/* Кнопки справа */
.buttons-block {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.btn-round {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f8fafb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.btn-oval {
  padding: 10px 20px;
  border-radius: 999px;
  background: #f8fafb;
  color: #504d42;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-oval:hover {
  transform: scale(1.1);
  animation: pulse 1s infinite;
}

.btn-green {
  background: #57ad59;
  color: #fff !important;
}

/* Бургерное меню */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 10px;
  transition: background 0.2s;
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #504d42;
  border-radius: 3px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Крестик */
.mobile-menu-toggle.active .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-toggle.active .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu-panel {
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transform: translate(-110%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
}

.mobile-menu-panel.active {
  transform: translateY(0);
}

.mobile-menu-inner {
  padding: 24px 20px 40px;
}

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

.mobile-menu-list > li {
  border-bottom: 1px solid #eee;
}

.mobile-menu-list a {
  display: block;
  padding: 18px 0;
  color: #222;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
}

/* Аккордеон мобильного меню */
.mobile-menu-list .sub-menu {
  padding-left: 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu-list li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  float: right;
  margin-left: 6px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(80,77,66,1)"><path d="M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"></path></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s;
  vertical-align: middle;
}

.mobile-menu-list li.open > a::after {
  transform: rotate(180deg);
}
.mobile-menu-list li.open > .sub-menu {
  max-height: 2000px;
}

.mobile-buttons-block {
  display: none;
}

/* Десктопное меню */
/* =================================
   Десктопное мега-меню
================================= */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 920px;
  max-width: 100vw;
  background: #f8fafb;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  gap: 40px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.28s ease;
  z-index: 1000;
  margin-top: 20px;
  overflow: visible; /* важно для вложенных уровней */
}

.menu-list > li:hover > .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Стрелка для пунктов верхнего уровня с подменю */
.menu-list > li.menu-item-has-children > a::after {
  content: ""; /* пустое, будем через background вставлять SVG */
  display: inline-block;
  width: 10px; /* ширина стрелки */
  height: 10px; /* высота стрелки */
  margin-left: 8px; /* отступ от текста */
  vertical-align: middle;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="rgba(80,77,66,1)"><path d="M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"></path></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.3s;
}

/* Анимация при hover для верхнего уровня */
.menu-list > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg); /* стрелка вверх при открытии */
}

/* Левая колонка */
.mega-left {
  width: 20%;
  flex-shrink: 0;
}

.mega-left ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-left-item > a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: #504d42;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 400;
  transition: all 0.22s;
}

.mega-left-item:hover > a {
  background: #f0f9f4;
  color: #1aa95f;
  transform: translateY(0px);
}

/* Правая колонка */
.mega-right {
  width: 80%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #eee;
  padding-left: 32px;
  overflow: visible; /* чтобы 3-й уровень был виден */
}

.mega-right-inner {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px 32px;
  overflow-y: auto;
  max-height: 536px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #a0d8b3 #f5f5f5;
}

.mega-right-inner::-webkit-scrollbar {
  width: 6px;
}

.mega-right-inner::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.mega-right-inner::-webkit-scrollbar-thumb {
  background: #a0d8b3;
  border-radius: 3px;
}

.mega-right-item {
  position: relative; /* важно для абсолютного подменю */
  break-inside: avoid;
  margin: 0;
}

.mega-right-item > a {
  display: block;
  padding: 10px 0;
  color: #504d42;
  font-weight: 300;
  font-size: 15.5px;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s;
}

.mega-right-item > a:hover {
  color: #1aa95f;
  transform: translateY(0px);
}

/* =================================
   Третий уровень
================================= */
.sub-level-4 {
  list-style: none;
  position: absolute; /* абсолютное позиционирование */
  top: 0;
  left: 100%; /* смещаем вправо от родителя */
  min-width: 180px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none; /* скрыт по умолчанию */
  padding: 10px 0;
  border-radius: 8px;
  z-index: 10;
}

.mega-right-item:hover > .sub-level-4 {
  display: block; /* показываем на hover */
}

.sub-level-4-item a {
  display: block;
  padding: 7px 14px;
  border-radius: 6px;
  color: #555;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.2s;
}

.sub-level-4-item a:hover {
  background: #e8f5e8;
  color: #1aa95f;
  padding-left: 16px;
}

.sub-right {
  position: absolute;
  top: 0;
  left: 100%; /* ← вот это главное */
  width: 300px; /* или под твою ширину */
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px;
  border-radius: 8px;
  display: none;
  z-index: 20;
}

.mega-right,
.mega-right-item {
  position: relative;
}

/* =================================
   Адаптив
================================= */
@media (max-width: 1100px) {
  .mega-menu {
    width: 96%;
    left: 2%;
    padding: 24px;
    gap: 30px;
  }

  .mega-right-inner {
    grid-template-columns: 1fr 1fr; /* на планшетах 2 колонки */
    gap: 18px 24px;
  }
}

@media (max-width: 1199.99px) {
  .desktop-menu-buttons .header-menu,
  .desktop-menu-buttons .buttons-block {
    display: none !important;
  }

  .desktop-menu-buttons {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 90%;
  }

  .brand-wrap {
    margin-left: 20px;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

@media (min-width: 1200px) {
  .mobile-menu-toggle,
  .mobile-menu-panel {
    display: none !important;
  }
}

/* Футер */
.footer {
  background-color: #262626;
  color: #fff;
  padding: 40px 20px 20px;
  margin: 20px 10%;
  border-radius: 90px;
  flex-shrink: 0;
}

.footer-wrapper {
  max-width: 1400px;
  margin: auto;
  padding: 40px 20px;
}

.footer a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.footer__container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 auto;
}

.footer__column__1 {
  flex: 0 0 calc(15% - 15px);
}

.footer__column__2 {
  flex: 0 0 calc(50% - 15px);
}

.footer__column__3 {
  flex: 0 0 calc(30% - 15px);
}

.footer__column h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 400;
}

.footer-block {
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 400;
}

.footer-requase {
  font-size: 16px;
  font-weight: 300;
  color: #ffffff3b;
}

.footer-requase a {
  font-size: 16px;
  font-weight: 300;
  color: #ffffff3b;
}

.footer-menu,
.footer-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid #444;
  margin-top: 20px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-bottom a {
  color: #fff;
}

@media (max-width: 768px) {
  .footer__container {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 5px;
  }
}

/* Первый экран */
.hero {
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 0 5% 0 5%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  background: #fff;
  border-radius: 130px;
}

.hero__container {
  display: flex;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 5%;
  align-items: center;
  height: 100%;
}

.hero__left {
  flex: 0 0 60%;
  max-width: 60%;
}

.hero__right {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  justify-content: center;
}

/* Обёртка под видео */
.hero__video {
  width: 100%;
  height: 100%;
  border-radius: 70px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.hero__video video {
  width: 100%;
  height: 80%;
  object-fit: cover;
  display: block;
}

.hero__title {
  font-size: 54px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
  color: #504d42;
  margin: 10% auto 0px;
}

.title-line {
  display: block;
  line-height: 1.3em;
}

/* Главная иконки — вторая строка */
.middle-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.title-badges {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.title-badges img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  margin-left: -14px;
  transition: transform 0.3s ease;
}

.title-badges img:first-child {
  margin-left: 0;
}

/* Адаптив */
@media (max-width: 768px) {
  .hero__title {
    font-size: 48px;
  }
  .middle-line {
    gap: 14px;
  }
  .title-badges img {
    width: 40px;
    height: 40px;
    margin-left: -12px;
    border-width: 3px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 38px;
  }

  .about__title {
    font-size: 24px;
  }

  .title-badges img {
    width: 36px;
    height: 36px;
    margin-left: -10px;
  }
}

.hero__description {
  font-size: 20px;
  line-height: 1.6;
  color: #504d42;
  margin: 40px auto 40px;
  text-align: center;
}

.hero__block {
  margin: 80px 0px 0px 0px;
  width: 80%;
  background: #f8fafb;
  padding: 20px;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.gift-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.gift-icon {
  flex-shrink: 0;
  stroke: #57ad59;
}

.gift-title {
  font-size: 20px;
  font-weight: 400;
  color: #504d42;
  margin: 0;
}

.gift-text {
  font-size: 18px;
  color: #333;
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.gift-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 300;
  color: #57ad59;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gift-link:hover {
  color: #448a46;
  gap: 12px;
}

/* Адаптив */
@media (max-width: 576px) {
  .hero__block {
    padding: 30px 20px;
    width: 90%;
  }
  .gift-title {
    font-size: 18px;
    line-height: 1.6;
  }
  .gift-text {
    font-size: 16px;
  }
}

.hero__image {
  width: 100%;
  height: auto;
  max-width: 400px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero__button {
  margin: 20px auto 20px auto;
  padding: 10px 10px;
  font-size: 16px;
  font-weight: 300 !important;
  background: #57ad59;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  display: block;
  width: 220px;
  text-align: center;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero__button:hover {
  transform: scale(1.1);
  animation: pulse 1s infinite;
}

/* Адаптивность для планшетов и мобильных */
@media (max-width: 992px) {
  .hero {
    border-radius: 0px 0px 90px 90px;
    height: auto;
  }

  .hero__container {
    flex-direction: column;
    text-align: center;
  }

  .hero__container {
    height: inherit;
  }

  .hero__left {
    margin: 5% auto 0px auto;
  }

  .hero__left,
  .hero__right {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .hero__right {
    margin-top: 40px;
    padding: 0px 0px 30px;
  }

  .hero__title {
    font-size: 38px;
  }

  .hero__description {
    margin-bottom: 10px;
  }

  .hero__title {
    margin: 10% auto 0px;
  }
}

@media (max-width: 576px) {
  .hero__left {
    margin: 30% auto 0px auto;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__description {
    font-size: 18px;
  }

  .hero__block {
    padding: 30px 20px;
  }
}

/* Плитка взросылый детский */
.tiles-container {
  display: flex;
  gap: 20px;
  margin: 90px auto 0px auto;
  justify-content: center;
}

.tile {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: #fff;
  border-radius: 40px;
  padding: 10px 30px;
  width: 20%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.tile:hover {
  transform: translateY(-4px);
}

.tile img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.tile-text {
  font-size: 24px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
  padding: 20px;
}

.faq-section {
  height: auto;
  background: #fff;
  margin: 90px auto 0px auto;
  border-radius: 130px;
}

.faq-container {
  width: 90%;
  max-width: 1400px;
  margin: 60px auto 60px auto;
  padding: 10px 40px 60px 40px;
}

/* Направления специалистов */
.consult-section,
.diagnostics-section,
.about-section,
.specialists-section {
  height: auto;
  background: #fff;
  display: flex;
  align-items: flex-start;
  margin: 90px auto 0px auto;
  border-radius: 130px;
  min-height: 85vh;
}

.consult-container,
.diagnostics-container,
.programs-container,
.about-container,
.specialists-container,
.article-container,
.contacts-main,
.news-container {
  width: 90%;
  max-width: 1400px;
  margin: 0px auto 0px auto;
  padding: 0px 40px 0px 40px;
}

.consult-title {
  font-size: 48px;
  margin-bottom: 10px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
}

.consult-description {
  font-size: 18px;
  margin-bottom: 30px;
  color: #504d42;
  width: 70%;
  line-height: 1.6;
}

.consult-list {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  flex-direction: row;
  padding: 0px 0px 50px 0px;
}

.consult-card {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 35px;
  background-color: rgba(80, 77, 66, 0.05);
  text-decoration: none;
  color: #504d42;
  transition: 0.2s ease;
}

.consult-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.consult-icon-wrap {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.consult-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/*Блок неважно чувствуете*/

/*Блок диагностика на главной*/
.diagnostics-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-button {
  position: relative;
  padding: 8px 0px;
  cursor: pointer;
  color: #999;
  font-weight: 400;
}

.tab-button.active {
  color: #504d42;
  font-weight: 400;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #57ad59;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 20px;
}

.load-more-button {
  background: rgb(245 245 245);
  color: #504d42;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 25px;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  width: 220px;
  margin: 40px auto;
}

.load-more-button:hover {
  background: #504d42;
  transform: scale(1.1);
  color: #fff;
}

/*Программы на главной*/
/*Программы*/
.programs-section {
  position: relative;
}

.programs-header {
  display: flex;
  justify-content: flex-end;
  margin: 0px 0px 20px 0px;
  gap: 10px;
}

.programs-arrow {
  width: 44px;
  height: 44px;
  border-radius: 20px;
  border: none;
  background: #f2f2f2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #504d42;
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.3s;
}

.programs-arrow.active {
  opacity: 1;
  pointer-events: auto;
}

.programs-grid__page {
  display: flex;
  gap: 16px;
  flex-direction: row;
  flex-wrap: wrap;
}

.programs-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  /* скрываем скролл в разных браузерах */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

.programs-grid::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Edge */
}

.program-card {
  flex: 0 0 calc(25% - 15px);
  padding: 40px;
  background: #ffffff;
  border-radius: 70px;
}

.program-card__page {
  flex: 0 0 calc(25% - 15px);
  padding: 40px;
  background: #f2f2f2;
  border-radius: 70px;
}

.program-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  justify-content: space-between;
}

.program-index {
  font-size: 32px;
  font-weight: 600;
  opacity: 0.3;
}

.program-cross {
  position: relative;
  width: 120px;
  height: 120px;
}

.program-cross .circle-img-big {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid #f9f9f9;
}

.program-cross .circle-img-mini {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid #f9f9f9;
}

.program-cross .circle-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(80 77 66 / 11%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.program-cross .circle img,
.program-cross .circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* позиции креста */
.program-cross .left {
  left: -20px;
  top: 40%;
  transform: translateY(-50%);
}

.program-cross .right {
  left: 60%;
  top: 100%;
  transform: translateY(-40%);
}

.program-cross .top {
  top: 0;
  left: 65%;
  transform: translateX(-50%);
}

.program-cross .bottom {
  top: 65%;
  left: 15%;
  transform: translateX(-50%);
}

.program-title {
  margin: 30px 0 8px;
  color: #504d42;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5em;
  width: 75%;
  height: 120px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.program-price {
  color: #504d42;
  font-size: 18px;
  font-weight: 400;
}

.program-desc {
  font-size: 18px;
  opacity: 0.8;
  line-height: 1.5em;
}

.program-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.program-button {
  padding: 8px 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

/* Блок фона */
.template-background {
  background-color: #fff;
  border-radius: 130px;
}
.background-wrapper {
  max-width: 1400px;
  margin: auto;
  padding: 40px 20px;
}

h1 {
  margin: 0px auto 20px auto;
  font-size: 54px;
  font-weight: 400;
  line-height: 1.25;
  color: #504d42;
}

/*Карточки специалиста*/
.specialists-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.specialist-card {
  flex: 0 0 calc(25% - 15px);
  border-radius: 8px;
  padding: 10px;
}
.specialist-photo img {
  width: 100%;
  height: 55%;
  /*height: 300px;*/
  border-radius: 70px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 70px;
  /*background: rgba(80, 77, 66, 0.05);*/
  box-shadow: 4px 4px 20px 0px rgb(0 0 0 / 11%);
}

.specialist-name {
  font-size: 18px;
  margin: 10px 0px 10px 0px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
  min-height: 50px;
  padding: 10px 10px 10px 0px;
  width: 100%;
  height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.spec-content {
  color: #504d42;
  padding: 10px 20px;
}

.specialist-specialization {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  margin-top: -10px;
  min-height: 50px;
  line-height: 1.3em;
  height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.specialist-buttons {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  margin-bottom: 65px;
}

.circle-buttons .button-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(80, 77, 66, 0.05);
  border-radius: 50%;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.circle-buttons .button-link .arrow-icon {
  stroke: #504d42;
  transition:
    transform 0.4s ease,
    stroke 0.4s ease;
  z-index: 2;
  position: relative;
}

.circle-buttons .button-link::before {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: rgba(80, 77, 66, 0.1);
  border-radius: 50%;
  top: -50%;
  left: -50%;
  transform: scale(0);
  transition:
    transform 0.5s ease,
    opacity 0.5s ease;
  opacity: 0;
  z-index: 1;
}

.circle-buttons .button-link:hover::before {
  transform: scale(1);
  opacity: 1;
}

.circle-buttons .button-link:hover {
  background: #504d42;
  transform: scale(1.1);
}

.circle-buttons .button-link:hover .arrow-icon {
  transform: translate(1px, -1px) rotate(45deg);
  stroke: #fff;
}

.button-signup {
  display: inline-block;
  padding: 10px 20px;
  background: #57ad59;
  color: #fff;
  border-radius: 35px;
  text-decoration: none;
  font-weight: 300;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.button-signup:hover {
  animation: pulse 1s infinite;
  background: #504d42;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.service-card {
  flex: 0 0 calc(25% - 15px);
  border-radius: 70px;
  padding: 40px;
  background: #f9f9f9;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 100%;
}

.service-title {
  font-weight: 400;
  font-size: 18px;
  color: #504d42;
  padding: 5px 7px;
  border-radius: 15px;
  margin-bottom: 10px;
  line-height: 1.5em;
  width: 80%;
}

.service-description {
  font-size: 16px;
  color: #504d42;
  margin-bottom: 15px;
  padding: 5px 7px;
}

.service-price {
  font-size: 18px;
  color: #504d42;
  font-weight: 400;
  padding: 5px 7px;
  /*width: 20%;*/
}

@media (max-width: 1200px) {
  .service-card {
    flex: 0 0 calc(33.333% - 12px);
  }
}

@media (max-width: 900px) {
  .service-card {
    flex: 0 0 calc(50% - 8px);
  }
}

@media (max-width: 600px) {
  .service-card {
    flex: 0 0 100%;
    border-radius: 40px;
    padding: 24px;
  }
}

.diagnostics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.diagnostics-card {
  flex: 0 0 calc(25% - 15px);
  border-radius: 70px;
  padding: 40px;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.type__diagnostics-card {
  background: rgb(245 245 245);
  padding: 5px 7px;
  border-radius: 15px;
  width: max-content;
  margin: 0px 0px 10px 0px;
  color: #504d42;
}

.title__diagnostics-card {
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 10px;
  color: #504d42;
  padding: 5px 7px;
  line-height: 1.5em;

  height: 120px; /* подбери под свой дизайн (120–160px обычно хватает) */
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5; /* максимум 5 строк, можно 4–6 */
}

.price__diagnostics-card {
  font-size: 18px;
  color: #504d42;
  font-weight: 400;
  padding: 5px 7px;
}

.diagnostics-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  aspect-ratio: 4 / 3;
  gap: 20px;
  margin: 90px 0px;
}

/* Индивидуальная страниц диагностики */
.diagnostics-content {
  margin: 0px 0px 30px 0px;
}

/* базовый стиль */
.cell {
  background: #f3f3f3;
  border-radius: 80px;
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 22px;
  flex-direction: column;
  color: #504d42;
}

.cell__media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 80px;
}

.cell__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cell-1 {
  grid-column: 1;
  grid-row: 1;
}

.cell-2 {
  grid-column: 2;
  grid-row: 1 / 3; /* вертикальный блок */
}

.cell-3 {
  grid-column: 3;
  grid-row: 1;
}

.cell-4 {
  grid-column: 4;
  grid-row: 1;
  overflow: hidden; /* обрезает лишнее */
}

.cell-5 {
  grid-column: 1;
  grid-row: 2;
  background: #57ad59;
  color: #fff;
  position: relative;
}

.cell-6 {
  grid-column: 3 / 5; /* 3–4 колонка */
  grid-row: 2;
}

.cell-7 {
  grid-column: 1 / 3; /* 1–2 колонка */
  grid-row: 3;
}

.cell-8 {
  grid-column: 3;
  grid-row: 3;
  background: #57ad59;
  color: #fff;
  position: relative;
}

/* картинка в правом верхнем углу */
.cell-5::before,
.cell-8::before {
  content: "";
  position: absolute;
  top: 25px;
  right: 0px;
  width: 220px;
  height: 220px;
  background-image: url(/wp-content/themes/docplus/assets/images/pluse_icon.png);
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  transform: rotate(180deg);
}

.cell__header {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3em;
}

.cell__title {
  font-size: 58px;
  font-weight: 400;
}

.cell__description {
  font-size: 18px;
  margin: 20px 0px;
  font-weight: 300;
}

.cell-4 img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* вписывает без искажений */
  object-position: center; /* центрирует */
  display: block;
}

@media (max-width: 768px) {
  .about-grid {
    display: flex;
    grid-template-columns: 2fr;
    gap: 16px;
    flex-direction: column;
    flex-wrap: nowrap;
  }
}

/*Первый экран индивидуальной страницы под направления*/
.appointment-block {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin: 40px 0;
}

.appointment-left {
  flex: 0 0 60%;
}

.appointment-block__description {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
  width: 90%;
  color: #504d42;
}

.price {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 20px;
  color: #504d42;
}

/*Обратная связь message направления*/
.custom-block {
  padding: 15px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.message-bubble {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 40px 40px 30px 40px;
  border-radius: 50px 50px 50px 50px;
  font-size: 16px;
  line-height: 1.4;
  background-color: rgb(245 245 245);
  color: #504d42;
  width: 90%;
}

.message-bubble__block {
  margin: 60px 0px 0px -15px;
}

.message-bubble__spec {
  margin: 0px 0px 20px 30px;
}

.message-bubble::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0px;
  width: 0;
  height: 0;
  /* border-top: 0px solid transparent;
  border-bottom: 20px solid transparent;
  border-right: 20px solid rgb(245 245 245);*/
}

.custom-block .avatar img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 25px;
}

.custom-block img .send {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 25px;
}

.avatar {
  position: relative;
  display: inline-block;
}

.avatar::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 0px;
  width: 12px;
  height: 12px;
  background-color: #57ad59;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(87, 173, 89, 0.7);
  animation: online 1.5s infinite;
  border: 2px solid #fff;
}

.avatar {
  position: relative;
  display: inline-block;
}

.program-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Заголовок */
.program-header {
  margin: 0;
}

/* Контейнер аватарок */
.program-avatars {
  display: flex;
  align-items: center;
  position: relative;
}

/* Круг */
.avatar__prog {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
}

/* Картинки */
.avatar__prog img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Наслаивание */
.avatar-main__prog {
  z-index: 1;
}

.avatar-second__prog {
  margin-left: -18px;
  z-index: 2;
}

@keyframes online {
  0% {
    box-shadow: 0 0 0 0 rgba(87, 173, 89, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(87, 173, 89, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(87, 173, 89, 0);
  }
}

.appointment-right {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  align-items: center;
  flex-direction: column;
}

.appointment-right__row {
  display: flex;
}

.appointment-right__row__left-row {
  justify-content: flex-start;
}

.appointment-right__row__right-row {
  justify-content: flex-end;
}

.appointment-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: #57ad59;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: 0.3s;
  text-align: center;
}

.appointment-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 100px;
  padding: 20px;
}

@media (max-width: 768px) {
  .appointment-block {
    flex-direction: column;
  }

  .appointment-left,
  .appointment-right {
    flex: 1 1 100%;
  }
}

/*Когда обращаться (направление)*/
.when-to-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0;
}

.when-to-contact__tile {
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 35px;
  background-color: rgba(80, 77, 66, 0.05);
  text-decoration: none;
  color: #504d42;
  transition: 0.2s ease;
}

/* Каркас блока уведомления от доктора*/
.request-block {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: center;
  max-width: 60%;
  margin: 80px auto 50px auto;
  padding: 40px 50px 20px 50px;
  background: #ffffff;
  border-radius: 70px;
  height: auto;
}

.request-image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30%;
  height: 100%;
  pointer-events: none; /* опционально */
}

.request-image img {
  position: absolute;
  bottom: 0;
  right: 0px;
  height: 380px;
  max-height: 110%;
  object-fit: contain;
  border-radius: 0 0 70px 0;
  z-index: 0;
}

.request-info {
  flex: 0 0 60%;
}

.request-info p {
  margin-bottom: 24px;
  line-height: 1.5;
  color: #504d42;
}

.request-block .message-form .checkbox-row {
  margin-bottom: 0px;
  margin-top: 0px;
}

.message-form a {
  font-size: 13px;
  color: #57ad59;
}

/* Адаптивность */
@media (max-width: 768px) {
  .request-block {
    flex-direction: column;
  }

  .request-info,
  .request-image {
    flex: 0 0 100%;
  }

  .request-image {
    margin-top: 20px;
  }
}

/* Стили самой формы обратной связи */
.message-form {
  min-height: 150px; /* высота с учётом строки статуса */
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.message-form .form-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 0px;
}

.message-form .form-row input {
  flex: 1 1 calc(50% - 6px);
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.message-form .form-row button {
  width: 48px;
  height: 44px;
  border-radius: 50%;
  background: #57ad59; /* или ваш цвет */
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.form-row button img {
  width: 16px;
  height: 16px;
}

.message-form .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 0px;
}

.message-form .checkbox-row input {
  margin-top: 4px;
}

.form-row input[type="text"],
.form-row input[type="tel"] {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #ccd0d4;
  font-size: 14px;
  width: 200px;
}

.form-row button {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: #2271b1;
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.form-row button:disabled {
  background: #a7aaad;
  cursor: not-allowed;
}

.checkbox-row {
  gap: 10px;
  display: flex;
  margin-top: 15px;
}

.checkbox-row label {
  font-size: 13px;
  color: #50575e;
}

.mf-status {
  min-height: 1.4em; /* фиксированная высота строки */
  font-size: 14px;
}

.mf-status.success {
  color: #2e7d32;
}

.mf-status.error {
  color: #b32d2e;
}

.message-form .mf-status {
  font-size: 14px;
  color: green;
}

.directions-anchor-bar {
  position: sticky;
  top: 70px;
  z-index: 999;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding: 20px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 10px;
}

.directions-anchor-bar::-webkit-scrollbar {
  height: 6px;
}

.directions-anchor-bar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.direction-anchor {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background-color: rgba(80, 77, 66, 0.05);
  padding: 10px 20px;
  border-radius: 35px;
  color: #504d42;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.direction-anchor:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.direction-anchor {
  background-color: rgba(80, 77, 66, 0.05);
  color: #504d42;
  transition: 0.3s ease;
}

.direction-anchor.scrolled {
  background-color: #504d42;
  color: #fff;
}

.icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.direction-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.direction-block {
  margin-bottom: 40px;
}

.direction-block h2 {
  margin-bottom: 10px;
}

/* Страница  специалиста */
/* Форма отзыва */
.review-form-wrapper {
  margin-top: 30px;
  border-radius: 70px;
  width: 70%;
  border: 1px solid rgba(80, 77, 66, 0.05);
  padding: 40px 60px;
  color: #504d42;
}

.reviews-link {
  display: block;
  padding: 10px 12px;
  background-color: rgba(80, 77, 66, 0.05);
  color: #504d42;
  font-size: 16px;
  border-radius: 15px;
}

.review-form-wrapper p {
  margin: 10px 0px;
}

.review-input {
  width: 100%;
  height: 30px;
  border-radius: 12px;
  background-color: rgba(80, 77, 66, 0.05);
  border: none;
  padding: 0 10px;
  box-sizing: border-box;
  outline: none;
}

.review-input:focus {
  outline: none;
  box-shadow: none;
}

/* SVG-звезды */
.rating-svg-wrapper {
  display: flex;
  gap: 5px;
}

.rating-svg svg {
  width: 24px;
  height: 24px;
  fill: transparent;
  stroke: #57ad59;
  stroke-width: 1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.2s;
}

/* Закрашенные звезды */
.rating-svg svg.active,
.rating-svg svg.hover {
  fill: #57ad59;
}

/* Кнопка */
#submit-review {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background-color: #57ad59;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

#submit-review:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.custom-file-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-file-input {
  display: none;
  /* скрываем стандартный input */
}

.custom-file-button {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background-color: rgb(80 77 66 / 0%);
  color: rgb(80 77 66 / 35%);
  cursor: pointer;
  transition: background-color 0.3s;
  border: 1px dashed rgb(80 77 66 / 35%);
  font-size: 16px;
}

.custom-file-button:hover {
  background-color: #4b9c51;
  color: #fff;
  border: none;
  border: 1px solid #4b9c51;
}

.custom-file-text {
  font-size: 14px;
  color: #333;
}

.specialist-top {
  display: flex;
  gap: 30px;
}

.specialist-left {
  width: 30%;
}

.specialist-left img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 90px;
  /*background: rgba(80, 77, 66, 0.05);*/
  box-shadow: 4px 4px 20px 0px rgb(0 0 0 / 11%);
}

.specialist-right {
  width: 70%;
  border-radius: 90px;
  background-color: rgba(80, 77, 66, 0.05);
  height: max-content;
}

.spec-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.spec-tile {
  padding: 7px 20px;
  background: #fff;
  border-radius: 40px;
  font-size: 16px;
  display: inline-block;
  transition: 0.2s;
  color: #504d42;
}

.spec-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.btn-appointment {
  display: table;
  margin-top: 25px;
  padding: 12px 25px;
  background: #57ad59;
  color: #fff;
  border-radius: 40px;
  text-decoration: none;
  font-size: 16px;
  margin: 25px auto;
}

.specialist-right__pad {
  padding: 30px;
}

/* ===== Wrapper ===== */
.tabs-wrapper {
  padding: 40px;
  background-color: rgba(80, 77, 66, 0.05);
  border-radius: 70px;
  margin: 90px auto 0;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #cccccc59;
  margin-bottom: 25px;
}

.tab {
  padding: 10px 25px;
  cursor: pointer;
  color: #999;
  position: relative;
  font-size: 20px;
  font-weight: 400;
}

.tab.active {
  color: #504d42;
  font-weight: 400;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #57ad59;
}

/* ===== Tab content ===== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== Inner ===== */
.tabs-inner {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ===== Items ===== */
.tab-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin: 25px;
}

.tab-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
}

.tab-item div {
  width: 80%;
}

.view-more {
  background: rgba(80, 77, 66, 0.05);
  color: #504d42;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 25px;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.view-more:hover {
  background: #504d42;
  transform: scale(1.1);
  color: #fff;
}

/* ===== Typography ===== */
.experience__description,
.education__description,
.awards__description {
  font-weight: 400;
  font-size: 18px;
  color: #504d42;
}

.experience__additional,
.education__additional,
.awards__additional {
  font-size: 18px;
  color: #504d42;
}

.experience__year,
.education__year,
.awards__year {
  font-size: 16px;
  color: #504d42;
}

/* ===== Mobile titles ===== */
.mobile-tab-title {
  display: none;
}

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .tabs-wrapper {
    padding: 40px;
    border-radius: 90px;
  }

  /* скрываем табы */
  .tabs {
    display: none;
  }

  /* показываем ВСЁ */
  .tab-content {
    display: block;
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  .tab-content:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }

  .mobile-tab-title {
    display: block;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #504d42;
  }
}

#review-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#review-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

#review-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

/*Страница архив диагностики */
.directions-anchor-bar {
  position: sticky;
  top: 70px;
  z-index: 999;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding: 20px 10px;
  scrollbar-width: inherit;
  -webkit-overflow-scrolling: touch;
  margin: 10px;
}

.directions-anchor-bar::-webkit-scrollbar {
  background: rgba(0, 0, 0, 0); /* прозрачность трека */
  height: 15px;
}

.directions-anchor-bar::-webkit-scrollbar-thumb {
  background: #504d42d9; /* цвет ползунка */
  border-radius: 10px;
}

.direction-anchor {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background-color: rgba(80, 77, 66, 0.05);
  padding: 10px 20px;
  border-radius: 35px;
  color: #504d42;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.direction-anchor:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.direction-anchor {
  background-color: #f8fafb;
  color: #504d42;
  transition: 0.3s ease;
}

.direction-anchor.scrolled {
  background-color: #504d42;
  color: #fff;
}

.icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.direction-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.direction-block {
  scroll-margin-top: 180px;
  margin-bottom: 180px;
}

.direction-block h2 {
  margin-bottom: 10px;
}

/* Страница индивидуальной карточки программ */

.program-single {
  margin: 40px 0;
}
.program-single h1 {
  margin-bottom: 20px;
}

/* Страница индивидуальной карточки диагностики */
.diagnostics-single {
  margin: 40px 0;
}
.diagnostics-single h1 {
  margin-bottom: 20px;
}
.diagnostics-image img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
}
.diagnostics-price {
  font-weight: 400;
  margin-bottom: 10px;
  color: #504d42;
  font-size: 18px;
}
.diagnostics-groups span {
  background: #f0f0f0;
  padding: 4px 10px;
  margin-right: 5px;
  border-radius: 4px;
}
.diagnostics-directions a {
  display: inline-block;
  margin-right: 8px;
  text-decoration: none;
  color: #504d42;
  background: #f7f7f7;
  padding: 4px 8px;
  border-radius: 4px;
}
.diagnostics-actions .button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: #504d42;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.kk-block {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  max-width: 60%;
  margin: 90px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 70px;
  height: auto;
}

.kk-image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30%;
  height: 100%;
  pointer-events: none; /* опционально */
}

.kk-image img {
  position: absolute;
  bottom: 0;
  right: 0px;
  height: 380px;
  max-height: 110%;
  object-fit: contain;
  border-radius: 0 0 70px 0;
  z-index: 2;
}

.kk-info {
  flex: 0 0 60%;
}

.kk-info p {
  margin-bottom: 24px;
  line-height: 1.5;
  color: #504d42;
}

.kk-block__reviews-img {
  display: flex;
  gap: 20px;
}

.kk-block__reviews-img img {
  height: 42px;
}

/* Специалисты */
.specialists-section {
  position: relative;
}

.specialists-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
  gap: 10px;
}

.specialists-arrow {
  width: 44px;
  height: 44px;
  border-radius: 20px;
  border: none;
  background: #f2f2f2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #504d42;
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.3s;
}

.specialists-arrow.active {
  opacity: 1;
  pointer-events: auto;
}

.specialists-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 40px 0px;
}

.specialists-grid::-webkit-scrollbar {
  display: none;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 50px auto;
}

.article-card {
  padding: 30px;
  background: #fff;
  border-radius: 60px;
}

.article-specialist-preview {
  display: flex;
  align-items: center;
  gap: 20px;
}

.article-specialist-preview img {
  width: 60px;
  border-radius: 25px;
}

.article-title {
  font-size: 18px;
  margin: 10px 0px 15px 0px;
  font-weight: 400;
  color: #504d42;
}

.article-specialist-name {
  font-size: 18px;
  margin: 10px 0px 15px 0px;
  font-weight: 400;
  color: #504d42;
}

.article-specialist-direction {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
  margin-top: -10px;
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.news-section h2 {
  font-size: 48px;
  margin-bottom: 10px;
  margin-top: 40px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
}

.news-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 50px auto;
}

.news-card {
  flex: 0 0 calc(25% - 15px);
  background: #fff;
  border-radius: 40px;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.news-thumb img {
  width: 100%;
  height: auto;
  border-radius: 30px;
  margin-bottom: 16px;
}

.news-type {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.news-type__item {
  font-size: 14px;
  padding: 4px 10px;
  color: #57ad59;
  border: 1px solid #57ad59;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 400;
}

.news-type-date {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #555;
  margin-bottom: 5px;
}

.news-date {
  color: #888;
}

.news-title {
  font-size: 20px;
  margin: 10px 0;
  font-weight: 400;
  color: #504d42;
  height: 60px;
}

.news-excerpt {
  font-size: 15px;
  color: #525252;
  margin-bottom: 16px;
  flex-grow: 1;
}

.news-more {
  font-size: 14px;
  color: #57ad59;
  text-decoration: none;
  align-self: flex-start;
}

.news-text {
  margin: 20px 0px 20px 0px;
}

/* Адаптив */
@media (max-width: 900px) {
  .news-card {
    flex: 0 0 calc(50% - 16px);
  }
}

@media (max-width: 600px) {
  .news-card {
    flex: 0 0 100%;
  }
}

#mf_send {
  width: 38px;
  border-radius: 25px;
  height: 35px;
  padding: 10px 4px 10px 1px;
}

#mf_send img {
  height: 18px;
}

.card-loyality img {
  position: absolute;
  bottom: 60px;
  right: -90px;
  height: 380;
  max-height: 75%;
  object-fit: contain;
  border-radius: 0 0 70px 0;
  z-index: 1;
  transform: rotate(357deg);
}

.contacts-container {
  display: flex;
  gap: 40px;
  margin: 40px auto;
  gap: 5%;
  flex-wrap: nowrap;
}

.background__white {
  background-color: #fff;
  padding: 40px;
  border-radius: 40px;
}

.filial-info {
  margin: 0px 0px 30px 0px;
  font-size: 18px;
}

.contacts-left {
  min-width: 300px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.contacts-right {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.contacts-right iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 60px;
}

.contacts-bottom .contacts-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  flex-direction: row;
  align-items: center;
  background: #f9f9f9;
  border-radius: 45px;
  justify-content: space-around;
}

.contacts-bottom-index {
  background: #fff;
  flex-wrap: wrap;
  margin-top: 40px;
  flex-direction: row;
  align-items: center;
  border-radius: 45px;
  justify-content: space-around;
  display: flex;
  flex-wrap: wrap;
  margin: 40px auto;
  gap: 5%;
  padding: 20px;
}

.requisites-block {
  display: flex;
  gap: 20px;
  min-width: 50%;
  align-items: center;
}

.requisites-left {
  flex: 2;
}

.requisites-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.requisites-right .view-more {
  background: rgb(245 245 245);
  color: #504d42;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 25px;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.requisites-right .view-more:hover {
  background: #504d42;
  transform: scale(1.1);
  color: #fff;
}

.social-block {
  display: flex;
  align-items: center; /* выравнивание заголовка с кнопками */
  gap: 20px;
  flex-wrap: wrap; /* чтобы не ломалось на мобильных */
  margin: 20px 0;
  flex-direction: column;
  align-items: flex-start;
}

.social-block h3 {
  margin: 0;
  font-size: 20px;
  white-space: nowrap; /* заголовок не переносится */
}

.social-buttons-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

.social-btn img {
  width: 32px;
  height: 32px;
  display: block;
}

/*Блок вопрос ответ*/
.faq-accordion {
  max-width: 80%;
  margin: 60px 0;
}

.faq-item {
  border-bottom: 1px solid #504d4214;
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.3s;
  gap: 20px;
}

.faq-question {
  flex: 1;
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 10px;
  color: #504d42;
  padding: 5px 7px;
  line-height: 1.5em;
}

.faq-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  background: #f9f9f9;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.faq-toggle .arrow-icon {
  transform: rotate(0deg);
  stroke: #504d42;
  transition:
    transform 0.4s ease,
    stroke 0.4s ease;
  z-index: 2;
  position: relative;
}

.faq-toggle.open .arrow-icon {
  transform: rotate(190deg);
  stroke: #fff;
}

.faq-toggle.open {
  background: #504d42;
}

.faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  padding: 0 16px;
  margin: 0px 0px 10px 0px;
}

.faq-doctor-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 12px 0 8px 0;
}

.faq-doctor-name {
  font-size: 18px;
  margin: 10px 0px 0px 0px;
  font-weight: 400;
}

.faq-doctor-directions {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  margin-top: 0px;
}

.faq-doctor-photo {
  width: 60px;
  height: 60px;
  border-radius: 25px;
  object-fit: cover;
}

.faq-answer {
  padding: 5px 7px;
  line-height: 1.3;
  color: #504d42;
}

input:focus {
  background-color: rgba(80, 77, 66, 0.1);
}

.about__title {
  font-size: 38px;
  text-align: left;
  display: inline-block;
  font-weight: 400;
  color: rgb(80 77 66 / 45%);
}

.about-layout {
  display: grid;
  grid-template-columns: 50% 50%;
  row-gap: 48px;
  column-gap: 32px;
  margin: 0 auto;
  padding: 80px 0px;
}

.about-cell {
  box-sizing: border-box;
}

.about-number {
  font-size: 88px;
  color: #57ad59;
}

.about-text {
  font-size: 18px;
  line-height: 1.6;
  color: #2b2b2b;
  max-width: 520px;
}

.about-gallery {
  display: flex;
  gap: 16px;
}

.about-gallery img {
  width: calc(33.333% - 10px);
  aspect-ratio: 1 / 3;
  object-fit: cover;
  border-radius: 50px;
  box-shadow: rgba(0, 0, 0, 0.11) 4px 4px 20px 0px;
  height: 490px;
}

.about-documents {
  margin: 0 auto;
  padding: 80px 0px;
}

.about-documents__title {
  font-size: 32px;
  margin-bottom: 40px;
  color: #504d42;
}

.about-documents__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 60px 0px 0px 0px;
}

.doc-card {
  padding: 30px;
  background-color: rgba(80, 77, 66, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 50px;
}

.about-documents__grid .specialist-buttons {
  margin-bottom: 0px;
}

.doc-card__title {
  color: #504d42;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5em;
}

.doc-card__desc {
  font-size: 18px;
  opacity: 0.8;
  line-height: 1.5em;
  margin: 10px 0px 20px 0px;
}

.circle-buttons .doc-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  height: 45px;
  background: rgba(80, 77, 66, 0.05);
  border-radius: 25px;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  color: #504d42;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 24px;
  margin: 60px 0px 0px 0px;
}

/* Общий стиль */
.principle-card {
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Раскладка */
.p1 {
  grid-column: 1;
  grid-row: 1;
  padding: 24px;
}
.p2 {
  grid-column: 2;
  grid-row: 1;
  padding: 24px;
}

.p3 {
  grid-column: 3;
  grid-row: 1 / 3; /* ключевая магия */
}

.p4 {
  grid-column: 1;
  grid-row: 2;
  padding: 24px;
}
.p5 {
  grid-column: 2;
  grid-row: 2;
  padding: 24px;
}

.p3 {
  display: flex;
  flex-direction: column;
}

/* Текст уходит вверх */
.p3-content {
  flex-grow: 1;
  padding: 24px;
  color: #504d42;
}

/* Картинка жёстко прижата к низу */
.p3-image {
  width: 100%;
  height: auto;
  margin-top: auto;
  object-fit: cover;
  border-radius: 50px;
  padding: 0px;
}

.principle-card-title {
  color: #504d42;
  font-weight: 400;
  font-size: 20px;
}

.principle-card-descr {
  font-size: 18px;
  color: #504d42;
}

.reputation-section {
  margin: 0 auto;
}

.reputation-header {
  max-width: 80%;
  margin-bottom: 40px;
}

.reputation-header p {
  font-size: 18px;
  line-height: 1.6;
  color: #555;
}

/* Сетка плиток */
.reputation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Карточка теперь flex: изображение + рейтинг */
.reputation-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  padding: 16px;
  justify-content: space-evenly;
}

/* Логотип — 70% */
.rep-logo {
  flex: 0 0 70%;
  max-width: 40%;
  object-fit: contain;
}

/* Рейтинг — 30% */
.rep-rating {
  flex: 0 0 30%;
  background: #f4f6f8;
  border-radius: 50px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

/* Звезда */
.rep-star {
  font-size: 20px;
  color: #f5b301;
}

/* Цифра рейтинга */
.rep-value {
  font-size: 22px;
  font-weight: 600;
  color: #1f1f1f;
}

.reputation-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

/* Карточка */
.extra-card {
  background: #fff;
  border-radius: 70px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  justify-content: space-between;
}

/* Первая строка — номер и заголовок */
.extra-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.extra-number {
  font-size: 24px;
  font-weight: 400;
  color: rgb(80 77 66 / 45%);
}

.extra-title {
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  color: #504d42;
}

.extra-text {
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 16px;
}

.extra-image {
  width: 100%;
  border-radius: 45px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.clinic-photos-section {
  position: relative;
  padding: 80px 0px;
  margin: 0 auto;
}

.clinic-photos-header {
  max-width: 80%;
  margin-bottom: 40px;
}

.clinic-photos-header p {
  font-size: 18px;
  color: #555;
  margin-bottom: 40px;
}

.clinic-photos-arrows {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  gap: 10px;
}

.clinic-arrow {
  width: 44px;
  height: 44px;
  border-radius: 20px;
  border: none;
  background: #f2f2f2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #504d42;
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.3s;
}

.clinic-arrow.active {
  opacity: 1;
  pointer-events: auto;
}

/* Сетка фотографий */
.clinic-photos-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 40px;
}

.clinic-photos-grid::-webkit-scrollbar {
  display: none;
}

.clinic-photo-card {
  flex: 0 0 390px;
  border-radius: 16px;
  overflow: hidden;
}

.clinic-photo-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 50px;
}

/* Адаптив */
@media (max-width: 1024px) {
  .clinic-photo-card {
    flex: 0 0 260px;
  }
}

@media (max-width: 600px) {
  .clinic-photo-card {
    flex: 0 0 80%;
  }
}

.price-list-category,
.price-list-diagnostics {
  margin-bottom: 40px;
}

.price-list-header-text {
  font-size: 24px;
  font-weight: 400;
  color: #504d42;
  line-height: 1.3em;
  margin: 60px 0px 30px 0px;
}

.background-wrapper p {
  color: #504d42;
}

.price-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.price-list-items li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  gap: 20px;
}

.type-diagnostic-price {
  font-weight: 400;
  color: #504d42;
  font-size: 20px;
}

/* Большие экраны */
@media (max-width: 1500px) {
  .header-wrapper {
    justify-content: center;
  }

  .menu-list > li > a {
    font-size: 14px;
  }

  .btn-round {
    width: 40px;
    height: 40px;
  }

  .buttons-block a {
    font-size: 14px !important;
  }
}

/* ≥1400px — большие экраны (десктопы, мониторы) */
@media (max-width: 1399.98px) {
  .request-block {
    max-width: 70%;
  }

  .kk-block {
    max-width: 75%;
  }

  .kk-block {
    flex-direction: row;
  }
}

/* ≤1199.98px — планшеты и ноутбуки */
@media (max-width: 1199.98px) {
  .section-header {
    flex-direction: column;
  }

  .tile {
    width: 40%;
  }

  /* ───── СКРЫВАЕМ ДЕСКТОП ───── */
  .desktop-menu-buttons nav,
  .buttons-block {
    display: none;
  }

  /* ───── HEADER ───── */
  .site-header {
    /*position: relative;*/
    z-index: 1100;
  }

  .header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: transparent;
    position: relative;
    z-index: 1101;
  }

  .brand-wrap {
    z-index: 1101;
  }

  /* ───── BURGER BUTTON ───── */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 1101;
  }

  .burger-line {
    width: 18px;
    height: 2px;
    background: #504d42;
    transition:
      transform 0.3s ease,
      opacity 0.2s ease;
  }

  /* ───── BURGER → CROSS ───── */
  .mobile-menu-toggle.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 3px);
  }

  .mobile-menu-toggle.active .burger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -4px);
  }

  /* ───── MOBILE MENU ───── */
  .mobile-menu-panel {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 1000;

    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);

    padding-top: 96px; /* отступ под шапку */
  }

  .mobile-menu-panel.active {
    transform: translateY(0);
  }

  /* ───── BUTTONS IN MENU ───── */

  .tiles-container {
    flex-wrap: wrap;
  }

  .mobile-buttons-block {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .btn-oval {
    padding: 10px 20px;
  }

  .request-block {
    max-width: 90%;
  }

  .diagnostics-card {
    flex: 0 0 calc(35% - 15px);
  }

  .kk-block {
    align-items: flex-start;
    max-width: 60%;
    height: 650px;
  }

  .kk-block__reviews-img {
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .kk-image img {
    height: 340px;
  }

  .middle-line {
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
  }

  .tab-item {
    flex-direction: column;
  }
}

/* ≥992px — планшеты (landscape) */
@media (max-width: 991.98px) {
  .request-block {
    height: 640px;
    max-width: 90%;
    align-content: flex-end;
    flex-direction: column;
    justify-content: space-between;
  }

  .diagnostics-card {
    flex: 0 0 calc(50% - 15px);
  }

  .kk-block {
    align-items: flex-start;
    max-width: 70%;
    height: 600px;
  }

  .card-loyality img {
    bottom: -70px;
    right: 135px;
    height: 380px;
  }

  .contacts-bottom-index {
    align-content: flex-start;
    padding: 40px;
    align-items: center;
    justify-content: center;
  }

  .desktop-menu-buttons {
    width: 100%;
  }

  .appointment-block {
    flex-direction: column;
  }

  .appointment-right {
    flex-direction: row;
  }
}

/* ≥768px — планшеты (portrait) */
@media (max-width: 767.98px) {
  .specialist-name {
    width: 100%;
  }

  .about-layout {
    grid-template-columns: 100%;
  }

  .principles-grid {
    display: flex; /* меняем на flex */
    flex-direction: column; /* колонка */
    gap: 16px; /* промежуток между карточками */
    margin-top: 32px;
    width: 100%; /* растягиваем контейнер */
  }

  .principles-grid > * {
    width: 100%; /* карточка на всю ширину */
    max-width: 100%; /* на всякий случай */
  }

  .reputation-grid {
    display: flex;
    flex-direction: column;
  }

  .buttons-block {
    display: none;
  }

  .tile {
    width: 40%;

    flex-direction: column;
  }

  .request-block {
    max-width: 80%;
    height: 790px;
  }

  .message-form .form-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .request-image img {
    height: 360px;
  }

  .diagnostics-card {
    flex: 0 0 calc(50% - 15px);
  }

  .kk-block {
    flex-direction: column;
  }

  .kk-block {
    max-width: 80%;
    height: 800px;
  }

  .card-loyality img {
    bottom: -5px;
    height: 39%;
    right: 5px;
  }

  .contacts-container {
    flex-direction: column;
  }

  .contacts-left {
    min-width: 300px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    margin: 0px 0px 40px 0px;
  }

  .contacts-right iframe {
    height: 400px;
  }

  .contacts-bottom-index {
    display: flex;
    flex-wrap: wrap;
    align-content: stretch;
    padding: 40px;
    justify-content: center;
  }
  .desktop-menu-buttons {
    width: 100%;
  }

  h1 {
    font-size: 32px;
  }

  .review-form-wrapper {
    width: 90%;
  }
}

/* ≥576px — телефоны */
@media (max-width: 575.98px) {
  h1 {
    font-size: 30px;
  }

  .request-image img {
    height: 30%;
  }

  .diagnostics-card {
    flex: 0 0 calc(100% - 15px);
  }

  .section-header {
    flex-direction: column;
  }

  .card-loyality img {
    bottom: -8%;
    height: 30%;
    right: 0%;
  }

  h2,
  h2 a {
    font-size: 28px;
  }

  .kk-image img {
    height: 30%;
  }

  .requisites-block {
    flex-direction: column;
  }

  .request-block {
    max-width: 90%;
    height: 810px;
  }

  .desktop-menu-buttons {
    width: 100%;
  }

  .custom-block {
    flex-direction: column;
  }

  .message-bubble__block {
    margin: 0px 0px 0px 0px;
  }

  .specialist-top {
    flex-wrap: wrap;
    justify-content: center;
  }

  .about__title {
    font-size: 28px;
    margin: 25px 0px 0px 0px;
  }
}

.template-background-page-404 {
  background-color: #fff;
  border-radius: 130px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px 0px 20px;
  align-items: flex-end;
}

.background-wrapper-page-404 {
  max-width: 1400px;
  width: 100%;
}

.page-404-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: 100%;
}

.page-404-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.page-404-image {
  display: flex;
  justify-content: flex-end;
}

.page-404-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

.page-404-buttons {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.btn-primary {
  background: #000;
  color: #fff;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
}

.btn-secondary {
  border: 1px solid #000;
  color: #000;
  padding: 14px 28px;
  border-radius: 6px;
}

/* Адаптив */
@media (max-width: 992px) {
  .page-404-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .page-404-image {
    justify-content: center;
  }
  .page-404-image img {
    width: 100%;
    max-height: 300px;
  }
}

/* BANNER COOKIES*/
/* --- Блокировка сайта до согласия --- */
body.blocked {
  overflow: hidden;
  /* блокируем скролл */
}

/* Затемнение сайта */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  display: block;
}

/* Баннер поверх overlay */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  padding: 16px;
  z-index: 10003;
  /* выше overlay и кнопки */
  display: block;
  pointer-events: auto;
  transform: translateZ(0);
  /* отдельный stacking context */
  width: 40%;
}

@media (max-width: 480px) {
  #cookie-banner {
    width: 80%;
  }
}

#cookie-banner h4 {
  margin: 0 0 8px;
  color: #504d42;
  font-weight: 400;
}

.cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #504d42;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: 0.2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s;
  border-radius: 50%;
}

.default {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: 0.2s;
  border-radius: 24px;
}

.default:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background: #57ad59;
}

input:checked + .default {
  background: #4caf506b;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:checked + .default:before {
  transform: translateX(20px);
}

.btns {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btns button {
  border: none;
}

/* Кнопка "Настройки cookies" */
#cookie-settings-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #57ad59;
  border: none;
  cursor: pointer;
  z-index: 10001;
  display: none;
  color: #fff;
  font-size: 16px;
}

footer button {
  font-weight: 300;
}

.cookie-banner-descr {
  margin: 0px 0px 20px 0px;
  color: #504d42;
  line-height: 1.5em;
}

.cookie-banner-descr a,
.cookie-row a {
  color: #57ad59;
}

@media (max-width: 991.98px) {
  #cookie-banner {
    width: 80%;
  }
}

@media (max-width: 480px) {
  #cookie-banner {
    width: 90%;
  }
}

.table-container {
  width: 100%;
  margin: 20px 0;
  color: #504d42;
}

.responsive-table {
  width: 100%;
  border-collapse: collapse;
  color: #504d42;
}

.responsive-table th,
.responsive-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.responsive-table th {
  background-color: rgba(80, 77, 66, 0.05);
  font-weight: 400;
}

/* Настройки для мобильных устройств */
@media screen and (max-width: 768px) {
  .responsive-table thead {
    display: none; /* Скрываем шапку */
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 20px;
    border: 2px solid #eee;
    border-radius: 5px;
  }

  .responsive-table td {
    display: block;
    text-align: right;
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 40%; /* Место для заголовка слева */
  }

  /* Добавляем название поля перед данными */
  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 35%;
    text-align: left;
    font-weight: bold;
  }

  /* Определение делаем на всю ширину для удобства чтения */
  .responsive-table td[data-label="Определение"] {
    text-align: left;
    padding-left: 10px;
    padding-top: 35px;
  }

  .responsive-table td[data-label="Определение"]::before {
    top: 10px;
    width: 100%;
  }
}
