/* ==========================================================================
   Секция: Доверие (.trust) — приведена к стилю кейсов и процесса
   ========================================================================== */

.trust {
  background-color: #f8fafc;
  padding: 100px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trust__container {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Заголовок секции --- */
.trust__header-wrapper {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.trust__badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: #249AF3;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trust__title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: #0f172a;
  margin: 0;
}

/* --- Заголовки подсекций (отзывы, сертификаты, партнёры) --- */
.trust__section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 60px;
  margin-bottom: 24px;
}

.trust__subtitle {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.trust__subtext {
  font-size: 16px;
  font-weight: 400;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* --- Бегущие строки (общий контейнер) --- */
.trust__marquee {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-sizing: border-box;
}

.trust__marquee--reviews {
  padding: 24px 20px;
}

.trust__marquee--partners {
  padding: 20px 20px;
  margin-top: 0;
}

.trust__track {
  display: flex;
  gap: 40px;
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Карточка отзыва */
.review-card {
  width: 340px;
  min-height: 340px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.review-card__name {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  width: 100%;
  margin-bottom: 8px;
}

.review-card__text {
  font-size: 15px;
  font-weight: 400;
  color: #475569;
  line-height: 1.5;
  margin-top: 8px;
  flex: 1;
  text-align: center;
  width: 100%;
}

.review-card__source {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  transition: all 0.2s ease;
}

.review-card__source img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.review-card__source:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Сертификаты */
.trust__marquee--certificates {
  background: transparent;
  backdrop-filter: none;
  border: none;
  padding: 0;
  margin-top: 0;
  overflow: visible;
}

.trust__track--certificates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  animation: none;
}

.certificate {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  box-sizing: border-box;
}

.certificate:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.certificate__img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: rgba(248, 250, 252, 0.6);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.certificate__label {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  margin-bottom: 12px;
}

.certificate__btn {
  width: 100%;
}

/* Партнёры */
.partner {
  width: 160px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.partner__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.partner:hover .partner__img {
  opacity: 1;
}

/* Блок «О нас» */
.about {
  width: 100%;
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about__glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 40px 50px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.about__glass:hover {
  transform: translateY(-5px);
  border-color: #bfdbfe;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.about__badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: #249AF3;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.about__title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin: 0 0 20px 0;
}

.about__text {
  font-size: 18px;
  font-weight: 400;
  color: #1e293b;
  line-height: 1.7;
  margin: 0 0 30px 0;
}

.about__glass .btn {
  display: inline-flex;
}

/* ==========================================================================
   Модальное окно сертификатов (без изменений)
   ========================================================================== */

#certificateModal.comm-overlay {
    align-items: center;
    overflow: hidden;
}

#certificateModal .comm-modal {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

#certificateModal .comm-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 24px;
    overflow: hidden;
}

.certificate-download-wrapper {
    flex-shrink: 0;
    text-align: center;
}

#certificateCloseTop {
    margin-left: auto;
}

.certificate-img-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
}

.modal__img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
    transform-origin: center center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.zoom-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 1;
    transform: translateX(-50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.certificate-img-container:hover .zoom-hint {
    opacity: 0;
    transform: translate(-50%, -10px);
}

html.no-scroll,
body.no-scroll {
    overflow: hidden;
}

@media (max-width: 768px) {
  .trust {
    padding: 60px 0 50px;
  }

  .trust__title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .trust__section-header {
    margin-top: 40px;
    margin-bottom: 16px;
  }

  .trust__subtitle {
    font-size: 22px;
  }

  .trust__subtext {
    font-size: 14px;
  }

  /* Отзывы – карточки на всю ширину, бегущая строка отключена */
  .trust__marquee--reviews {
    padding: 16px 12px;
  }

  .trust__track {
    animation: none !important;
    flex-direction: column;
    gap: 16px;
  }

  .review-card {
    width: 100%;
    min-height: auto;
    padding: 20px 16px;
  }

  .review-card__name {
    font-size: 18px;
  }

  .review-card__text {
    font-size: 14px;
  }

  /* Сертификаты – сетка в 1 колонку */
  .trust__track--certificates {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .certificate {
    padding: 20px 16px;
  }

  .certificate__img {
    height: 200px;
  }

  /* Партнёры – уменьшаем карточки, отключаем анимацию */
  .trust__marquee--partners {
    padding: 12px 8px;
  }

  .partner {
    width: 120px;
    height: 70px;
    padding: 8px;
  }

  /* Блок «О нас» */
  .about {
    margin-top: 50px;
  }

  .about__glass {
    padding: 24px 16px;
  }

  .about__title {
    font-size: 24px;
  }

  .about__text {
    font-size: 16px;
  }

  /* Модальное окно сертификатов */
  #certificateModal .comm-modal {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 16px;
  }

  #certificateModal .comm-content {
    padding: 12px 16px;
  }

  .zoom-hint {
    display: none;
  }

  .certificate-download-wrapper .btn {
    width: 100%;
    justify-content: center;
  }
}

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

  .trust__badge {
    font-size: 12px;
    padding: 4px 12px;
  }

  .review-card {
    padding: 16px 12px;
  }

  .certificate__label {
    font-size: 15px;
  }

  .certificate__img {
    height: 160px;
  }

  .partner {
    width: 100px;
    height: 60px;
  }
}