/* ============================================================
   Юридический Центр Защиты — landing (стиль THEMIS)
   Mobile-first, воздушный, с фото-фоном и mesh-blob'ами
   + фиксы для форм, попапа и intl-tel-input
   ============================================================ */

:root {
  --bg-0: #050d24;
  --bg-1: #0a1a3f;
  --bg-2: #11234f;
  --bg-3: #1a2e60;
  --bg-card: #ffffff;
  --line-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(244, 185, 66, 0.20);
  --text-0: #f4f6ff;
  --text-1: #cfd5ec;
  --text-2: #8a93b8;
  --text-3: #5a628a;
  --text-dark: #1a1f3a;
  --gold: #f4b942;
  --gold-2: #ffd36e;
  --gold-soft: rgba(244, 185, 66, 0.12);
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 40px -8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.25);
  --shadow-gold: 0 12px 32px -8px rgba(244, 185, 66, 0.45);
  --container: 1240px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.mobile-menu-open { overflow: hidden; }

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

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow { max-width: 860px; }

section.section { position: relative; padding: 88px 0; overflow: hidden; }

.section-bg, .section-bg-photo { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.section-bg-photo {
  background-size: cover;
  background-position: center;
  opacity: 0.10;
  filter: saturate(0.3);
}

.section > .container { position: relative; z-index: 1; }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 56px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--line);
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--text-0);
}

.section-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

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

/* Dark sections keep light text; a few sections sit on lighter navy panels */
.section-uslugi, .section-etapy, .section-kejsy, .section-faq, .section-kontakty {
  background: var(--bg-1);
}

.section-komanda { background: var(--bg-2); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1207;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(244, 185, 66, 0.55); }

.btn-lg { padding: 17px 34px; font-size: 16px; }

.btn-block { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 13, 36, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark { width: 34px; height: 34px; }

.logo-text {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--text-0);
}

.logo-dot { color: var(--gold); }

.nav-primary {
  display: none;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
}

.nav-primary a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  padding: 8px 0;
  position: relative;
  transition: color 0.15s ease;
}

.nav-primary a:hover, .nav-primary a.is-active { color: var(--gold); }

.nav-primary a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.header-cta { display: none; flex-shrink: 0; padding: 12px 22px; font-size: 14px; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-0);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  margin: 0 auto;
}

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

.mobile-drawer {
  position: fixed;
  top: 76px;
  left: 0; right: 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  padding: 12px 20px 24px;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  z-index: 99;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
}

body.mobile-menu-open .mobile-drawer {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  padding: 14px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.mobile-drawer a.mobile-cta {
  margin-top: 12px;
  border-bottom: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1207;
  text-align: center;
  border-radius: var(--r-sm);
  font-weight: 700;
  padding: 14px;
}

@media (min-width: 960px) {
  .nav-primary { display: flex; }
  .header-cta { display: inline-flex; }
  .burger { display: none; }
  .mobile-drawer { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  padding: 56px 0 72px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: grayscale(0.3) contrast(1.1);
}

.hero-themis {
  background-image: url('assets/img/themis-desktop.png');
  background-position: center right;
  opacity: 0.52;
  filter: grayscale(0.1) contrast(1.15) brightness(1.18);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-0) 0%, rgba(5,13,36,0.85) 45%, var(--bg-0) 100%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
}

.hero-blob-1 { width: 420px; height: 420px; top: -120px; left: -100px; background: var(--gold); opacity: 0.12; }
.hero-blob-2 { width: 340px; height: 340px; bottom: -80px; right: -60px; background: #3a5bd9; opacity: 0.18; }
.hero-blob-3 { width: 260px; height: 260px; top: 40%; right: 10%; background: var(--gold-2); opacity: 0.08; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(32px, 5.2vw, 54px);
  line-height: 1.15;
  margin: 0 0 24px;
  color: var(--text-0);
}

.hero-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-1);
  margin: 0 0 24px;
  max-width: 620px;
}

.hero-bullets { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }

.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
}

.hero-bullets i { color: var(--gold); font-size: 16px; }

.hero-trust {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.trust-stat { display: flex; flex-direction: column; gap: 2px; }

.trust-stat strong {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.trust-stat span { font-size: 13px; color: var(--text-2); }

/* ============================================================
   CONSULTATION CARD / LEAD FORM
   ============================================================ */

.section-consultation { padding: 0 0 88px; }

.consult-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.consult-side {
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2));
  color: var(--text-0);
  padding: 40px 32px;
}

.consult-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 22px;
  margin-bottom: 20px;
}

.consult-side h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
}

.consult-side p { font-size: 14.5px; color: var(--text-1); margin: 0 0 20px; line-height: 1.6; }

.consult-bullets { display: flex; flex-direction: column; gap: 12px; }

.consult-bullets li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-1); }

.consult-bullets i { color: var(--gold); }

.consult-form-side { padding: 36px 32px; background: var(--bg-card); }

.lead-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
}

