:root {
  --primary: #0b1320;
  --primary-light: #1c2541;
  --accent: #f77f00;
  --accent-hover: #e06c00;
  --accent-soft: rgba(247, 127, 0, 0.12);
  --bg: #f4f6f8;
  --white: #ffffff;
  --text: #1a1a1a;
  --muted: #5a6570;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-soft: 0 4px 18px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Top bar */
.topbar {
  background: var(--primary);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 0.45rem 1.5rem;
}
.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar a { color: #fff; font-weight: 500; }
.topbar a:hover { color: var(--accent); }
.topbar-links { display: flex; gap: 1.2rem; align-items: center; }

/* Header */
.header {
  background: var(--white);
  padding: 0.9rem 1.5rem;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
}
.nav {
  display: flex;
  gap: 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a {
  color: var(--text);
  transition: color 0.2s;
  position: relative;
}
.nav a:hover,
.nav a.active { color: var(--accent); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-phone {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  white-space: nowrap;
}
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 18px rgba(247,127,0,0.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid #d0d5dd;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-white {
  background: #fff;
  color: var(--primary);
}
.btn-white:hover { background: #f0f0f0; }

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(105deg, rgba(11,19,32,0.88) 0%, rgba(11,19,32,0.7) 50%, rgba(11,19,32,0.5) 100%),
    url('images/avtodom-exterior.jpg') center 35%/cover no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(247,127,0,0.3);
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.9rem;
  max-width: 620px;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin-bottom: 1.8rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.stat-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}
.hero-btns { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* Sections */
.section {
  padding: 4rem 1.5rem;
}
.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

/* Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.service-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
}
.service-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

/* Features */
.features {
  background: var(--primary);
  color: #fff;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  text-align: center;
  padding: 1.2rem;
}
.feature-item .icon {
  font-size: 2rem;
  margin-bottom: 0.7rem;
}
.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.feature-item p {
  opacity: 0.8;
  font-size: 0.92rem;
}

/* About preview */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.about-preview img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 360px;
  object-fit: cover;
  width: 100%;
}
.about-preview h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.about-preview p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.about-list {
  list-style: none;
  margin: 1.2rem 0 1.5rem;
}
.about-list li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-weight: 500;
}
.about-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 800;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}
.gallery-grid .main {
  grid-row: span 2;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 420px;
}
.gallery-grid .side {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 200px;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-grid a:hover img { transform: scale(1.03); }

/* Page hero (inner pages) */
.page-hero {
  background: var(--primary);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.page-hero p {
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.contact-card .icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.contact-card p, .contact-card a { color: var(--muted); font-size: 0.95rem; }
.contact-card a:hover { color: var(--accent); }

/* Form */
.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e0e4e8;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fafbfc;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}
.form-success.show { display: block; }
.form-success h3 { color: #16a34a; margin-bottom: 0.5rem; }

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 2.8rem 1.5rem 1.8rem;
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}
.footer strong { color: #fff; }
.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.4rem; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1140px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.mobile-nav.show { display: flex; }
.mobile-nav a { color: #fff; }
.mobile-nav .close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .about-preview { grid-template-columns: 1fr; }
  .about-preview img { height: 280px; order: -1; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .main { grid-row: auto; min-height: 260px; }
}
@media (max-width: 768px) {
  .nav, .header-phone { display: none; }
  .burger { display: block; }
  .hero { min-height: 460px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-inner { justify-content: center; text-align: center; }
}
