/* =====================================================================
   ТЕМА «НАТЯЖНЫЕ ПОТОЛКИ» — ОСНОВНОЙ ФАЙЛ СТИЛЕЙ
   Структура файла (используйте поиск по названию блока):
   1. RESET & BASE — сброс, переменные, типографика
   2. BUTTONS — кнопки
   3. HEADER — шапка сайта
   4. HERO — главный экран (картинка без обрезки, высота по контенту)
   5. STATS — блок статистики (иконки-файлы)
   6. QUALITY / ADVANTAGES — блок "Преимущества" + форма заявки
   7. WORKS — галерея "Наши работы" + lightbox
   8. FAQ — вопросы и ответы (аккордеон)
   9. CONTACTS — контакты + карта (embed)
   10. CTA BANNER — баннер с QR-кодом перед футером
   11. FOOTER — подвал сайта
   12. RESPONSIVE — медиа-запросы для планшетов и мобильных
   13. ANIMATIONS — плавный скролл + scroll-reveal анимации
   14. LIGHTBOX — попап-галерея фото
   ===================================================================== */


/* =====================================================================
   1. RESET & BASE
   ===================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --bg-dark: #14120f;
  --bg-darker: #0e0d0b;
  --yellow: #e3a328;
  --yellow-light: #e3a328;
  --text-light: #f4f2ee;
  --text-muted: #b7b3ac;
  --border-color: #2a2823;
  --radius: 12px;
}

body{
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

img{
  max-width: 100%;
  display: block;
}

a{
  text-decoration: none;
  color: inherit;
}

ul{
  list-style: none;
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-yellow{
  color: var(--yellow);
}

.section-title{
  font-size: 32px;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 700;
}


/* =====================================================================
   2. BUTTONS
   ===================================================================== */

.btn{
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn--yellow{
  background: linear-gradient(180deg, var(--yellow-light), var(--yellow));
  color: #1a1a1a;
}

.btn--yellow:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 180, 0, .35);
}

.btn--lg{ padding: 16px 36px; font-size: 16px; }
.btn--sm{ padding: 10px 20px; font-size: 14px; }
.btn--full{ width: 100%; text-align: center; }
.btn:disabled{ opacity: .6; cursor: not-allowed; }


/* =====================================================================
   3. HEADER
   ===================================================================== */

.header{
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 24px;
}

.logo{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
}

.logo__icon{ color: var(--yellow); font-size: 24px; }
.logo img{ height: 32px; width: auto; }

.nav{
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a{ color: var(--text-muted); font-size: 15px; }
.nav a:hover{ color: var(--yellow); }

.header__right{
  display: flex;
  align-items: center;
  gap: 20px;
}

.header__phone-number{ font-weight: 600; font-size: 15px; }
.header__phone-time{ font-size: 12px; color: var(--text-muted); }


/* =====================================================================
   4. HERO
   Картинка — обычный <img width:100%; height:auto>, поэтому никогда
   не обрезается. Высота секции равна высоте самой картинки (никакого
   min-height не задаётся). Текст лежит АБСОЛЮТНО поверх картинки.

   ВАЖНО: на низких/квадратных изображениях текста может не хватить
   места по высоте — тогда либо используйте более высокую (горизонтальную)
   картинку с запасом сверху/снизу под текст, либо сократите список пунктов.
   ===================================================================== */

.hero{
  position: relative;
  padding: 0;
  overflow: hidden;
  display: block;
}
.hero__media{
  position: relative;
  width: 100%;
  line-height: 0;
}

.hero__bg-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3/1;
    object-fit: cover;
    min-height: 600px;
}

.hero__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 9, 7, 0.88) 0%,
    rgba(10, 9, 7, 0.55) 45%,
    rgba(10, 9, 7, 0.15) 100%
  );
  z-index: 1;
}

.hero__inner{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  overflow-y: auto;
}

.hero__content{
  max-width: 620px;
  padding: 40px 0;
}

.hero h1{ font-size: 44px; margin-bottom: 16px; line-height: 1.2; }
.hero__subtitle{ font-size: 18px; color: var(--text-muted); margin-bottom: 24px; }
.hero__list{ margin-bottom: 32px; }

