/* page-common — общий каркас внутренних страниц.
   На Tilda все внутренние страницы светлые (белый фон, чёрный текст),
   тёмная только статья «Правда о дизайне». Шапка полупрозрачно-чёрная
   поверх белого фона выглядит серой — как на оригинале. */

body:not(.home) {
  background: #fff;
  color: #1a1a1a;
}

/* Отступ под фиксированной шапкой (продублирован в header.css) */
body:not(.home) .site-main {
  padding-top: var(--header-height, 115px);
  background: #fff;
  min-height: 40vh;
}

@media (max-width: 1100px) {
  body:not(.home) .site-main {
    padding-top: 75px;
  }
}

body:not(.home) .form-placeholder {
  display: block;
}

/* Шапка страницы: заголовок на белом фоне, как на Tilda */
.page-hero {
  padding: 72px 0 36px;
  text-align: center;
  background: transparent;
}

.page-hero__title {
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 500;
  line-height: 1.15;
  color: #1a1a1a;
  max-width: 920px;
  margin: 0 auto;
}

/* Услуги: H1 как на Tilda (TildaSans 40px) */
body.page-template-page-uslugi .page-hero {
  padding: 120px 0 15px;
}

body.page-template-page-uslugi .page-hero__title {
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
}

/* Заголовок слева (contact, o-nas — как на Tilda) */
.page-hero--left {
  text-align: left;
}

.page-hero--left .page-hero__title {
  margin: 0;
}

/* Lead form (Tilda-like) */
.lead-form {
  padding: 28px 0 48px;
  background: transparent;
}

.lead-form__inner {
  max-width: 800px;
  margin: 0 auto;
}

.lead-form__form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.lead-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  color: #1a1a1a;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.3;
}

.article .lead-form__input {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.article .lead-form__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.lead-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  background: #cd9b3b;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.lead-form__submit:hover {
  background: #b8872f;
  color: #fff;
}

/* Lead popup (shared: article + uslugi) */
.lead-popup[hidden] {
  display: none !important;
}

.lead-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lead-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.lead-popup__dialog {
  position: relative;
  z-index: 1;
  width: 40%;
  background: #fff;
  color: #1a1a1a;
  padding: 40px;
}

.lead-popup__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.lead-popup__title {
  margin: 0 0 16px;
  font-size: 38px;
  font-weight: 600;
  text-align: center;
}

.lead-form--popup-panel {
  padding: 0;
  margin: 0;
  background: transparent;
}

.lead-form--popup-panel .lead-form__inner {
  max-width: none;
  padding: 0;
}

.lead-form--popup-panel .lead-form__input {
  border: 1px solid #ccc;
  background: #fff;
  color: #000;
}

/* Tariff detail popups (Tilda #dizajn-1/2/3) — нужны и на страницах проектов */
.tariff-popup[hidden] {
  display: none !important;
}

