* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Оптимизация для анимаций */
.hero__image,
.benefit,
.hero__button,
.header__logo-image,
.hero__title,
.hero__subtitle {
  will-change: transform, opacity;
}

/* Отключаем анимации если пользователь выбрал reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  position: relative;
  overflow-x: hidden;

  background-color: #4A84BB;
  background-image: url("image/bg1 1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1,
h2,
h3 {
  font-family: 'Cormorant', serif;
}

/* Летающие частицы */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particles::before,
.particles::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: float 20s infinite;
}

.particles::before {
  background: rgba(136, 37, 37, 0.3);
  top: 10%;
  left: 20%;
  animation-delay: 0s;
  box-shadow:
    100px 200px 0 rgba(136, 37, 37, 0.2),
    200px 100px 0 rgba(255, 255, 255, 0.4),
    300px 300px 0 rgba(136, 37, 37, 0.15),
    400px 150px 0 rgba(255, 255, 255, 0.3),
    500px 250px 0 rgba(136, 37, 37, 0.25),
    600px 50px 0 rgba(255, 255, 255, 0.35),
    700px 200px 0 rgba(136, 37, 37, 0.2),
    800px 300px 0 rgba(255, 255, 255, 0.3),
    900px 100px 0 rgba(136, 37, 37, 0.15),
    1000px 250px 0 rgba(255, 255, 255, 0.25),
    150px 400px 0 rgba(136, 37, 37, 0.2),
    250px 500px 0 rgba(255, 255, 255, 0.3),
    350px 450px 0 rgba(136, 37, 37, 0.25),
    450px 550px 0 rgba(255, 255, 255, 0.2),
    550px 350px 0 rgba(136, 37, 37, 0.15);
}

.particles::after {
  background: rgba(255, 255, 255, 0.4);
  top: 20%;
  left: 40%;
  animation-delay: -10s;
  box-shadow:
    120px 180px 0 rgba(255, 255, 255, 0.35),
    220px 120px 0 rgba(136, 37, 37, 0.2),
    320px 280px 0 rgba(255, 255, 255, 0.3),
    420px 180px 0 rgba(136, 37, 37, 0.15),
    520px 220px 0 rgba(255, 255, 255, 0.25),
    620px 80px 0 rgba(136, 37, 37, 0.2),
    720px 220px 0 rgba(255, 255, 255, 0.3),
    820px 320px 0 rgba(136, 37, 37, 0.15),
    920px 120px 0 rgba(255, 255, 255, 0.25),
    1020px 280px 0 rgba(136, 37, 37, 0.2),
    180px 420px 0 rgba(255, 255, 255, 0.3),
    280px 520px 0 rgba(136, 37, 37, 0.15),
    380px 480px 0 rgba(255, 255, 255, 0.25),
    480px 580px 0 rgba(136, 37, 37, 0.2),
    580px 380px 0 rgba(255, 255, 255, 0.3);
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  25% {
    transform: translate(100px, -100px) rotate(90deg);
  }
  50% {
    transform: translate(50px, -200px) rotate(180deg);
  }
  75% {
    transform: translate(-50px, -300px) rotate(270deg);
  }
}

/* Центрующая обёртка */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ШАПКА ---------- */