.hero__list li{
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__list li::before{
  content: "✔";
  color: var(--yellow);
  position: absolute;
  left: 0;
}

.hero__list li.hero__list-item--custom-icon::before{ content: ""; }

.hero__list-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
  position: absolute;
  left: 0;
}


/* =====================================================================
   5. STATS
   Иконки статистики загружаются файлами через Customizer,
   при отсутствии файла используется emoji-заглушка (см. stats.php).
   ===================================================================== */

.stats{
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 36px 0;
}

.stats__inner{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat__icon{
  font-size: 28px;
  color: var(--yellow);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat__icon img{ width: 36px; height: 36px; object-fit: contain; }
.stat__value{ font-size: 28px; font-weight: 700; }
.stat__label{ color: var(--text-muted); font-size: 14px; }


/* =====================================================================
   6. QUALITY / ADVANTAGES
   Карточки "Преимущества" (заголовок + текст + иконка) чередуют
   расположение фото слева/справа через .quality__block--reverse.
   Плюс форма заявки справа (.order-form).
   ===================================================================== */

.quality{ padding: 70px 0; }

.quality__inner{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.quality__block{
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

.quality__block--reverse{
  grid-template-columns: 1.3fr 1fr;
}

.quality__block--reverse .quality__image{ order: 2; }
.quality__block--reverse .quality__text{ order: 1; }

.quality__image img{
  border-radius: var(--radius);
  height: 220px;
  object-fit: cover;
  width: 100%;
}

.quality__text h3{ font-size: 24px; margin-bottom: 12px; }
.quality__text p{ color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

.check-list li{
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 14px;
}

.check-list li::before{
  content: "✔";
  color: var(--yellow);
  position: absolute;
  left: 0;
}

.order-form{
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
}

.order-form h3{ font-size: 22px; margin-bottom: 20px; }

.order-form input[type="text"],
.order-form input[type="tel"]{
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: none;
  margin-bottom: 14px;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
}

.checkbox{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.checkbox input{ margin-top: 3px; accent-color: var(--yellow); }

.form-status{
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.form-status--success{ background: rgba(90, 200, 90, .15); color: #7be07b; display: block; }
.form-status--error{ background: rgba(220, 80, 80, .15); color: #ff9b9b; display: block; }


/* =====================================================================
   7. WORKS
   Галерея фото работ, клик по фото открывает lightbox (см. блок 14).
   ===================================================================== */

.works{ padding: 70px 0; }

.works__grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.works__item{ cursor: pointer; }

.works__item img{
  border-radius: var(--radius);
  height: 200px;
  object-fit: cover;
  width: 100%;
  transition: transform .3s ease;
}

.works__item:hover img{ transform: scale(1.03); }
.works__more{ text-align: center; margin-top: 32px; }


/* =====================================================================
   8. FAQ
   Аккордеон, логика раскрытия/закрытия в assets/js/script.js.
   ===================================================================== */

.faq{ padding: 70px 0; }

.faq__list{
  max-width: 900px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq__item{
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.faq__question{
  width: 100%;
  background: none;
  border: none;
  color: var(--text-light);
  padding: 18px 22px;
  text-align: left;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq__question span{
  color: var(--yellow);
  font-size: 20px;
  transition: transform .2s ease;
}

.faq__item.active .faq__question span{ transform: rotate(45deg); }

.faq__answer{
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  padding: 0 22px;
}

.faq__answer p{ color: var(--text-muted); font-size: 14px; padding-bottom: 18px; }
.faq__item.active .faq__answer{ max-height: 200px; }


/* =====================================================================
   9. CONTACTS
   Карта встраивается через iframe-код (.map-embed) из "Настройки сайта".
   Если код не задан — показывается текстовая заглушка (.map-placeholder).
   ===================================================================== */

.contacts{ padding: 70px 0; background: var(--bg-darker); }

.contacts__inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.contacts__list li{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.contacts__icon{ color: var(--yellow); }

.map-placeholder{
  background: #1c1a16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 20px;
}

.map-pin{ font-size: 14px; color: var(--text-light); }
.map-pin small{ color: var(--text-muted); }

.map-embed{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.map-embed iframe{
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

.map-embed__cta{
  display: block;
  width: fit-content;
  margin-top: 16px;
}


/* =====================================================================
   10. CTA BANNER
   Жёлтая полоса с призывом и QR-кодом (загружается через Customizer).
   ===================================================================== */

.cta-banner{ background: var(--yellow); color: #1a1a1a; padding: 36px 0; }

.cta-banner__inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta-banner p{ font-size: 20px; font-weight: 600; }

.cta-banner__qr{
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  max-width: 260px;
}

.qr-placeholder{
  width: 56px;
  height: 56px;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  flex-shrink: 0;
}

.qr-placeholder img{ width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }


/* =====================================================================
   11. FOOTER
   ===================================================================== */

.footer{
  background: var(--bg-darker);
  padding: 48px 0 20px;
  border-top: 1px solid var(--border-color);
}

.footer__inner{
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer__col h4{ margin-bottom: 14px; color: var(--yellow); font-size: 15px; }

.footer__col a,
.footer__col span{
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.footer__socials{
  display: flex;
  gap: 12px;
  margin-top: 16px;
  font-size: 18px;
  color: var(--yellow);
}

.footer__bottom{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}


/* =====================================================================
   12. RESPONSIVE
   Общие адаптивные правки для планшетов (≤992px) и мобильных (≤576px).
   Адаптив, специфичный только для одного блока, лежит внутри его секции
   выше (например HERO), здесь — правки, затрагивающие компоновку сайта.
   ===================================================================== */

@media (max-width: 992px){
  .hero__overlay{
    background: linear-gradient(
      180deg,
      rgba(10, 9, 7, 0.35) 0%,
      rgba(10, 9, 7, 0.85) 65%,
      rgba(10, 9, 7, 0.97) 100%
    );
  }
  .hero__content{ max-width: 100%; }

  .quality__inner{ grid-template-columns: 1fr; }
  .quality__block,
  .quality__block--reverse{ grid-template-columns: 1fr; }
  .quality__block--reverse .quality__image{ order: 0; }
  .quality__block--reverse .quality__text{ order: 0; }

  .stats__inner{ grid-template-columns: repeat(2, 1fr); }
  .works__grid{ grid-template-columns: repeat(2, 1fr); }
  .contacts__inner{ grid-template-columns: 1fr; }
  .footer__inner{ grid-template-columns: 1fr; }
  .nav{ display: none; }
}

@media (max-width: 576px){
  .hero h1{ font-size: 28px; }
  .hero__content{ padding: 24px 0; }

  .header__phone{ display: none; }
  .works__grid{ grid-template-columns: 1fr; }
  .stats__inner{ grid-template-columns: 1fr 1fr; }
  .cta-banner__inner{ flex-direction: column; text-align: center; }
}


/* =====================================================================
   13. ANIMATIONS
   Плавный скролл по якорям + scroll-reveal появление секций/карточек.
   Логика добавления класса .is-visible — в assets/js/script.js
   (через IntersectionObserver).
   ===================================================================== */

html{
  scroll-behavior: smooth;
}

section[id],
div[id]{
  scroll-margin-top: 90px;
}

.reveal{
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}

.reveal--left{ transform: translateX(-50px); }
.reveal--right{ transform: translateX(50px); }
.reveal--up{ transform: translateY(40px); }

.reveal.is-visible{
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{ transition: none; opacity: 1; transform: none; }
}


/* =====================================================================
   14. LIGHTBOX
   Попап-просмотр фото из галереи "Наши работы" с навигацией
   стрелками/клавиатурой. Открытие/закрытие — в assets/js/script.js.
   ===================================================================== */

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 7, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s ease;
}

.lightbox.is-open{
  display: flex;
  opacity: 1;
}

.lightbox__inner{
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: scale(.92);
  transition: transform .25s ease;
}

.lightbox.is-open .lightbox__inner{
  transform: scale(1);
}

.lightbox__inner img{
  max-width: 90vw;
  max-height: 78vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lightbox__counter{
  color: var(--text-muted);
  font-size: 14px;
}

.lightbox__close{
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.lightbox__close:hover{ color: var(--yellow); transform: rotate(90deg); }

.lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}

.lightbox__nav:hover{ background: var(--yellow); color: #1a1a1a; }
.lightbox__nav--prev{ left: 24px; }
.lightbox__nav--next{ right: 24px; }

@media (max-width: 576px){
  .lightbox__close{ top: 14px; right: 16px; font-size: 30px; }
  .lightbox__nav{ width: 40px; height: 40px; font-size: 22px; }
  .lightbox__nav--prev{ left: 10px; }
  .lightbox__nav--next{ right: 10px; }
}
.burger{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.burger span{
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.burger.is-active span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.burger.is-active span:nth-child(2){
  opacity: 0;
}
.burger.is-active span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 98;
  opacity: 0;
  transition: opacity .25s ease;
}

.nav-overlay.is-visible{
  display: block;
  opacity: 1;
}


/* =====================================================================
   12. RESPONSIVE (ЗАМЕНА ЦЕЛИКОМ)
   ===================================================================== */

@media (max-width: 992px){
  .hero__overlay{
    background: linear-gradient(
      180deg,
      rgba(10, 9, 7, 0.35) 0%,
      rgba(10, 9, 7, 0.85) 65%,
      rgba(10, 9, 7, 0.97) 100%
    );
  }
  .hero__content{ max-width: 100%; }

  .quality__inner{ grid-template-columns: 1fr; }
  .quality__block,
  .quality__block--reverse{ grid-template-columns: 1fr; }
  .quality__block--reverse .quality__image{ order: 0; }
  .quality__block--reverse .quality__text{ order: 0; }

  .stats__inner{ grid-template-columns: repeat(2, 1fr); }
  .works__grid{ grid-template-columns: repeat(2, 1fr); }
  .contacts__inner{ grid-template-columns: 1fr; }
  .footer__inner{ grid-template-columns: 1fr; }

  /* Бургер вместо горизонтальной навигации */
  .burger{ display: flex; }

  .nav{
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--bg-darker);
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 90px 28px 28px;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 99;
    overflow-y: auto;
  }

  .nav.is-open{
    transform: translateX(0);
  }

  .nav a{
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
  }
}
section {
    overflow: hidden;
}
@media (max-width: 576px){
  .hero h1{ font-size: 28px; }
  .hero__content{ padding: 24px 0; }

  .header__phone{ display: none; }
  .works__grid{ grid-template-columns: 1fr; }
  .stats__inner{ grid-template-columns: 1fr 1fr; }
  .cta-banner__inner{ flex-direction: column; text-align: center; }

.nav {
    width: 100%;
    display: flex;
    position: fixed;
    top: 71px;
    right: 0px;
    height: 100vh;
    width: 100%;
    background: var(--bg-darker);
    border-left: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 90px 28px 28px;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 99;
    overflow-y: auto;
}
  .header__right a {
    display: none;
}
}
/*
  ПАТЧ ДЛЯ assets/css/style.css

  Замените весь блок "5. STATS" (.stats, .stats__inner, .stat__icon,
  .stat__value, .stat__label) на этот новый блок OFFERS.
  Также удалите упоминания .stats__inner из блока "12. RESPONSIVE"
  (строку `.stats__inner{ grid-template-columns: repeat(2, 1fr); }`
  в @media (max-width: 992px) и аналогичную в @media (max-width: 576px)) —
  они больше не нужны, т.к. новый блок вёрстан списком, а не сеткой.
*/

/* =====================================================================
   5. OFFERS — "Что мы предлагаем" (текстовый блок вместо иконок статистики)
   Каждый пункт выезжает по отдельности за счёт .reveal + transition-delay,
   задержка вычисляется в script.js через порядковый номер элемента
   (см. offers-script-patch.js).
   ===================================================================== */

.offers{
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 0;
}

.offers__list{
  max-width: 800px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.offers__item{
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.offers__marker{
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  margin-top: 7px;
}

.offers__text strong{
  color: var(--text-light);
  font-weight: 700;
}

@media (max-width: 576px){
  .offers{ padding: 48px 0; }
  .offers__list{ gap: 16px; }
  .offers__item{ font-size: 14px; }
}
