/* =========================================
   PAGE: BU-CONTAINERS (без глобалки)
   Удалено: body, .container, header, .btn, footer, cookie, mobile menu
   ========================================= */

/* ---------- HERO / MASTHEAD ---------- */

.masthead {
  background: url('/quiz/img/hero-back.png') center center / cover no-repeat;
  border-radius: 0 0 40px 40px;
  color: #fff; /* чтобы текст был белым только в герое, без влияния на весь сайт */
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 0 100px;
}

.hero-text {
  flex: 1 1 55%;
  max-width: 820px;
  min-width: 320px;
}

.hero-text h1 {
  font-family: "DrukTextWideCyr-Medium", sans-serif;
  font-size: 38px;
  line-height: 1.3;
  margin-bottom: 35px;
  font-weight: 800;
}

.hero-text h1 span {
  background: #6a7bff;
  color: #fff;
  padding: 0 8px;
  border-radius: 4px;
}

.hero-list {
  margin: 0 0 30px 0;
  padding: 0;
}

.hero-list li {
  margin-bottom: 12px;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-left: 20px;
}

.hero-list li::before {
  content: "➜";
  position: absolute;
  left: 0;
  color: #6a7bff;
}

.hero-text p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 35px;
}

/* NOTE: .btn НЕ ТРОГАЕМ — берётся из глобальных стилей сайта */
/* .hero-text .btn { margin-top: 20px; } */

.hero-image {
  flex: 0 0 40%;
  min-width: 320px;
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* Адаптив hero */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    padding: 40px 0 120px;
    text-align: left;
    align-items: flex-start;
  }

  .hero-text {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: left;
  }

  .hero-text h1 { font-size: 28px; }
  .hero-text p  { font-size: 16px; }

  .hero-image {
    order: -1;
    width: 100%;
    text-align: center;
  }

  .hero-image img { max-width: 80%; }
}

@media (max-width: 576px) {
  .hero-text h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .hero-list li { font-size: 14px; }
}

/* ---------- VIDEO POPUP ---------- */

.video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 10000;
}

.video-overlay.active {
  opacity: 1;
  visibility: visible;
}

.video-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) scale(.9);
  background: #000;
  border-radius: 12px;
  padding: 10px;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  max-width: 90%;
  width: 800px;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%,-50%) scale(1);
}

