/* ==========================================================================
   components.css — кнопки, переключатель языка, hero, карточки, форма,
   галерея, лайтбокс, плавающая кнопка
   ========================================================================== */

/* ------------------------------- Кнопки --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .ico { font-size: 1.15em; }

.btn--sm { padding: 11px 20px; font-size: .88rem; }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(46, 168, 167, .3);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.btn--outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.btn--outline:hover { background: var(--brand); color: #fff; }

.btn--ghost {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }

.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--wa:hover { background: #1eb356; border-color: #1eb356; color: #fff; }

/* -------------------------- Переключатель языка ------------------------- */

.langs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
}

.langs__btn {
  padding: 4px 11px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .7);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.langs__btn:hover { color: #fff; }
.langs__btn.is-active { background: var(--brand); color: #fff; }

/* ------------------------------- Бургер --------------------------------- */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) { .burger { display: flex; } }

/* Затемнение под открытым мобильным меню */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 32, 31, .5);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.scrim.is-visible { opacity: 1; }

body.is-locked { overflow: hidden; }

/* -------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 82vh, 780px);
  padding: 100px 0;
  overflow: hidden;
  color: #fff;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Затемнение поверх фото, чтобы текст читался */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(20, 32, 31, .88) 0%, rgba(20, 32, 31, .55) 45%, rgba(20, 32, 31, .25) 100%),
    linear-gradient(to top, rgba(20, 32, 31, .6), transparent 45%);
}

.hero__content { position: relative; z-index: 2; max-width: 760px; }

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 16px;
  background: rgba(46, 168, 167, .92);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero__title { color: #fff; margin-bottom: .35em; text-wrap: balance; }

.hero__text {
  max-width: 620px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, .88);
  font-size: 1.06rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 1.3rem;
  transform: translateX(-50%);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

@media (max-width: 639px) {
  .hero { min-height: 560px; padding: 72px 0; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ------------------------ Основные направления -------------------------- */

/* Продажа и аренда — то, ради чего приходят на сайт. Поэтому блоки крупнее
   карточек услуг, в фирменном цвете и каждый заканчивается призывом. */
.offer {
  display: flex;
  gap: 22px;
  padding: 32px 30px;
  background: var(--brand-light);
  border: 1px solid rgba(46, 168, 167, .22);
  border-radius: var(--radius);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.offer:hover { border-color: var(--brand); box-shadow: var(--shadow); }

.offer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 64px;
  height: 64px;
  background: var(--brand);
  border-radius: 18px;
  color: #fff;
}
.offer__icon svg { width: 34px; height: 34px; fill: currentColor; }

.offer__title { margin-bottom: .45em; font-size: 1.2rem; }
.offer__text { margin-bottom: 1em; color: var(--body); font-size: .97rem; }
.offer__note {
  margin-bottom: 1em;
  padding: 10px 14px;
  background: #fff;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .93rem;
  font-weight: 700;
}

@media (max-width: 479px) {
  .offer { flex-direction: column; gap: 18px; padding: 26px 22px; }
}

/* Подзаголовок перед остальными услугами: отделяет «главное» от «дополнительно» */
.services__sub {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* --------------------------- Карточки услуг ----------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.card {
  padding: 34px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  background: var(--brand-light);
  border-radius: 20px;
  color: var(--brand);
}
.card__icon svg { width: 40px; height: 40px; fill: currentColor; }
.card__icon img  { width: 40px; height: 40px; object-fit: contain; }

.card__title { margin-bottom: .5em; font-size: 1.15rem; }
.card__text  { color: var(--body); font-size: .97rem; }

/* --------------------------- Текстовый блок ----------------------------- */

.prose p { margin-bottom: 1.05em; }
.prose a { font-weight: 700; text-decoration: underline; }

/* Первый абзац крупнее — вводит в текст и разбивает «стену» абзацев.
   Работает и после смены языка: содержимое .prose целиком перерисовывается. */
.prose > p:first-child {
  color: var(--ink);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.62;
}

/* --------------------------- «Наша компания» ---------------------------- */

.about__highlight {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(46, 168, 167, .28);
}
.about__highlight strong { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.about__highlight span { font-size: .86rem; opacity: .92; }

/* Тот же вид ссылки-призыва используется в блоках «продать» и «купить» */
.about__cta,
.offer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.about__cta { margin-top: 20px; }

/* Шеврон из спрайта смотрит вниз — разворачиваем его вправо */
.about__cta .ico,
.offer__cta .ico { font-size: 1.1em; transform: rotate(-90deg); transition: transform .25s var(--ease); }
.about__cta:hover .ico,
.offer__cta:hover .ico { transform: rotate(-90deg) translateY(4px); }

/* --------------------------- Аккредитации ------------------------------- */

/* Полоса без заголовка и подписей — только знаки отличия */
.creds__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 22px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.creds__logo:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }

/* Пропорции у трёх знаков разные (2.4:1, 1.5:1, 1:1) — вписываем каждый
   в общий бокс, ограничивая и высоту, и ширину */
.creds__logo img {
  width: auto;
  max-width: 100%;
  max-height: 78px;
  object-fit: contain;
}

/* -------------------- Миссия / видение / ценности ----------------------- */

.mvv__item {
  padding: 28px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.mvv__title {
  margin-bottom: .5em;
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mvv__values ul { display: grid; gap: 10px; }
.mvv__values li { position: relative; padding-left: 30px; }
.mvv__values li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .62em;
  width: 10px;
  height: 10px;
  background: var(--brand);
  border-radius: 50%;
}

/* --------------------------------- Форма -------------------------------- */

.form {
  padding: clamp(26px, 3.5vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: .97rem;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
}

/* Красная рамка только после попытки отправки (класс ставит main.js) */
.form.was-validated :invalid { border-color: #e05252; background: #fdf3f3; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 519px) { .field-row { grid-template-columns: 1fr; } }

.form .btn { width: 100%; margin-top: 4px; }

.form__note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
}

.form__status {
  margin: 14px 0 0;
  padding: 13px 16px;
  background: var(--brand-light);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .9rem;
}

/* --------------------------- Блок контактов ----------------------------- */

.info {
  padding: clamp(26px, 3.5vw, 36px);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info__title {
  margin-bottom: 22px;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info__list { display: grid; gap: 20px; margin-bottom: 26px; }
.info__list li { display: flex; gap: 14px; }
.info__list .ico { margin-top: 3px; font-size: 1.25rem; color: var(--brand); }
.info__list a { display: block; font-weight: 700; word-break: break-word; }

.info__label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.info__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info__actions .btn { flex: 1 1 auto; }

/* ------------------------ Плавающая кнопка WhatsApp --------------------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 1.7rem;
  color: #fff;
  background: var(--wa);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .42);
  transform: translateY(90px);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease),
              background .25s var(--ease);
}
.fab.is-visible { transform: none; opacity: 1; }
.fab:hover { background: #1eb356; color: #fff; }

@media (max-width: 639px) { .fab { width: 52px; height: 52px; font-size: 1.5rem; } }
