@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:  #e07b2a;
  --orange-d:#c5681c;
  --green:   #3a7d44;
  --green-d: #2e6336;
  --text:    #f0f0f0;
  --text-2:  #999999;
  --bg:      #111111;
  --bg-2:    #1a1a1a;
  --bg-3:    #222222;
  --border:  #2e2e2e;
  --radius:  10px;
  --shadow:  0 2px 8px rgba(0,0,0,.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.15rem; font-weight: 600; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 72px 0; }
.section--gray { background: var(--bg-2); }

/* ── Светлая секция: переопределяем переменные локально ── */
.section--light {
  --bg:      #ffffff;
  --bg-2:    #ffffff;
  --bg-3:    #f4f4f4;
  --text:    #111111;
  --text-2:  #6b6b6b;
  --border:  #e5e5e5;
  --shadow:  0 4px 16px rgba(0,0,0,.06);
  background: #ffffff;
  color: #111111;
}
.section--light .section-title { color: #111; }
.section--light .section-sub   { color: #6b6b6b; }
.section--light .service-card,
.section--light .catalog-card,
.section--light .review-card,
.section--light .why-card,
.section--light .service-step {
  background: #fff;
  border-color: #e5e5e5;
}
.section--light .service-card:hover,
.section--light .catalog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.section--light h1, .section--light h2, .section--light h3, .section--light h4 { color: #111; }
.section--light p { color: #4a4a4a; }
.section--light .review-author { color: #111; }
.section--light .review-date { color: #888; }
.section--light .filter-btn { background: #fff; border-color: #e0e0e0; color: #333; }
.section--light .filter-btn:hover, .section--light .filter-btn.active { border-color: var(--orange); color: var(--orange); }
.section--light .calc-opt { background: #f4f4f4; color: #111; border-color: #e5e5e5; }
.section--light .calc-result { background: #fafafa; }
.section--light .form-group input,
.section--light .form-group select,
.section--light .form-group textarea {
  background: #fff;
  border-color: #e0e0e0;
  color: #111;
}
.section--light .form-group select option { background: #fff; color: #111; }
.section--light .contact-item h4 { color: #888; }
.section--light .contact-item p,
.section--light .contact-item a { color: #111; }
.section--light .alert-success { background: #e8f7ee; color: #1f6132; border: 1px solid #b9e3c5; }
.section--light .service-price-card { background: #fafafa; }
.section--light .service-price-value { color: var(--orange); }

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-2);
  margin-bottom: 48px;
  max-width: 560px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-d); }
.btn-secondary { background: transparent; color: var(--orange); border-color: var(--orange); }
.btn-secondary:hover { background: var(--orange); color: #fff; }
.btn-green     { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-d); }
.btn-dark      { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.btn-dark:hover { background: #000; border-color: #000; color: #fff; }
.section--light .btn-dark { background: #111; border-color: #111; }
.section--light .btn-dark:hover { background: #2e2e2e; border-color: #2e2e2e; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn:disabled, .btn[disabled] {
  background: #3a3a3a;
  color: #888;
  border-color: #3a3a3a;
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}
.btn-ring {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ring .phone-icon {
  flex-shrink: 0;
  transform-origin: 50% 50%;
  animation: phone-ring 4s ease-in-out infinite;
}
@keyframes phone-ring {
  0%, 60%, 100% { transform: rotate(0deg); }
  3%, 9%, 15%   { transform: rotate(-18deg); }
  6%, 12%, 18%  { transform: rotate(18deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-ring .phone-icon { animation: none; }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #161616;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--orange); }

.nav { display: flex; gap: 28px; list-style: none; }
.nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color .15s;
}
.nav a:hover, .nav a.active { color: var(--orange); }

.header-cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-phone { font-weight: 600; font-size: .95rem; }

.burger {
  display: none; flex-direction: column;
  gap: 6px; cursor: pointer;
  padding: 10px;
  margin-right: -10px;
  background: none; border: none;
}
.burger span {
  display: block;
  width: 28px; height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
  transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
body.nav-locked { overflow: hidden; }
.nav-mobile-cta { display: none; }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 640px;
  height: calc(100vh - 68px);
  max-height: 820px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.7) 45%, rgba(10,10,10,.25) 75%, rgba(10,10,10,.1) 100%),
    linear-gradient(180deg, rgba(10,10,10,.4) 0%, rgba(10,10,10,.1) 40%, rgba(10,10,10,.55) 100%);
}
.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-content { max-width: 640px; }
.hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hero-feature {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, transform .2s;
}
.hero-feature:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(224,123,42,.5);
  transform: translateY(-2px);
}
.hero-feature-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.hero-feature-icon svg { width: 22px; height: 22px; fill: #fff; }
.hero-feature strong {
  display: block;
  color: #fff;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}
.hero-feature span {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  line-height: 1.35;
}
.hero-label {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 22px;
  color: #fff;
}
.hero-sub {
  color: rgba(255,255,255,.85);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.55;
  margin-bottom: 36px;
  max-width: 560px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btns .btn-secondary {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-color: rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
}
.hero-btns .btn-secondary:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.hero-stats {
  display: flex; gap: 48px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat strong { display: block; font-size: 2rem; font-weight: 700; color: var(--orange); line-height: 1; }
.hero-stat span { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: 6px; display: block; }

/* ── Services grid ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.service-card-img { position: relative; overflow: hidden; background: var(--bg-3); }
.service-card-img img {
  width: 100%; height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.service-card:hover .service-card-img img { transform: scale(1.04); }
.service-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.service-link { margin-top: auto; }
.service-icon {
  width: 48px; height: 48px;
  background: var(--orange);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.service-icon svg { width: 24px; height: 24px; fill: #fff; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--text-2); font-size: .9rem; margin-bottom: 14px; }
.service-link {
  display: inline-block;
  color: var(--orange);
  font-size: .88rem;
  font-weight: 500;
  transition: gap .2s;
}
.service-card:hover .service-link { letter-spacing: .02em; }

/* ── Service detail page ── */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.service-detail-main h2 { font-size: 1.4rem; }
.service-bullets { list-style: none; padding: 0; }
.service-bullets li {
  position: relative;
  padding: 12px 0 12px 32px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: .98rem;
}
.service-bullets li:last-child { border-bottom: none; }
.service-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 12px;
  width: 22px; height: 22px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.service-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.service-step {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.service-step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.service-detail-side { position: sticky; top: 88px; }
.service-price-card {
  padding: 28px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.service-price-label { font-size: .82rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.service-price-value { font-size: 1.8rem; font-weight: 700; margin: 6px 0 4px; color: var(--orange); }
.service-price-term { font-size: .88rem; color: var(--text-2); }

/* ── Why us ── */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { text-align: center; padding: 24px 16px; }
.why-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  margin-bottom: 8px;
}
.why-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.why-icon svg { width: 26px; height: 26px; fill: #fff; }
.why-card h3 { margin-bottom: 8px; font-size: 1rem; }
.why-card p { color: var(--text-2); font-size: .88rem; }

/* ── Catalog grid ── */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.catalog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s;
}
.catalog-card { background: var(--bg-2); }
.catalog-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.5); border-color: var(--orange); }
.catalog-card-img { position: relative; }
.catalog-card-img img { width: 100%; height: 220px; object-fit: cover; }
.catalog-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: var(--radius);
}
.catalog-card-body { padding: 20px; }
.catalog-card-type {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange);
  margin-bottom: 6px;
}
.catalog-card-body h3 { margin-bottom: 6px; font-size: 1rem; }
.catalog-card-body p { color: var(--text-2); font-size: .88rem; margin-bottom: 14px; }
.catalog-price { font-weight: 700; font-size: 1.05rem; color: var(--orange); margin-bottom: 14px; }
.catalog-card-footer {
  padding: 0 20px 20px;
  display: flex; gap: 10px;
}

/* ── Catalog filter ── */
.catalog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--orange); color: var(--orange); }

/* ── Portfolio grid ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.portfolio-card { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.portfolio-card img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s; }
.portfolio-card:hover img { transform: scale(1.04); }
.portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, transparent 60%);
  opacity: 0; transition: opacity .25s;
  display: flex; align-items: flex-end; padding: 16px;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay p { color: #fff; font-size: .85rem; font-weight: 500; }

/* ── CTA Banner ── */
.cta-banner {
  background: var(--orange);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { opacity: .9; margin-bottom: 28px; }
.cta-banner .btn { background: #111; color: var(--orange); }
.cta-banner .btn:hover { background: #000; }

/* ── Calculator ── */
.calc-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.calc-form { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.calc-step { margin-bottom: 28px; }
.calc-step label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.calc-options { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-opt {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  cursor: pointer;
  background: var(--bg-3);
  color: var(--text);
  transition: .15s;
  user-select: none;
}
.calc-opt:hover { border-color: var(--orange); color: var(--orange); }
.calc-opt.selected { border-color: var(--orange); background: var(--orange); color: #fff; }
.calc-extras { display: flex; flex-direction: column; gap: 10px; }
.calc-extra { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.calc-extra input { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }

.calc-result {
  position: sticky;
  top: 88px;
  background: var(--bg-2);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 32px;
}
.calc-result h3 { margin-bottom: 20px; font-size: 1rem; color: var(--text-2); font-weight: 500; }
.calc-price-range { font-size: 2rem; font-weight: 700; color: var(--orange); margin-bottom: 8px; }
.calc-note { font-size: .82rem; color: var(--text-2); margin-bottom: 24px; }
.calc-breakdown { margin-bottom: 24px; }
.calc-row {
  display: flex; justify-content: space-between;
  font-size: .88rem; padding: 8px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.calc-row:last-child { border-bottom: none; }

/* ── Contacts ── */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; }
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--orange);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg { width: 20px; height: 20px; fill: #fff; }
.contact-item h4 { font-size: .82rem; color: var(--text-2); margin-bottom: 2px; }
.contact-item p, .contact-item a { font-weight: 500; color: var(--text); }
.contact-item a:hover { color: var(--orange); }
.map-wrap { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { display: block; }

/* ── Form ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .88rem; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-3);
  transition: border-color .15s;
  outline: none;
}
.form-group select option { background: var(--bg-3); color: var(--text); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--orange); }
.form-group textarea { resize: vertical; min-height: 100px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: .92rem;
}
.alert-success { background: rgba(58,125,68,.15); border: 1px solid var(--green); color: #6fcf7f; }
.alert-error   { background: rgba(224,123,42,.12); border: 1px solid var(--orange); color: var(--orange); }

/* ── Footer ── */
.site-footer {
  background: #0a0a0a;
  color: #aaa;
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--orange); }
.footer-desc { font-size: .88rem; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: .88rem; color: #ccc; transition: color .15s; }
.footer-col ul a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; color: #777;
}

/* ── Page hero (inner pages) ── */
.page-hero {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.page-hero h1 { margin-bottom: 8px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-2);
  margin-bottom: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s;
}
.back-link:hover { color: var(--orange); }
.back-link svg { transition: transform .15s; }
.back-link:hover svg { transform: translateX(-3px); }
.breadcrumb { display: flex; gap: 8px; font-size: .85rem; color: var(--text-2); align-items: center; margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { color: var(--border); }

/* ── Testimonials ── */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.review-stars { color: var(--orange); font-size: 1.1rem; margin-bottom: 10px; }
.review-card { background: var(--bg-2); }
.review-text { font-size: .9rem; color: var(--text-2); margin-bottom: 14px; line-height: 1.65; }
.review-author { font-weight: 600; font-size: .88rem; }
.review-date { font-size: .8rem; color: var(--text-2); margin-top: 2px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden; transition: .2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  position: relative;
  transform: translateY(20px);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; color: var(--text-2); line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal h2 { margin-bottom: 8px; font-size: 1.3rem; }
.modal p { color: var(--text-2); font-size: .9rem; margin-bottom: 24px; }

/* ── Quiz popup ── */
.modal-overlay.quiz-mode { background: rgba(0,0,0,.75); }
.modal-overlay.quiz-mode .modal {
  max-width: 580px; padding: 0; overflow: hidden;
  border: 1px solid #333;
}

/* Индикатор шагов */
.quiz-steps-bar {
  display: flex;
  padding: 20px 28px 0;
  gap: 6px;
}
.quiz-step-dot {
  flex: 1; height: 4px; border-radius: 2px;
  background: #333;
  transition: background .3s;
}
.quiz-step-dot.done  { background: var(--orange); }
.quiz-step-dot.active { background: var(--orange); opacity: .5; }

.quiz-header { padding: 16px 28px 20px; border-bottom: 1px solid var(--border); }
.quiz-step-label { font-size: .75rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.quiz-title    { font-size: 1.2rem; font-weight: 700; }
.quiz-subtitle { font-size: .85rem; color: var(--text-2); margin-top: 4px; }

.quiz-body { padding: 24px 28px; min-height: 200px; }
.quiz-step { display: none; }
.quiz-step.active { display: block; }

.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: #1e1e1e;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.quiz-opt:hover { border-color: var(--orange); }
.quiz-opt.selected { border-color: var(--orange); background: rgba(224,123,42,.12); }
.quiz-opt-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: #2a2a2a;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background .15s;
}
.quiz-opt.selected .quiz-opt-icon { background: var(--orange); }
.quiz-opt-text strong { display: block; font-size: .88rem; font-weight: 600; color: var(--text); }
.quiz-opt-text span   { font-size: .75rem; color: var(--text-2); }

/* Последний шаг — контакты */
.quiz-contact-block { display: flex; flex-direction: column; gap: 14px; }
.quiz-field { display: flex; flex-direction: column; gap: 6px; }
.quiz-field label { font-size: .82rem; font-weight: 500; color: var(--text-2); }
.quiz-field input {
  padding: 13px 16px;
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.quiz-field input:focus { border-color: var(--orange); }
.quiz-field input.invalid {
  border-color: #e53935;
  background: rgba(229,57,53,.06);
}
.quiz-field-error {
  font-size: .78rem;
  color: #e53935;
  margin-top: 6px;
  min-height: 0;
  display: none;
}
.quiz-field-error.visible { display: block; }
.quiz-privacy { font-size: .73rem; color: #555; margin-top: 4px; }

/* Итог */
.quiz-footer {
  padding: 16px 28px 24px;
  display: flex; align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border);
}
.quiz-back {
  background: none; border: none; color: var(--text-2);
  font-size: .85rem; cursor: pointer; padding: 0; flex-shrink: 0;
}
.quiz-back:hover { color: var(--text); }

/* Успех */
.quiz-success { text-align: center; padding: 16px 0 8px; }
.quiz-success-icon { font-size: 3.5rem; margin-bottom: 16px; }
.quiz-success h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.quiz-success p { color: var(--text-2); font-size: .9rem; line-height: 1.6; }

/* ── Filter sidebar (monuments) ── */
.filter-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.filter-sidebar { position: sticky; top: 88px; }
.filter-block {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.filter-title {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 10px;
}
.filter-row {
  display: block;
  padding: 8px 12px;
  font-size: .9rem;
  color: #333;
  border-radius: var(--radius);
  margin-bottom: 4px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.filter-row:hover { background: #f4f4f4; color: #111; }
.filter-row.active { background: var(--orange); color: #fff; font-weight: 500; }
.color-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.filter-results {
  margin-bottom: 20px;
  font-size: .9rem;
  color: #666;
}

/* ── Stones page ── */
.stones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.stone-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.stone-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.stone-card-img { position: relative; }
.stone-card-img img { width: 100%; height: 220px; object-fit: cover; display: block; }
.stone-card-tags {
  position: absolute;
  bottom: 12px; left: 12px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.stone-tag {
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stone-card-body { padding: 22px 22px 20px; }
.stone-card-body h3 { font-size: 1.15rem; margin-bottom: 12px; color: #111; }
.stone-meta {
  font-size: .85rem;
  color: #555;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
  line-height: 1.7;
}
.stone-meta-label { color: #999; font-size: .78rem; margin-right: 4px; }
.stone-card-body p {
  font-size: .9rem;
  line-height: 1.55;
  color: #4a4a4a;
  margin-bottom: 16px;
}

/* ── Чат-помощник ── */
.chat-widget {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 340px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2);
  padding: 20px 18px 16px;
  z-index: 150;
  opacity: 0;
  transform: translateY(20px) scale(.96);
  visibility: hidden;
  transition: opacity .3s, transform .3s, visibility .3s;
  color: #111;
  font-size: 14px;
}
.chat-widget.open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
.chat-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: #aaa; cursor: pointer;
  padding: 0; width: 28px; height: 28px;
}
.chat-close:hover { color: #333; }
.chat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.chat-avatar {
  position: relative;
  width: 44px; height: 44px;
  flex-shrink: 0;
}
.chat-avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #b8551a);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.1rem;
}
.chat-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.chat-avatar .chat-avatar-fallback { display: none; }
.chat-avatar.no-photo .chat-avatar-fallback { display: block; }
.chat-online {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 13px; height: 13px;
  background: #22c55e;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.chat-name { font-weight: 600; color: #111; font-size: .95rem; }
.chat-role { font-size: .78rem; color: #888; }
.chat-bubble {
  background: #f4f4f4;
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  font-size: .9rem;
  line-height: 1.45;
  color: #222;
  margin-bottom: 14px;
}
.chat-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.chat-opt {
  position: relative;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
  text-align: left;
}
.chat-opt:hover { border-color: var(--orange); transform: translateY(-1px); }
.chat-opt img { width: 100%; height: 56px; object-fit: cover; display: block; }
.chat-opt span {
  display: block;
  padding: 6px 6px;
  font-size: .76rem;
  font-weight: 500;
  color: #111;
  text-align: center;
}
.chat-footer {
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.chat-discount {
  flex: 1;
  background: #fff7e8;
  border-radius: 8px;
  padding: 6px 10px;
}
.chat-discount-label { display: block; font-size: .68rem; color: #b8551a; text-transform: uppercase; letter-spacing: .04em; }
.chat-discount-value { display: block; font-weight: 700; font-size: 1rem; color: var(--orange); }
.chat-cta { padding: 11px 22px; font-size: .88rem; flex-shrink: 0; }

/* Свёрнутая кнопка */
.chat-bubble-btn {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 60px; height: 60px;
  background: var(--orange);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 8px 24px rgba(224,123,42,.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.chat-bubble-btn:hover { transform: scale(1.08); }
.chat-bubble-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--orange);
  opacity: .5;
  animation: chat-pulse 2s infinite;
  z-index: -1;
}
@keyframes chat-pulse {
  0%   { transform: scale(1); opacity: .5; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 540px) {
  .chat-widget {
    right: 12px; left: 12px; bottom: 12px;
    width: auto;
  }
  .chat-bubble-btn { right: 16px; bottom: 16px; width: 54px; height: 54px; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .header-cta .btn, .header-phone { display: none; }
  .burger { display: flex; }
  .site-header .container { gap: 12px; padding: 0 14px; height: 60px; }
  #main-nav { display: none; }
  #main-nav.open {
    display: flex; flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    background: #161616;
    padding: 28px 20px 24px;
    z-index: 99;
    overflow-y: auto;
  }
  #main-nav.open .nav {
    flex-direction: column;
    gap: 0;
    list-style: none;
  }
  #main-nav.open .nav li { border-bottom: 1px solid var(--border); }
  #main-nav.open .nav a {
    display: block;
    padding: 16px 4px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
  }
  #main-nav.open .nav a.active { color: var(--orange); }
  .nav-mobile-cta {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  .nav-mobile-phone {
    display: flex; align-items: center; gap: 10px;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    padding: 6px 4px;
  }
  .nav-mobile-phone svg { color: var(--orange); }
  .nav-mobile-btn {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: .98rem;
  }
  .hero {
    min-height: 0;
    height: auto;
    padding: 56px 0 48px;
    align-items: flex-start;
    max-height: none;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-label { margin-bottom: 16px; padding: 4px 12px; font-size: .72rem; }
  .hero h1 { font-size: 1.65rem; line-height: 1.18; margin-bottom: 14px; }
  .hero-sub { font-size: .96rem; margin-bottom: 24px; }
  .hero-btns .btn { width: 100%; text-align: center; }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
    margin-top: 28px;
  }
  .hero-stat strong { font-size: 1.3rem; }
  .hero-stat span { font-size: .72rem; line-height: 1.25; }
  .hero-features {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
  }
  .hero-feature {
    padding: 12px;
    gap: 10px;
  }
  .hero-feature-icon { width: 36px; height: 36px; border-radius: 8px; }
  .hero-feature-icon svg { width: 18px; height: 18px; }
  .hero-feature strong { font-size: .82rem; margin-bottom: 2px; }
  .hero-feature span { font-size: .7rem; line-height: 1.3; }

  .cta-row { gap: 8px; flex-wrap: nowrap; margin-top: 28px; }
  .cta-row .btn { flex: 1; min-width: 0; padding: 11px 12px; font-size: .85rem; }

  .modal-overlay { padding: 12px; }
  .modal-overlay.quiz-mode .modal { max-width: 100%; }
  .quiz-header { padding: 14px 18px 16px; }
  .quiz-title { font-size: 1.05rem; }
  .quiz-subtitle { font-size: .8rem; }
  .quiz-body { padding: 18px; min-height: 0; }
  .quiz-options { grid-template-columns: 1fr; gap: 8px; }
  .quiz-opt { padding: 12px 14px; }
  .quiz-opt-icon { width: 32px; height: 32px; font-size: 1rem; }
  .quiz-opt-text strong { font-size: .9rem; }
  .quiz-opt-text span { font-size: .75rem; }
  .quiz-footer { padding: 14px 18px 18px; gap: 10px; }
  .quiz-back { font-size: .8rem; }

  .why-grid { gap: 12px; }
  .why-card { padding: 18px 12px; }
  .why-icon { width: 42px; height: 42px; margin-bottom: 10px; }
  .why-icon svg { width: 20px; height: 20px; }
  .why-card h3 { font-size: .92rem; line-height: 1.2; margin-bottom: 4px; }
  .why-card p { font-size: .8rem; line-height: 1.4; }
  .section { padding: 48px 0; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .service-card-img img { height: 130px; }
  .service-card-body { padding: 14px 14px 16px; }
  .service-card h3 { font-size: .92rem; line-height: 1.25; }
  .service-card p { font-size: .8rem; margin-bottom: 10px; }
  .service-link { font-size: .82rem; }
  .catalog-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .reviews-grid { grid-template-columns: 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .service-detail-side { position: static; }
  .service-steps { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
}

@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.45rem; }
  .hero-stat strong { font-size: 1.15rem; }
}