.header {
  padding: 24px 0 40px;
  background: transparent;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__logo-image {
  height: 90px;
  width: auto;
  object-fit: contain;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header__logo-title {
  font-family: 'Cormorant', serif;
  font-weight: 700;
  font-size: 42px;
  color: #fff;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.header__logo-subtitle {
  font-family: 'Cormorant', serif;
  font-weight: 400;
  font-size: 22px;
  color: #fff;
  line-height: 1.2;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.header__link {
  font-size: 16px;
  color: #000;
  text-decoration: none;
}

.header__link:hover {
  text-decoration: underline;
}

/* ---------- HERO ---------- */

.hero {
  min-height: calc(100vh - 200px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 0;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero__content {
  flex: 0 1 720px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.hero__image-wrapper {
  display: none;
}

/* Текст */

.hero__title {
  font-family: 'Cormorant', serif;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: left;
  max-width: 720px;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3),
               0 0 20px rgba(136, 37, 37, 0.4);
}

.hero__subtitle {
  font-size: 18px;
  line-height: 1.5;
  max-width: 620px;
  margin-bottom: 18px;
  text-align: left;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3),
               0 0 15px rgba(136, 37, 37, 0.3);
}

/* Бенефиты */

.hero__benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-bottom: 24px;
  margin-top: 22px;
  width: 100%;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3),
               0 0 10px rgba(136, 37, 37, 0.3);
}

.benefit__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(1px 1px 4px rgba(0, 0, 0, 0.4));
}

/* Рейтинг */

.hero__address {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.2px;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
}

.rating-badges {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.rating-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.rating-badge:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.rating-badge__icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.rating-badge__score {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.rating-badge__stars {
  display: flex;
  gap: 1px;
}

.rating-badge__stars .star {
  color: #FFD700;
  font-size: 14px;
}

.rating-badge__stars .star.half {
  background: linear-gradient(90deg, #FFD700 50%, rgba(255, 255, 255, 0.3) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Кнопка */

.hero__button {
  width: fit-content;
  padding: 16px 28px;
  border-radius: 12px;
  border: none;
  background: #FF9264;
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 24px rgba(255, 146, 100, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0;
  align-self: flex-start;
}

.hero__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hero__button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Правая картинка */

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

/* ---------- АДАПТИВНАЯ ВЕРСТКА ---------- */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
  .container {
    margin: 0;
    padding: 0 20px;
  }

  .header__logo-image {
    height: 90px;
  }

  .header__logo-title {
    font-size: 32px;
  }

  .header__logo-subtitle {
    font-size: 18px;
  }

  .hero__inner {
    padding-right: 0;
  }

  .hero__title {
    font-size: 38px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .benefit {
    font-size: 14px;
  }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
  body {
    background-color: #4A84BB;
    background-image: url("image/bg1 1.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  .container {
    margin: 0;
    padding: 0 20px;
  }

  .header {
    padding: 16px 0 20px;
    position: relative;
    z-index: 100;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }

  .header__inner {
    padding: 0;
  }

  .header__logo {
    gap: 12px;
  }

  .header__logo-image {
    height: 80px;
    filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.1));
  }

  .header__logo-title {
    font-size: 22px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  }

  .header__logo-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  }

  .hero {
    padding-bottom: 40px;
    position: relative;
    min-height: auto;
  }

  .hero__inner {
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
    position: relative;
    z-index: 10;
    padding-right: 0;
  }


  .hero__content {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 24px 20px;
    border-radius: 18px;
    margin-top: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 10;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
  }

  .hero__title {
    font-size: 30px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  }

  .hero__subtitle {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 100%;
    color: #fff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
  }

  .hero__address {
    font-size: 13px;
  }

  .hero__benefits {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    margin-bottom: 28px;
  }

  .benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 11px;
    color: #fff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
    gap: 6px;
  }

  .benefit__icon {
    width: 16px;
    height: 16px;
    filter: drop-shadow(1px 1px 4px rgba(0, 0, 0, 0.3));
  }

  .benefit__text {
    line-height: 1.2;
  }

  .hero__button {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
  }
}

/* Маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .header {
    padding: 12px 0 16px;
  }

  .header__logo-image {
    height: 70px;
  }

  .header__logo-title {
    font-size: 20px;
  }

  .header__logo-subtitle {
    font-size: 14px;
  }

  .hero__inner {
    padding: 0 16px;
  }

  .hero__content {
    padding: 24px 20px;
    margin-top: 16px;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero__subtitle {
    font-size: 14px;
  }

  .benefit {
    font-size: 10px;
  }

  .benefit__icon {
    width: 20px;
    height: 20px;
  }

  .hero__button {
    padding: 14px 20px;
    font-size: 14px;
  }
}

/* ---------- ИНФОРМАЦИЯ ДЛЯ ПАЦИЕНТОВ ---------- */

/* Кнопка внизу справа */
.info-button {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  text-underline-offset: 4px;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  font-family: 'Montserrat', sans-serif;
  align-self: flex-start;
  margin-top: 10px;
}

.info-button:hover {
  transform: translateY(-1px);
  opacity: 0.8;
}

.info-button:active {
  transform: translateY(-1px);
}

.info-button__icon {
  display: none;
}

.info-button__text {
  white-space: nowrap;
}

/* Модальные окна */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal__content {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 146, 100, 0.15);
  color: #FF9264;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal__close:hover {
  background: rgba(255, 146, 100, 0.25);
  transform: rotate(90deg);
}

.modal__title {
  font-size: 32px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: none;
  font-family: 'Cormorant', serif;
}

/* Список документов */
.documents-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

.document-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 146, 100, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.document-item__icon {
  width: 40px;
  height: 40px;
  color: #FF9264;
  flex-shrink: 0;
}

.document-item__info {
  flex: 1;
}

.document-item__title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.4;
}

.document-item__meta {
  font-size: 13px;
  color: #777;
}

.document-item__arrow {
  width: 24px;
  height: 24px;
  color: #FF9264;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.document-item:hover .document-item__arrow {
  transform: translateX(4px);
}

/* Модальное окно просмотра PDF */
.modal--pdf .modal__content {
  max-width: 95vw;
  width: 95vw;
  max-height: 95vh;
  height: 95vh;
  padding: 60px 20px 20px 20px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.modal--pdf .modal__close {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.modal--pdf .modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pdf-viewer {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Адаптивная верстка для модальных окон */

@media (max-width: 768px) {
  .info-button {
    font-size: 13px;
    margin-top: 8px;
  }

  .modal__content {
    padding: 30px 20px;
    max-width: 95%;
    width: 95%;
  }

  .modal__title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .modal__close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
  }

  .document-item {
    padding: 16px;
    gap: 12px;
  }

  .document-item__icon {
    width: 32px;
    height: 32px;
  }

  .document-item__title {
    font-size: 14px;
  }

  .document-item__meta {
    font-size: 12px;
  }

  .document-item__arrow {
    width: 20px;
    height: 20px;
  }

  .modal--pdf .modal__content {
    max-width: 100vw;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 50px 10px 10px 10px;
  }
}

@media (max-width: 480px) {
  .modal__content {
    padding: 24px 16px;
  }

  .modal__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .document-item {
    padding: 14px;
    gap: 10px;
  }

  .document-item__title {
    font-size: 13px;
  }
}

/* Блокировка прокрутки при открытом модальном окне */
body.modal-open {
  overflow: hidden;
}
