* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Отключаем контекстное меню и функции браузера для изображений */
img {
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Оптимизация для анимаций */
.hero__image,
.benefit,
.hero__button,
.header__logo-image,
.hero__title,
.hero__text {
  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: #050f1f;
}

/* Мобильный фон */
@media (max-width: 768px) {
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/bg_mobile.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
  }
}

/* Canvas фон */
#gridCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Скрываем canvas на мобилке */
@media (max-width: 768px) {
  #gridCanvas {
    display: none;
  }
}

/* Центрующая обёртка */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- ШАПКА ---------- */

.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-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-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);
  display: flex;
  align-items: center;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 60px;
  padding-right: 30%;
  width: 100%;
}

.hero__content {
  flex: 1 1 100%;
  max-width: 100%;
  position: relative;
  z-index: 10;
}

.hero__image-wrapper {
  flex: 1 1 40%;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  position: fixed;
  right: 0%;
  top: 0;
  height: 100vh;
  width: 70%;
}

/* Текст */

.hero__title {
  font-size: 48px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: left;
  max-width: 700px;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3),
               0 0 20px rgba(136, 37, 37, 0.4);
  position: relative;
  z-index: 10;
}

.hero__text {
  font-size: 18px;
  line-height: 1.6;
  max-width: 100%;
  margin-bottom: 32px;
  text-align: left;
  text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3),
               0 0 15px rgba(136, 37, 37, 0.3);
  position: relative;
  z-index: 10;
}

/* Бенефиты */

.hero__benefits {
  display: flex;
  justify-content: flex-start;
  gap: 40px;
  margin-top: 40px;
  position: relative;
  z-index: 10;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.benefit__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.benefit__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 10;
}

.benefit__text {
  position: relative;
  z-index: 10;
}

/* Рейтинг */

.rating-badges {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
}

.rating-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.rating-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  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;
}

/* Кнопка */

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(6, 194, 204, 0.6), 0 0 0 0 rgba(6, 194, 204, 0.7);
  }
  50% {
    box-shadow: 0 4px 25px rgba(6, 194, 204, 0.8), 0 0 0 8px rgba(6, 194, 204, 0);
  }
}

@keyframes buttonShine {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.hero__button {
  padding: 16px 40px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #06C2CC 0%, #05aab3 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(6, 194, 204, 0.6), 0 0 0 0 rgba(6, 194, 204, 0);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: inline-block;
  z-index: 10;
  animation: buttonPulse 2.5s ease-in-out infinite;
}

/* Эффект блеска */
.hero__button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: none;
  animation: buttonShine 3s ease-in-out infinite;
}

.hero__button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(6, 194, 204, 0.8), 0 0 0 0 rgba(6, 194, 204, 0);
  background: linear-gradient(135deg, #07d4df 0%, #06c2cc 100%);
  animation: none; /* Останавливаем пульсацию при наведении */
}

.hero__button:hover::before {
  animation: buttonShine 1.5s ease-in-out infinite; /* Ускоряем блеск при наведении */
}

.hero__button:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 15px rgba(6, 194, 204, 0.7);
}

/* Правая картинка */

.hero__image {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: center;
}

/* ---------- АДАПТИВНАЯ ВЕРСТКА ---------- */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
  .container {
    margin: 0 40px;
    padding: 0 0 0 20px;
  }

  .header__logo-image {
    height: 90px;
  }

  .header__logo-title {
    font-size: 32px;
  }

  .header__logo-subtitle {
    font-size: 18px;
  }

  .hero__inner {
    padding-right: 50%;
  }

  .hero__image-wrapper {
    width: 50%;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__text {
    font-size: 15px;
  }

  .benefit {
    font-size: 14px;
  }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
  body {
    background: linear-gradient(
      to right,
      #4A84BB 0%,
      #D4FEFF 80%,
      #4A86BB 100%
    );
  }

  .container {
    margin: 0;
    padding: 0 20px;
  }

  .header {
    padding: 16px 0 20px;
    position: relative;
    z-index: 100;
    background: linear-gradient(
      to right,
      rgba(6, 194, 204, 0.2) 0%,
      rgba(6, 194, 204, 0.25) 50%,
      rgba(6, 194, 204, 0.2) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(6, 194, 204, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  .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: 100vh;
  }

  .hero__inner {
    flex-direction: column;
    padding: 0 20px;
    gap: 0;
    position: relative;
    z-index: 10;
  }

  .hero__image-wrapper {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    order: -1;
    z-index: 0;
  }

  .hero__image {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    opacity: 1;
  }

  .hero__content {
    background: rgba(13, 40, 71, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 28px 24px;
    border-radius: 20px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(6, 194, 204, 0.4);
    position: relative;
    z-index: 10;
  }

  .rating-badges {
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .rating-badge {
    gap: 6px;
    padding: 8px 12px;
  }

  .rating-badge__icon {
    width: 22px;
    height: 22px;
  }

  .rating-badge__score {
    font-size: 15px;
  }

  .rating-badge__stars .star {
    font-size: 12px;
  }

  .hero__title {
    font-size: 26px;
    margin-bottom: 16px;
    color: #fff;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  }

  .hero__text {
    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__benefits {
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    margin-top: 24px;
  }

  .benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 10px;
    color: #fff;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
    gap: 6px;
    flex: 1;
  }

  .benefit__icon {
    width: 32px;
    height: 32px;
  }

  .benefit__icon img {
    filter: none;
  }

  .benefit__text {
    line-height: 1.3;
  }

  .hero__button {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
  }
}

/* Маленькие мобильные устройства (до 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: 22px;
  }

  .hero__text {
    font-size: 14px;
  }

  .benefit {
    font-size: 10px;
  }

  .benefit__icon {
    width: 28px;
    height: 28px;
  }

  .hero__button {
    padding: 14px 20px;
    font-size: 14px;
  }
}

/* ---------- ИНФОРМАЦИЯ ДЛЯ ПАЦИЕНТОВ ---------- */

/* Кнопка внизу справа */
.info-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(13, 40, 71, 0.6);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  font-family: 'Montserrat', sans-serif;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.info-button:hover {
  transform: translateY(-2px);
  background: rgba(13, 40, 71, 0.8);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.info-button:active {
  transform: translateY(-1px);
}

.info-button__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.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: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  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.3),
              0 0 40px rgba(74, 132, 187, 0.2);
  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(74, 132, 187, 0.1);
  color: #4A84BB;
  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(74, 132, 187, 0.2);
  transform: rotate(90deg);
}

.modal__title {
  font-size: 28px;
  font-weight: 700;
  color: #4A84BB;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(74, 132, 187, 0.1);
}

/* Список документов */
.documents-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border: 2px solid rgba(74, 132, 187, 0.1);
  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(74, 132, 187, 0.3);
  box-shadow: 0 8px 20px rgba(74, 132, 187, 0.15);
  background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
}

.document-item__icon {
  width: 40px;
  height: 40px;
  color: #4A84BB;
  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: #4A84BB;
  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 {
    bottom: 120px;
    right: 20px;
    padding: 12px 18px;
    font-size: 14px;
    gap: 8px;
  }

  .info-button__icon {
    width: 18px;
    height: 18px;
  }

  .info-button__text {
    display: none;
  }

  .info-button {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .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) {
  .info-button {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }

  .info-button__icon {
    width: 20px;
    height: 20px;
  }

  .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;
}

/* SEO Content Section - скрыта для пользователей, видима для поисковиков */
.content-section {
  display: none;
  visibility: hidden;
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
