:root { --container: 1180px; }
* { box-sizing: border-box; }
html, body { margin:0; padding:0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:#0f172a; }
a { color:#0f172a; text-decoration:none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-header{
  position: sticky; /* keep header stuck to top on scroll */
  top: 0;
  z-index: 1000;
  background: #fff; /* ensure header stays opaque above content */
}
.header-inner {
  justify-content: center; /* центрируем меню и логотип */
  gap: 24px;
  height: 56px; /* было 64px */
}
html{ scroll-padding-top: 64px; }
.logo {
  font-weight: 700;
  margin-right: 20px;
}
.nav {
  display: flex;
  justify-content: center; /* центр по горизонтали */
  flex-wrap: wrap;
  gap: 16px;
}
.nav a { padding:8px 10px; border-radius:8px; }
.nav a.active, .nav a:hover { background:#f1f5f9; text-decoration:none; }
.cta {
  margin-left: 20px;
  padding: 8px 14px;
  border-radius: 8px;
}
.hero {
  padding-top: 26px;  /* было 64px */
  padding-bottom: 20px; /* чуть меньше нижний отступ */
}
.hero h1 { font-size:40px; line-height:1.1; margin:0 0 10px; }
.hero p { max-width:720px; font-size:18px; color:#334155; }
.hero-cta { display:flex; gap:10px; margin-top:18px; }
.btn { display:inline-block; background:#0f172a; color:#fff; padding:12px 16px; border-radius:10px; }
.btn.ghost { background:#e2e8f0; color:#0f172a; }
.btn.small { padding:8px 12px; font-size:14px; }
.section { padding:36px 0 64px; }
.list { line-height:1.9; }
.stats { background:#0f172a; color:#fff; padding:20px 0; }
.stats-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:20px; }
.stats .num { font-size:28px; font-weight:700; display:block; }
.stats .lbl { color:#cbd5e1; display:block; }
.features-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:24px; }
.features-grid article { background:#f8fafc; padding:20px; border-radius:12px; }
.map { height:400px; border-radius:12px; border:1px solid #e5e7eb; }
.map-note { color:#64748b; }
.schemes-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.schemes-grid img { width:100%; height:220px; object-fit:cover; border:1px solid #e5e7eb; border-radius:10px; }
.cards { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.card { border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; background:#fff; }
.card-media { height:160px; background-size:cover; background-position:center; }
.card-body { padding:14px; }
.muted { color:#64748b; }
.filters { display:flex; gap:12px; align-items:end; margin-bottom:16px; flex-wrap: wrap; }
.filters label { display:flex; flex-direction:column; gap:6px; font-size:14px; }
.filters input, .filters select, textarea { padding:10px; border:1px solid #e5e7eb; border-radius:10px; }
.contact-grid { display:grid; grid-template-columns: 1.1fr 1fr; gap:24px; }
.site-footer { border-top:1px solid #e5e7eb; padding:20px 0; background:#fff; }
.footer-inner { display:flex; align-items:center; justify-content:space-between; }
.gallery-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:10px; }
.gallery-grid img { width:100%; height:160px; object-fit:cover; border-radius:10px; }
.news-item { padding:16px 0; border-bottom:1px solid #e5e7eb; }
@media (max-width: 960px) {
  .features-grid { grid-template-columns:1fr; }
  .cards { grid-template-columns:1fr 1fr; }
  .gallery-grid { grid-template-columns:1fr 1fr; }
  .stats-grid { grid-template-columns:1fr 1fr; }
  .contact-grid { grid-template-columns:1fr; }
  .schemes-grid { grid-template-columns:1fr; }
}
.form-status{margin-top:0px;font-size:14px;color:#334155}.form-status.ok{color:green}.form-status.err{color:#b91c1c}
/* Hero slider */
.hero-slider { margin: 10px 0 18px; width:100%; height: 340px; border-radius: 12px; overflow: hidden; border:1px solid #e5e7eb; }
.hero-slider .swiper-slide { width:100%; height:100%; }
.hero-slider img { width:100%; height:100%; object-fit: cover; display:block; }
.hero .swiper-pagination-bullets { bottom: 8px !important; }
@media (max-width: 960px){
  .hero-slider { height: 240px; }
}

/* Improved form layout */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.field input,.field select,.field textarea{padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.field-full{grid-column:1/-1}
.hint{color:#64748b;font-size:12px}
#contact-form .btn{margin-top:8px}
@media(max-width:860px){.form-grid{grid-template-columns:1fr}}
.invalid{border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.08)}

/* --- Hero overlay text over slider --- */
.hero .container { position: relative; }
.hero-slider { position: relative; z-index: 1; }

/* затемняем фото лёгким градиентом, чтобы текст читался */
.hero-slider::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 20%, rgba(0,0,0,0.35) 100%);
  pointer-events: none; z-index: 2;
}

/* блок с текстом поверх фото */
.hero-overlay {
  position: absolute; z-index: 3;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 880px;
  color: #fff;
  background: rgba(15,23,42,0.55);
  backdrop-filter: saturate(120%) blur(2px);
  padding: 16px 18px;
  border-radius: 12px;
}
.hero-overlay h1 { margin: 0 0 10px; color:#fff; font-size: 32px; line-height: 1.15; }
.hero-overlay p  { margin: 0 0 12px; color:#e5e7eb; font-size: 16px; }

/* кнопки на тёмном фоне */
.hero-overlay .btn { background: #fff; color: #0f172a; }
.hero-overlay .btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.7); }

/* адаптив */
@media (max-width: 960px){
  .hero-overlay { left: 12px; right: 12px; bottom: 12px; padding: 12px 14px; }
  .hero-overlay h1 { font-size: 22px; }
  .hero-overlay p  { font-size: 14px; }
}

/* --- Mobile fix (robust): prevent sticky header overlapping the hero --- */
@media (max-width: 960px){
  /* Сильнее специфичность + !important, чтобы перебить любые более ранние правила */
  body .hero { 
    padding-top: 84px !important; /* дефолт, потом JS подставит точную высоту */
  }
  body .site-header{ background:#fff; z-index: 1000; }
  body .hero .container { position: relative !important; }
  body .hero-overlay{ z-index: 3 !important; }
  body .hero-slider{ z-index: 1 !important; }
}