/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — Переиспользуемые UI-компоненты и секции
   ═══════════════════════════════════════════════════════════════ */


/* ── 6. Cookie banner ───────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--background);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 20px 0;
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner--hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.cookie-banner__inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.cookie-banner__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cookie-banner__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 260px;
  flex-shrink: 0;
}

.cookie-banner__btn { width: 100%; padding: 12px 24px; }

@media (max-width: 1080px) {
  .cookie-banner__inner { padding: 0 20px; gap: 24px; }
}

@media (max-width: 768px) {
  .cookie-banner { padding: 16px 0; }

  .cookie-banner__inner {
    padding: 0 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .cookie-banner__actions { width: 100%; }
}


/* ── Global scroll lock & smooth scroll ─────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h, 88px) + 12px);
}
body.is-locked { overflow: hidden; }


/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26.5px;
  border-radius: 6px;
  font-family: "Golos Text", sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -.01em;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s cubic-bezier(.4,0,.2,1),
              color .2s cubic-bezier(.4,0,.2,1),
              border-color .2s cubic-bezier(.4,0,.2,1),
              transform .15s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn--primary:hover { background: #4D6766; }

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn--outline:hover { background: var(--accent); color: #fff; }


/* ── Form fields ────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-font);
  letter-spacing: -.01em;
}

.field__input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
  font-size: 16px;
  color: var(--primary-font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(95,124,123,.18);
}

.field--select { position: relative; }

.field__input--select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='m5 8 5 5 5-5' stroke='%235F7C7B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}


/* ── Custom select ──────────────────────────────────────────── */
.field--select { position: relative; }

.field--select select.field__input--select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  color: var(--primary-font);
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.custom-select__trigger:focus { outline: none; }
.custom-select.is-open .custom-select__trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(95,124,123,.18);
}

.custom-select__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='m5 8 5 5 5-5' stroke='%235F7C7B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.custom-select.is-open .custom-select__chevron { transform: rotate(180deg); }

.custom-select__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0,0,0,.12);
  z-index: 20;
  overflow: hidden;
}
.custom-select.is-open .custom-select__dropdown { display: block; }

.custom-select__option {
  padding: 12px 20px;
  font-size: 15px;
  color: var(--primary-font);
  cursor: pointer;
  transition: background .15s;
}
.custom-select__option:hover { background: var(--background-2); }
.custom-select__option.is-selected {
  background: var(--background-2);
  color: var(--accent);
  font-weight: 500;
}
.custom-select__option[data-value=""] { color: var(--primary-dark); }


/* ── Checkbox ───────────────────────────────────────────────── */
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  cursor: pointer;
}
.check__input { position: absolute; opacity: 0; pointer-events: none; }
.check__mark {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  position: relative;
  transition: background .2s, opacity .2s;
  border: none;
}
.check__mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 11px;
  width: 11px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  opacity: 1;
  transition: opacity .15s;
}
.check__input:not(:checked) ~ .check__mark {
  background: #fff;
  border: 1px solid var(--border);
}
.check__input:not(:checked) ~ .check__mark::after { opacity: 0; }
.check__label { font-size: 12px; color: var(--primary-dark); line-height: 1.4; }


/* ── Messenger icons ────────────────────────────────────────── */
.messenger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.messenger--tg  { background: linear-gradient(180deg, #37BBFE, #007DBB); }
.messenger--viber { background: linear-gradient(180deg, #9179EE, #6457bb); }


/* ── Modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.modal.is-open { display: block; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(201, 180, 154, .65);
  animation: fadeIn .2s cubic-bezier(.4,0,.2,1);
}

.modal__dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 773px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  animation: modalIn .25s cubic-bezier(.4,0,.2,1);
}

.modal__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .6;
  pointer-events: none;
  z-index: 0;
}

.modal__body {
  position: relative;
  z-index: 1;
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal__head { display: flex; flex-direction: column; gap: 12px; text-align: center; }

.modal__title {
  font-family: "Onest", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  color: var(--primary-font);
  text-wrap: balance;
}

.modal__lead { font-size: 16px; color: var(--primary-font); line-height: 1.45; }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .2s;
  cursor: pointer;
}
.modal__close:hover { background: #fff; }
.modal__submit { margin-top: 8px; }
.modal__form { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 640px) {
  .modal__body { padding: 32px 20px 24px; }
  .modal__title { font-size: 22px; }
}


/* ── Burger menu modal ──────────────────────────────────────── */
.modal--menu { display: none; }
.modal--menu.is-open { display: block; }

.menu {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100vw, 380px);
  height: 100dvh;
  background: var(--background);
  box-shadow: -2px 0 18px rgba(0,0,0,.2);
  padding: 64px 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideIn .25s cubic-bezier(.4,0,.2,1);
}

.menu__close { top: 14px; right: 14px; }

.menu__section { display: flex; flex-direction: column; gap: 14px; }

.menu__title {
  color: var(--primary-font);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-2);
}

.menu__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__list li { margin: 0; }
.menu__link { font-size: 15px; color: var(--primary-font); }
.menu__link:hover { color: var(--accent); }

.menu__contacts { display: flex; flex-direction: column; gap: 14px; }
.menu__messengers { display: flex; gap: 10px; }
.menu__cta { margin-top: auto; }

.menu__socials-row { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.menu__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.menu__social-link:hover { transform: scale(1.1); }
.menu__social-link img { width: 100%; height: 100%; object-fit: contain; }


/* ── Keyframe animations ────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