.field-optional { font-weight: 500; color: #9aa1c2; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: var(--font-sans);
  background: #f5f7fc;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-dark);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.field textarea { resize: vertical; min-height: 60px; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.15);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: #d94b5d;
  background: #fff7f8;
  box-shadow: 0 0 0 4px rgba(217, 75, 93, 0.12);
}

.form-validation-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 75, 93, 0.35);
  border-radius: var(--r-sm);
  background: #fff2f4;
  color: #a72539;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.form-validation-message span {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #d94b5d;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 14px;
}

.form-validation-message p { margin: 0; }

.select-wrap { position: relative; }

.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }

.select-arrow {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  color: #9aa1c2;
  pointer-events: none;
  font-size: 13px;
}

.field-wide { grid-column: 1 / -1; }

.form-policy { font-size: 12px; color: #9aa1c2; line-height: 1.5; margin: 0; }

.form-policy a { color: var(--text-dark); text-decoration: underline; }

.form-success {
  text-align: center;
  padding: 32px 12px;
}

.form-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.form-success h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-dark);
  margin: 0 0 6px;
}

@media (min-width: 860px) {
  .consult-card { grid-template-columns: 0.85fr 1.15fr; }
}

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar { position: relative; padding: 48px 0; background: var(--bg-1); }

.trust-bg { position: absolute; inset: 0; z-index: 0; }

.trust-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.trust-item { display: flex; align-items: flex-start; gap: 14px; }

.trust-item svg { width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; }

.trust-item strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text-0); margin-bottom: 2px; }

.trust-item span { font-size: 13px; color: var(--text-2); }

@media (min-width: 860px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   SERVICES GRID
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.service-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-card:hover { transform: translateY(-4px); border-color: var(--line); }

.service-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-0);
  margin: 0 0 10px;
  line-height: 1.3;
}

.service-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 18px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold);
}

.service-link i { font-size: 12px; transition: transform 0.15s ease; }

.service-link:hover i { transform: translateX(3px); }

@media (min-width: 700px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   TIMELINE (ЭТАПЫ)
   ============================================================ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step:last-child { border-bottom: none; }

.step-num {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

.step-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
  margin: 6px 0 6px;
}

.step-body p { font-size: 14px; color: var(--text-2); margin: 0 0 8px; line-height: 1.6; }

.step-time {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ============================================================
   TEAM
   ============================================================ */

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.team-card {
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
}

.team-avatar {
  width: 92px; height: 92px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
  border: 2px solid var(--line);
}

.team-avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-0);
  margin: 0 0 4px;
}

.team-role { font-size: 13px; font-weight: 700; color: var(--gold); margin: 0 0 10px; }

.team-bio { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0; }

@media (min-width: 700px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .team-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   REVIEWS
   ============================================================ */

.reviews-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  scroll-snap-align: start;
  flex: 0 0 100%;
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 26px 24px;
}

.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.review-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.review-head strong { display: block; font-size: 14.5px; color: var(--text-0); }

.review-head span { font-size: 12.5px; color: var(--text-2); }

.review-stars { display: flex; gap: 3px; margin-bottom: 12px; }

.review-stars::before {
  content: '★★★★★';
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 2px;
}

.review-card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
  margin: 0 0 10px;
}

.review-card p { font-size: 13.5px; line-height: 1.65; color: var(--text-2); margin: 0; }

.reviews-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; }

.rev-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.rev-btn:hover:not(:disabled) { background: var(--gold-soft); }
.rev-btn:disabled { opacity: 0.35; cursor: default; }

.rev-dots { display: flex; gap: 8px; }

.rev-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--line-soft);
  display: inline-block;
  cursor: pointer;
}

.rev-dots button.is-active { background: var(--gold); }

@media (min-width: 700px) {
  .review-card { flex: 0 0 calc(50% - 11px); }
}

@media (max-width: 699px) {
  .hero-themis {
    background-image: url('assets/img/themis-mobile.png');
    background-position: center 48%;
    opacity: 0.42;
  }
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 4px 4px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-0);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }

.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background: var(--gold);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before { width: 14px; height: 2px; }
.faq-icon::after { width: 2px; height: 14px; transition: transform 0.2s ease; }

.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg) scale(0); }

.faq-body { padding: 0 20px 20px; }

.faq-body p { font-size: 14px; line-height: 1.7; color: var(--text-2); margin: 0; }

/* ============================================================
   CONTACTS
   ============================================================ */

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.contacts-photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--line-soft);
}

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

.photo-badge {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5,13,36,0.9);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 16px;
  backdrop-filter: blur(6px);
}

.photo-badge i { color: var(--gold); font-size: 18px; }

.photo-badge strong { display: block; font-size: 13.5px; color: var(--text-0); }

.photo-badge span { font-size: 12px; color: var(--text-2); }

.contacts-info { display: flex; flex-direction: column; gap: 22px; }

.contact-block h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}

.contact-block p { font-size: 14.5px; line-height: 1.6; color: var(--text-1); margin: 0; }