.tariff-popup {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.tariff-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.tariff-popup__dialog {
  position: relative;
  z-index: 1;
  width: 60%;
  max-height: 75%;
  overflow: auto;
  background: #fff;
  color: #0c0c0c;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.tariff-popup__close {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #0c0c0c;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.tariff-detail {
  font-family: var(--font-sans);
  padding: 40px 80px;
  color: #0c0c0c;
  font-size: 24px;
  background: transparent;
}

.tariff-detail--popup {
  padding-top: 48px;
}

.tariff-detail__head {
  margin-bottom: 20px;
  padding-bottom: 0;
  border: 0;
}

.tariff-detail__name {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  color: #0c0c0c;
  margin: 0;
}

.tariff-detail__tagline,
.tariff-detail__subtitle,
.tariff-detail__section-title,
.tariff-detail__group-title,
.tariff-detail__bullets li {
  font-size: 20px;
  line-height: 1.45;
  color: #0c0c0c;
}

.tariff-detail__tagline {
  font-weight: 600;
  margin: 0 0 12px;
}

.tariff-detail__subtitle {
  margin: 0 0 24px;
  font-weight: 400;
}

.tariff-detail__section {
  margin-bottom: 22px;
}

.tariff-detail__section-title,
.tariff-detail__group-title {
  font-family: var(--font-sans);
  font-weight: 600;
  margin: 0 0 12px;
}

.tariff-detail__section-title {
  font-size: 22px;
  margin: 0;
}

.tariff-detail__bullets {
  padding-left: 1.2em;
  list-style: disc;
  display: block;
}

.tariff-detail__bullets li {
  position: static;
  padding-left: 0;
}

.tariff-detail__bullets li::before {
  content: none;
}

.tariff-detail__bullets--nested {
  margin-left: 0.5em;
}

.tariff-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.tariff-detail__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 410px;
  max-width: 100%;
  height: 55px;
  padding: 0;
  font-size: 18px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid #cd9b3b;
  color: #cd9b3b;
  background: #fff;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.tariff-detail__btn:hover {
  opacity: 0.5;
  background: #fff;
  color: #cd9b3b;
}

.tariff-detail__btn--primary {
  background: #cd9b3b;
  border-color: #cd9b3b;
  color: #fff;
}

.tariff-detail__btn--primary:hover {
  opacity: 0.5;
  background: #cd9b3b;
  color: #fff;
}

/* Legacy placeholder (kept for any leftover markup) */
.form-placeholder {
  background: rgba(0, 0, 0, 0.03);
  padding: 36px 0;
  border-top: 2px dashed rgba(205, 155, 59, 0.45);
  border-bottom: 2px dashed rgba(205, 155, 59, 0.45);
  margin: 24px 0;
}

.form-placeholder__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-placeholder__note {
  text-align: center;
  opacity: 0.7;
  font-size: 14px;
  margin: 0;
  color: inherit;
}

/* Аккордеон FAQ на внутренних страницах — та же анимация, что и на главной */
body:not(.home) .faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}

body:not(.home) .faq__item--open .faq__answer {
  max-height: 1000px;
}

@media (max-width: 1441px) {
  .tariff-popup__dialog {
    width: 75%;
  }


  .lead-popup__dialog {
    width: 70%;
  }
}

@media (max-width: 1024px) {
  .tariff-popup__dialog {
    width: 90%;
  }

  .tariff-detail__actions {
    flex-wrap: nowrap;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 44px 0 24px;
  }

  .tariff-popup__dialog {
    width: 100%;
    max-height: 100%;
  }

  .tariff-detail {
    padding: 28px 20px;
    font-size: 18px;
  }

  .tariff-detail__name {
    font-size: 22px;
  }

  .tariff-detail__tagline,
  .tariff-detail__subtitle,
  .tariff-detail__section-title,
  .tariff-detail__group-title,
  .tariff-detail__bullets li {
    font-size: 18px;
  }
}

/* Photo zoomer (Tilda t-zoomable) — в common, чтобы не зависеть от обрезанного page-project.css */
.image-zoomer[hidden] {
  display: none !important;
}

.image-zoomer {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: block;
}

.image-zoomer__container {
  position: absolute;
  inset: 0;
  background: #fff;
}

.image-zoomer__stage {
  position: absolute;
  inset: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-zoomer__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-zoomer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  color: #000;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-zoomer__nav {
  position: absolute;
  top: 50px;
  bottom: 50px;
  z-index: 2;
  width: 15%;
  max-width: 288px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.image-zoomer__nav--prev {
  left: 0;
}

.image-zoomer__nav--next {
  right: 0;
}

.image-zoomer__nav svg {
  display: block;
  margin: 0 auto;
}

.image-zoomer__nav[hidden] {
  display: none !important;
}

@media (max-width: 500px) {

  .lead-popup__dialog {
    padding: 20px;
    width: 80%;
  }
}