﻿*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
    background: #ffffff;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 16px;
    margin: 0 auto;
}

/* HEADER */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 20px;
}

.logo__mark {
    background: #64a5fa;
    /* FB BLUE */
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
}

.logo__text {
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.nav a {
    padding: 6px 8px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.nav a:hover {
    background: #e7f0fe;
    /* FB light blue */
}

.header__contacts {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    
}

.header__phone {
    font-weight: 600;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #1877F2;
    /* FB BLUE */
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.btn:hover {
    background: #0f5dc9;
    /* FB DARKER */
    box-shadow: 0 10px 25px rgba(24, 119, 242, 0.3);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    border: 1px solid #1877F2;
    color: #1877F2;
}

.btn--outline:hover {
    background: #e7f0fe;
}

.btn--ghost {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #111827;
}

.btn--ghost:hover {
    background: #f0f5ff;
}

/* BURGER */

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 20px;
    height: 2px;
    background: #111827;
}

/* HERO */

.hero {
    padding: 48px 0 32px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero__tag {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: #1877F2;
    /* FB BLUE */
    font-weight: 600;
    margin-bottom: 10px;
}

.hero__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero__subtitle {
    color: #4b5563;
    margin-bottom: 20px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.hero__list {
    list-style: none;
    color: #4b5563;
    font-size: 14px;
}

.hero__list li::before {
    content: "\2022";
    color: #1877F2;
    /* FB BLUE */
    margin-right: 2px;
}

.hero__image {
    display: flex;
    justify-content: center;
}

.hero__photo-placeholder {
    width: 100%;
    max-width: 360px;
    height: 260px;
    border-radius: 24px;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

/* SECTIONS */

.section {
    padding: 40px 0;
}

.section--gray {
    background: #f9fafb;
}

.section__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section__subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
}

/* CARDS (SERVICES) */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.card {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card__title {
    font-size: 16px;
    font-weight: 600;
}

.card__list {
    list-style: none;
    font-size: 14px;
    color: #4b5563;
}

.card__list li+li {
    margin-top: 4px;
}

.card__btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #1877F2;
    background: #e7f0fe;
    color: #0f5dc9;
    cursor: pointer;
    font-size: 13px;
}

/* DOCTORS */

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.doctor-card {
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.doctor-card__photo {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    /* background: #e5e7eb; */
    display: flex;
    align-items: center;
    justify-content: center;
    /* color: #6b7280; */
    margin-bottom: 10px;
}

.doctor-card__name {
    font-weight: 600;
    margin-bottom: 4px;
}

.doctor-card__role {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
}

.doctor-card__exp {
    font-size: 13px;
    color: #6b7280;
}

/* ADVANTAGES */

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.advantage {
    background: #e7f0fe;
    /* FB light blue */
    border-radius: 18px;
    padding: 16px;
}

.advantage__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.advantage__text {
    font-size: 14px;
    color: #4b5563;
}

/* CASES */

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.case-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    background: #ffffff;
}

.case-card__label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
}

.case-card__photo {
    height: 220px;
    border-radius: 14px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

/* CONTACTS */

.contacts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: flex-start;
}

.contacts__item {
    font-size: 14px;
    margin-bottom: 6px;
}

.contacts__form {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    background: #ffffff;
}

.contacts__form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.field input,
.field textarea {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font: inherit;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid #1877F2;
    outline-offset: 1px;
}

.modal-question-field {
    display: none;
}

.modal--question .modal-question-field {
    display: flex;
}

.contacts__note {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.map-section {
    padding: 56px 0;
}

.map-section__title {
    margin: 0 0 8px;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.15;
}

.map-section__address {
    margin: 0 0 16px;
    color: #6b7280;
}

.map-section__frame {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.map-section__frame iframe {
    display: block;
}

/* FOOTER */

.footer {
    border-top: 1px solid #e5e7eb;
    padding: 16px 0;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal--open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
}

.modal__content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none !important;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

/* RESPONSIVE */

@media (max-width: 960px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doctors-grid,
    .advantages-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contacts {
        grid-template-columns: 1fr;
    }

    .header__contacts {
        display: none;
    }

    .nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        display: none;
    }

    .nav.nav--open {
        display: flex;
    }

    .burger {
        display: flex;
    }
}

@media (max-width: 640px) {

    .cards-grid,
    .doctors-grid,
    .advantages-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 32px;
    }

    .hero__title {
        font-size: 24px;
    }
}

/* Контейнер hero-карусели */
.hero__image {
    width: 100%;
    max-width: 460px;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    background: #fafafa;
    border: 2px dashed #dcdcdc;
    padding: 0;
    position: relative;
}

/* Картинки внутри */
.hero-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Точки пагинации */
.swiper-pagination-bullet {
    background: #b3b3b3;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #0a66ff;
}

/* Стрелки */
.swiper-button-prev,
.swiper-button-next {
    color: #0a66ff;
    width: 32px;
    height: 32px;
}

/* Чтобы стрелки не вылезали за рамку */
.hero__image .swiper-button-prev,
.hero__image .swiper-button-next {
    top: 50%;
    transform: translateY(-50%);
}

/* Убираем серый фон под стрелками Swiper (по умолчанию бывает) */
.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 24px;
}

.doctor-card__photo_url {
    background-position: center;
    background-size: contain;
    width: 100%;
    height: 180px;
    background-repeat: no-repeat;
}

/* ===== Прайс-страница ===== */

/* активный пункт меню "Цены" */
.nav__link--active {
  font-weight: 600;
  color: #0a66ff;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* шапка блока прайса */
.section--price-hero {
  padding-top: 120px;
  padding-bottom: 40px;
}

.price-hero__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
}

.price-hero__note {
    text-align: center;
  max-width: 360px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #f3f7ff;
  border: 1px solid #d7e2ff;
  font-size: 14px;
  line-height: 1.5;
}

.price-hero__note p {
  margin-bottom: 12px;
}

/* Общий контейнер прайса */
.price-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

/* Группа услуг (категория) */
.price-group {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e3e6ee;
  padding: 12px 20px 10px;
  box-shadow: 0 4px 12px rgba(15, 35, 52, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.price-group[open] {
  box-shadow: 0 8px 24px rgba(15, 35, 52, 0.10);
  border-color: #c0d3ff;
  transform: translateY(-1px);
}

.price-group summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #1b2430;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-group summary::-webkit-details-marker {
  display: none;
}

/* стрелочка справа */
.price-group summary::after {
  content: "▼";
  font-size: 12px;
  margin-left: 8px;
  transition: transform 0.2s ease;
  color: #7a8699;
}

.price-group[open] summary::after {
  transform: rotate(180deg);
}

.price-items {
  margin-top: 10px;
}

/* Строка услуги */
.price-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f7;
  font-size: 14px;
}

.price-item:last-child {
  border-bottom: none;
}

.price-item__name {
  flex: 1 1 auto;
  color: #3a4350;
}

.price-item__price {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
  color: #0a66ff;
}

/* Адаптив */
@media (max-width: 900px) {
  .price-hero__inner {
    flex-direction: column;
  }

  .price-hero__note {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .section--price-hero {
    padding-top: 96px;
  }

  .price-group {
    padding: 10px 14px 8px;
  }

  .price-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-item__price {
    margin-top: 2px;
  }
}

/* ===== Улучшенный MOBILE адаптив ===== */

@media (max-width: 480px) {

  /* Контейнеры */
  .container {
    padding: 0 12px;
  }

  /* HERO */
  .hero {
    padding: 24px 0;
  }

  .hero__title {
    font-size: 22px;
    line-height: 1.25;
  }

  .hero__subtitle {
    font-size: 14px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__image {
    width: 100%;
    max-width: 100%;
    height: 260px;
    border-radius: 16px;
  }

  .hero-swiper img {
    object-fit: cover;
  }

  /* HEADER */
  .logo {
    font-size: 18px;
  }

  .burger span {
    width: 22px;
  }

  /* CARD GRID */
  .cards-grid,
  .advantages-grid,
  .doctors-grid,
  .cases-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .card {
    padding: 14px;
  }

  .doctor-card {
    padding: 14px;
  }

  /* CONTACT FORM */
  .contacts {
    grid-template-columns: 1fr !important;
  }

  .contacts__form {
    padding: 14px;
    border-radius: 14px;
  }

  .map-section__frame iframe {
    height: 360px;
  }

  /* FOOTER */
  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  /* PRICE PAGE */
  .price-hero__inner {
    gap: 20px;
  }

  .price-hero__note {
    padding: 16px;
    border-radius: 16px;
  }

  .price-group {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .price-item {
    padding: 8px 0;
  }

  .price-item__name {
    font-size: 14px;
  }

  .price-item__price {
    font-size: 15px;
    font-weight: 700;
  }

  /* Отступы между секциями */
  .section {
    padding: 28px 0;
  }

}

/* POPUP NOTIFICATIONS */
.site-popup {
    position: fixed;
    right: 16px;
    top: 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    z-index: 220;
    max-width: min(92vw, 520px);
    width: max-content;
    padding: 12px 16px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    transition: opacity .2s ease, transform .2s ease;
    text-align: center;
}

.site-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-popup--success {
    background: #15803d;
}

.site-popup--error {
    background: #b91c1c;
}