.map-link:hover { text-decoration: underline; }

.lead-form-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 32px 26px;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 780px) {
  .contacts-grid { grid-template-columns: 1fr 1fr; }
  .lead-form-wide { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1080px) {
  .contacts-grid { grid-template-columns: 1fr 0.8fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer { position: relative; background: var(--bg-0); padding-top: 64px; overflow: hidden; }

.footer-bg { position: absolute; inset: 0; z-index: 0; }

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 48px;
}

.footer-col h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-0);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}

.footer-tag { font-size: 14px; line-height: 1.7; color: var(--text-2); margin: 14px 0 0; max-width: 320px; }

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a { font-size: 14px; color: var(--text-2); transition: color 0.15s ease; }

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  padding: 20px 0;
}

.footer-bottom p { font-size: 13px; color: var(--text-3); margin: 0; text-align: center; }

@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ============================================================
   COOKIE BAR
   ============================================================ */

.cookie {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 500;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
  margin: 0 auto;
}

/* The component sets display:flex, so explicitly honour the hidden attribute. */
.cookie[hidden] { display: none !important; }

.cookie span { font-size: 13px; line-height: 1.6; color: var(--text-1); }

.cookie a { text-decoration: underline; color: var(--gold); }

.cookie .btn { flex-shrink: 0; padding: 10px 20px; font-size: 13.5px; }

/* ============================================================
   RISE-IN ANIMATION HOOK
   ============================================================ */

[data-rise] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-rise].is-visible,
[data-rise]:not(.js-rise-pending) {
  opacity: 1;
  transform: none;
}

/* ============================================================
   INTL-TEL-INPUT — МИНИМАЛЬНЫЙ ФИКС (НЕ ТРОГАЕМ ФЛАГИ)
   ============================================================ */

.iti {
  display: block !important;
  width: 100% !important;
}

.iti__tel-input {
  width: 100% !important;
  padding: 13px 16px 13px 112px !important;
  font-size: 15px !important;
  font-family: 'Manrope', sans-serif !important;
  background: #f5f7fc !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: #1a1f3a !important;
  transition: border-color 0.18s ease, background 0.18s ease !important;
  box-sizing: border-box !important;
  min-height: 50px !important;
}

.iti__tel-input:focus {
  outline: none !important;
  border-color: #f4b942 !important;
  background: white !important;
  box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.15) !important;
}

.iti__flag-container {
  padding: 0 !important;
  margin: 0 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  background: transparent !important;
  width: 106px !important;
}

.iti__selected-flag {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 12px 0 16px !important;
  height: 100% !important;
  min-height: 48px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 10px 0 0 10px !important;
  cursor: pointer !important;
}

.iti__selected-flag:hover { background: rgba(0, 0, 0, 0.04) !important; }

/* Код выбранной страны должен оставаться контрастным рядом с флагом. */
.iti__selected-dial-code {
  display: inline-block !important;
  color: #1a1f3a !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 480px) {
  .iti__tel-input { padding-left: 102px !important; }
  .iti__flag-container { width: 96px !important; }
  .iti__selected-flag { padding-left: 12px !important; padding-right: 8px !important; gap: 4px !important; }
  .iti__selected-dial-code { font-size: 13px !important; }
}

.success-popup[hidden] { display: none; }
.success-popup { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(5, 13, 36, .75); backdrop-filter: blur(8px); }
.success-popup__content { position: relative; width: min(100%, 460px); padding: 36px 28px 30px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.success-popup h3 { margin: 0 0 10px; color: var(--text-dark); font-family: var(--font-serif); font-size: 26px; }
.success-popup p { margin: 0; color: var(--text-1); line-height: 1.6; }
.success-popup__close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: var(--text-dark); font-size: 28px; cursor: pointer; }

/* ===== ФЛАГИ НЕ ТРОГАЕМ — библиотека сама подгружает спрайт ===== */

/* ============================================================
   FIX intl-tel-input — ФИНАЛЬНЫЙ УБИЙЦА ШАХМАТ
   ============================================================ */

.iti__country-list {
  background: #fff !important;
  color: #1a1f3a !important;
  border: 1px solid #ddd !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  columns: 1 !important;
  column-count: 1 !important;
  width: 100% !important;
  min-width: 240px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.iti__country {
  background: #fff !important;
  color: #1a1f3a !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid #f0f2f7 !important;
  float: none !important;
  clear: both !important;
  margin: 0 !important;
  line-height: normal !important;
  min-height: 36px !important;
}

.iti__country:hover {
  background: #f5f7fc !important;
}

.iti__country.iti__highlight {
  background: #eef3ff !important;
}

.iti__dial-code {
  color: #666 !important;
  margin-left: auto !important;
  padding-left: 12px !important;
  font-size: 13px !important;
}

.iti__search-input {
  background: #fff !important;
  color: #1a1f3a !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  margin: 4px 8px !important;
  width: calc(100% - 16px) !important;
}

.iti__search-input::placeholder {
  color: #999 !important;
}