.video-player {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.video-close {
  position: absolute;
  top: -35px;
  right: 0;
  font-size: 28px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.video-close:hover { color: #ccc; }

@media (max-width: 768px) {
  .video-modal { width: 95%; }
  .video-close { top: -30px; right: -5px; }
}

/* ---------- USED CONTAINERS GRID ---------- */

.used-containers {
  padding: 80px 0;
  background: #fff;
  color: #000;
}

.used-containers__title {
  font-family: "DrukTextWideCyr-Medium", sans-serif;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 50px;
  color: #000;
}

.used-containers__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
}

@media (max-width: 992px) {
  .used-containers__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
  .used-containers__grid { grid-template-columns: 1fr; }
}

.uc-card {
  background: #141a2a;
  color: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Галерея */
.uc-gallery {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 18px;
}

.uc-gallery__inner {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .3s ease;
}

.uc-gallery__inner img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Стрелки */
.uc-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px;
  height: 34px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uc-gallery__arrow.left  { left: 10px; }
.uc-gallery__arrow.right { right: 10px; }

.uc-gallery__arrow:hover { background: rgba(0,0,0,0.8); }

/* Текст */
.uc-card__name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Контейнер описания */
.uc-card__desc-box {
  position: relative;
  margin-bottom: 20px;
  padding-bottom: 25px;
}

.uc-card__desc {
  opacity: .9;
  margin-bottom: 20px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 70px;
  transition: max-height .35s ease;
}

.uc-card.open .uc-card__desc {
  -webkit-line-clamp: unset;
  max-height: 1000px;
  overflow: visible;
}

/* Градиент */
.uc-card__desc-box::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 25px;
  height: 35px;
  background: linear-gradient(to bottom, rgba(20,26,42,0) 0%, #141a2a 100%);
  pointer-events: none;
}

.uc-card.open .uc-card__desc-box::after { display: none; }

/* Стрелка */
.uc-card__toggle {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  transition: transform .3s ease;
}

.uc-card.open .uc-card__toggle {
  transform: translateX(-50%) rotate(180deg);
}

/* Цена */
.uc-card__price {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 18px;
}

.uc-card__price i {
  font-size: 18px;
  color: #4f8cff;
}

/* Кнопка в карточке: без стилизации .btn, только раскладка */
.uc-card__btn {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

/* ---------- LightGallery fixes ---------- */

.lg-toolbar .lg-close,
.lg-toolbar .lg-close::after,
.lg-toolbar .lg-close::before {
  color: #fff !important;
  fill: #fff !important;
  stroke: #fff !important;
}

.lg-close svg,
.lg-close svg path {
  fill: #fff !important;
  stroke: #fff !important;
}

.lg-toolbar .lg-close {
  opacity: 1 !important;
}

/* ---------- CONTACT OPTIONS ---------- */

.contact-options {
  text-align: center;
  padding: 80px 20px;
  background: #fff;
  color: #000;
}

.contact-options__title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 40px;
  line-height: 1.3;
  color: #000;
}

.contact-options__buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141a2a;
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .25s ease, opacity .25s ease;
}

.contact-btn:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.contact-btn i { font-size: 20px; }

.contact-btn.whatsapp i { color: #25D366; }
.contact-btn.telegram i { color: #229ED9; }

.contact-options__phones p {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.contact-options__phones a {
  font-size: 26px;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  display: inline-block;
  margin: 4px 0;
}

.contact-options__phones a:hover { color: #4460F7; }

@media (max-width: 992px) {
  .contact-options { padding: 60px 15px; }
  .contact-options__title { font-size: 24px; margin-bottom: 30px; }

  .contact-options__buttons {
    flex-direction: column;
    gap: 15px;
  }

  .contact-btn {
    justify-content: center;
    font-size: 15px;
    padding: 12px 18px;
  }

  .contact-options__phones a { font-size: 22px; }
}

@media (max-width: 576px) {
  .contact-options__title { font-size: 20px; }
  .contact-options__phones a { font-size: 20px; }
}

/* ---------- GM POPUP ---------- */

.gm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 9999;
}

.gm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) scale(.92);
  background: #fff;
  color: #111;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
  z-index: 10000;
}

.gm-overlay.active { opacity: 1; visibility: visible; }
.gm-modal.active   { opacity: 1; visibility: visible; transform: translate(-50%,-50%) scale(1); }

.gm-modal__title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.gm-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gm-input {
  padding: 12px;
  border: 1px solid #d3d7df;
  border-radius: 8px;
  font-size: 15px;
}

.gm-input:focus {
  outline: none;
  border-color: #4460F7;
  box-shadow: 0 0 0 3px rgba(68,96,247,.15);
}

.gm-policy {
  font-size: 13px;
  line-height: 1.4;
}

.gm-policy a { color: #4460F7; }

.gm-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  border: 0;
  background: none;
  color: #666;
  cursor: pointer;
}

.gm-modal__close:hover { color: #000; }

.gm-msg {
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 14px;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  text-align: center;
}

.gm-msg.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.gm-msg--error { background: #e53935; color: #fff; }
.gm-msg--success { background: #10B981; color: #fff; }

.gm-loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4460F7;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  animation: spin 0.8s linear infinite;
  margin: 15px auto 0;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 576px) {
  .gm-modal { max-width: 90%; padding: 20px; }
  .gm-modal__title { font-size: 18px; }
  .gm-input { font-size: 14px; padding: 10px; }
}

/* На всякий случай уронить старые попапы Bitrix, если где-то подключились */
.form-popup.popup-form-wrapper,
#mainPopupFormWrapper,
#mainSuccessModalOverlay { display: none !important; }


/* =========================================================
   ЛОКАЛЬНЫЕ КНОПКИ/ФОРМЫ СТРАНИЦЫ (НЕ ГЛОБАЛЬНЫЙ .btn)
   ========================================================= */

/* Кнопки только внутри hero / карточек / попапа */
.masthead .btn,
.used-containers .btn,
.gm-modal .btn {
  display: inline-block;
  background: linear-gradient(90deg, #4460F7 0%, #6a7bff 100%);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 24px rgba(68, 96, 247, .25);
}

.masthead .btn:hover,
.used-containers .btn:hover,
.gm-modal .btn:hover {
  transform: translateY(-2px);
  opacity: .95;
  box-shadow: 0 14px 28px rgba(68, 96, 247, .32);
}

.masthead .btn:active,
.used-containers .btn:active,
.gm-modal .btn:active {
  transform: translateY(0);
}

/* Кнопка в карточке — на всю ширину (у тебя так и было по смыслу) */
.uc-card .btn,
.uc-card__btn {
  width: 100%;
  text-align: center;
}

/* ====== ФОРМА ПОПАПА (gm-*) — полностью локально ====== */

.gm-modal__form label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.gm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d3d7df;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: #111;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.gm-input:focus {
  outline: none;
  border-color: #4460F7;
  box-shadow: 0 0 0 3px rgba(68,96,247,.15);
}

.gm-policy {
  font-size: 13px;
  line-height: 1.4;
  color: #111;
}

.gm-policy a {
  color: #4460F7;
  text-decoration: underline;
}

/* Сообщения формы */
.gm-msg {
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 14px;
  display: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
  text-align: center;
}

.gm-msg.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.gm-msg--error { background: #e53935; color: #fff; }
.gm-msg--success { background: #10B981; color: #fff; }


/* masthead ровно по глобальному .container сайта */
.masthead{
  margin-top: 30px;
  background: none !important;      /* убираем фон с полной ширины */
  border-radius: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* скругляем и рисуем фон внутри контейнера сайта */
.masthead > .container{
  border-radius: 40px;
  overflow: hidden;
  background: url('/quiz/img/hero-back.png') center / cover no-repeat;
}

/* мобилка */
@media (max-width: 576px){
  .masthead{ margin-top: 16px; margin-left: 10px; margin-right: 10px;}
  .masthead > .container{ border-radius: 24px; }
}

/* ===== Mobile / Tablet для masthead hero ===== */

@media (max-width: 992px){
  .masthead > .container{
    border-radius: 32px;
  }

  .masthead .hero{
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 36px 0 48px;
  }

  .masthead .hero-text{
    max-width: 100%;
    min-width: 0;
  }

  .masthead .hero-text h1{
    font-size: 28px;
    margin-bottom: 18px;
  }

  .masthead .hero-text p{
    font-size: 16px;
    margin-bottom: 20px;
  }
}

@media (max-width: 576px){
  .masthead{ margin-top: 16px; }

  .masthead > .container{
    border-radius: 24px;
  }

  .masthead .hero{
    padding: 24px 0 34px;
  }

  .masthead .hero-text h1{
    font-size: 22px;
    line-height: 1.25;
  }

  .masthead .hero-text p{
    font-size: 14px;
    line-height: 1.5;
  }

  /* кнопка — во всю ширину на мобиле */
  .masthead .btn{
    width: 100%;
    text-align: center;
  }
}
