:root {
  --header-bg: #0d2137;
  --header-height: 88px;
  --text-light: #e8eef4;
  --accent: #5f9805;
  --footer-bg: #1f3420;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  font-family: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-height);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}

/* Шапка */
.site-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: linear-gradient(180deg, rgba(16, 42, 18, 0.96) 0%, rgba(20, 50, 21, 0.95) 100%);
  flex-shrink: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: linear-gradient(180deg, rgba(27, 66, 28, 0.97) 0%, rgba(39, 89, 35, 0.95) 100%);
  box-shadow: 0 8px 20px rgba(16, 40, 18, 0.35);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.header-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
}

.header-side-left {
  justify-content: flex-start;
}

.header-side-right {
  justify-content: flex-end;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.35rem;
}

.header-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
}

.header-burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.header-burger span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.header-nav a,
.header-nav .header-nav-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.1);
}

.header-nav a.active,
.header-nav .header-nav-link.active {
  background: rgba(255,255,255,0.22);
  font-weight: 600;
  border-bottom: 2px solid #fff;
  padding-bottom: calc(0.5rem - 2px);
}

.header-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.header-contacts a {
  color: var(--text-light);
  text-decoration: none;
}

/* Основной контент */
.main-content {
  flex: 1;
  min-height: 0;
  padding-bottom: 2rem;
}

.main-content h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f5f27;
}

/* Футер — прибит к низу экрана, сверху отступ */
.site-footer {
  background: linear-gradient(180deg, rgba(31, 52, 32, 0.94) 0%, rgba(42, 71, 43, 0.93) 100%);
  color: var(--text-light);
  padding: 2rem 0;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 3rem;
  margin-bottom: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-inner a {
  color: #c6e9a9;
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Слайдер на весь экран до низа */
.hero-slider {
  height: calc(100vh - var(--header-height));
  min-height: 400px;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.hero-slider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
}

.slide-caption {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  color: #fff;
  width: min(90%, 900px);
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.slide-caption h2 {
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
}

.slide-caption p {
  font-size: clamp(1rem, 2.2vw, 2rem);
}

.slide-cta-btn {
  margin-top: 1.1rem;
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #5f9805 0%, #7ac541 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(95, 152, 5, 0.32);
}

.slide-cta-btn:hover {
  filter: brightness(0.95);
}

.hero-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 12px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.hero-arrow:hover {
  background: rgba(0,0,0,0.55);
}

.hero-arrow-left { left: 18px; }
.hero-arrow-right { right: 18px; }

.hero-slider-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background 0.2s;
}

.hero-slider-dots button.active,
.hero-slider-dots button:hover {
  background: #fff;
}

.hero-slider-dots button.active {
  border: 2px solid #0d2137;
}

.home-catalog-preview {
  padding: 64px 1.5rem;
}

.home-catalog-preview-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.home-catalog-preview h2 {
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--header-bg);
}

.home-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-catalog-grid .product-card {
  background: #fff;
  border: 1px solid #dce8d6;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(36, 91, 38, 0.08);
}

.home-catalog-grid .product-card img,
.home-catalog-grid .product-card-noimg {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
}

.home-catalog-grid .product-card-noimg {
  background: #e2e8f0;
}

.home-catalog-grid .product-card-body {
  padding: 0.9rem 1rem 1rem;
}

.home-catalog-grid .product-card-body h3 {
  margin-bottom: 0.35rem;
  color: var(--header-bg);
  font-size: 1rem;
}

.home-catalog-grid .product-price {
  margin: 0;
  color: #335f2a;
  font-weight: 600;
}

.home-catalog-cta {
  margin-top: 1rem;
  text-align: center;
}

.home-catalog-grid .product-buy-btn {
  margin-top: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.48rem 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  background: linear-gradient(135deg, #5f9805 0%, #7ac541 100%);
}

.home-catalog-grid .product-buy-btn:hover {
  filter: brightness(0.95);
}

/* Блоки текста */
.text-blocks {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  gap: 2rem;
}

.text-block {
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.text-block h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--header-bg);
}

/* Дизайнерские решения */
.design-section {
  padding: 3rem 1.5rem;
  background: linear-gradient(180deg, #f6fbf2 0%, #ffffff 100%);
}

.design-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.design-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--header-bg);
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.design-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dce8d6;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(36, 91, 38, 0.08);
  position: relative;
}

.design-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(47, 143, 47, 0.3) 0%, rgba(243, 197, 49, 0.3) 100%);
  z-index: 1;
}

.design-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.design-card-body {
  padding: 1.5rem;
}

.design-card-body h3 {
  margin-bottom: 0.5rem;
  color: var(--header-bg);
}

.design-card-body p {
  color: #475569;
  margin-bottom: 1rem;
}

.design-card-body .btn-catalog {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.design-card-body .btn-catalog:hover {
  background: #4f7f10;
}

.design-cta-wrap {
  margin-top: 1.25rem;
  text-align: center;
}

.design-cta-btn {
  display: inline-flex;
  width: auto;
  text-align: center;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #5F9805 0%, #7AC541 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: filter 0.2s;
}

.design-cta-btn:hover {
  filter: brightness(0.95);
}

/* Наши адреса */
.addresses-section {
  padding: 3rem 0;
}

.addresses-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.addresses-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--header-bg);
}

.addresses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.address-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.address-card .map-wrap {
  height: 240px;
  background: #e2e8f0;
}

.address-meta {
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.address-meta-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.address-meta-line {
  display: block;
  color: #475569;
  text-decoration: none;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

/* Главная: блок «Наши преимущества» (8 карточек) */
.advantages-section {
  padding: 4rem 1.5rem 64px;
  background: #ffffff;
}

.advantages-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.advantages-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f5f27;
  margin-bottom: 0.75rem;
}

.advantages-subtitle {
  max-width: 760px;
  margin: 0 auto 2.4rem;
  text-align: center;
  color: #4b5563;
  font-size: 1.02rem;
  line-height: 1.65;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.adv-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffdf5 100%);
  border-radius: 8px;
  border: 1px solid #dce8d6;
  box-shadow: 0 8px 20px rgba(36, 91, 38, 0.08);
  padding: 1.25rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
}

.adv-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, rgba(47, 143, 47, 0.3) 0%, rgba(243, 197, 49, 0.3) 100%);
}

.adv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(36, 91, 38, 0.16);
  border-color: #cbe0c1;
}

.adv-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(47, 143, 47, 0.14) 0%, rgba(243, 197, 49, 0.14) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(47, 143, 47, 0.08);
}

.adv-icon {
  width: 32px;
  height: 32px;
}

.adv-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1f2937;
  margin-bottom: 0.55rem;
}

.adv-caption {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #9ca3af;
  font-weight: 500;
}

@media (max-width: 900px) {
  .advantages-title {
    font-size: 1.75rem;
  }

  .advantages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .advantages-section {
    padding: 3.25rem 1rem 64px;
  }

  .advantages-title {
    font-size: 1.55rem;
  }

  .advantages-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.8rem;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }
}

.installation-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.installation-page h1 {
  margin-bottom: 1.5rem;
  color: var(--header-bg);
}

.installation-content {
  line-height: 1.7;
}

.installation-content p {
  margin-bottom: 1rem;
}

/* Главная: блок "О компании" */
.about-company-section {
  padding: 2.8rem 1.5rem 0.5rem;
}

.about-company-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.about-company-title {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1f2937;
  font-size: 1.65rem;
  margin-bottom: 1rem;
}

.about-company-card {
  border-top: 4px solid #f3c531;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 1.2rem;
}

.about-company-visual {
  border-radius: 8px;
  min-height: 280px;
  padding: 1rem;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(37, 99, 45, 0.92) 0%, rgba(22, 163, 74, 0.85) 62%, rgba(250, 204, 21, 0.82) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
}

.about-company-visual img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 8px;
}

.about-company-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.about-company-visual-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  max-width: 250px;
}

.about-company-content p {
  font-size: 1.02rem;
  line-height: 1.55;
  color: #374151;
  margin-bottom: 0.65rem;
}

.about-company-sign {
  margin-top: 0.8rem;
  color: #111827;
  font-weight: 600;
}

.reviews-section {
  padding: 3rem 1.5rem 0.5rem;
}

.reviews-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.reviews-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reviews-head h2 {
  color: var(--header-bg);
}

.reviews-all-btn {
  border: 1px solid #c9dcbd;
  background: #fff;
  color: #335f2a;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-weight: 500;
}

.reviews-preview-grid,
.reviews-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.review-card {
  background: #fff;
  border: 1px solid #dce8d6;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 5px 16px rgba(36, 91, 38, 0.06);
}

.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.review-meta {
  color: #6b7280;
  font-size: 0.86rem;
  margin-bottom: 0.6rem;
}

.review-rating {
  color: #d4a80a;
  font-weight: 600;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.popup-overlay.open {
  display: flex;
}

.popup {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: min(95vw, 560px);
  max-height: 92vh;
  overflow: auto;
  position: relative;
}

.popup h3 {
  margin-bottom: 1rem;
  color: var(--header-bg);
}

.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
}

.popup label {
  display: block;
  margin-bottom: 0.85rem;
}

.popup label span {
  display: block;
  margin-bottom: 0.3rem;
  color: #475569;
}

.popup input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.popup-policy {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.popup-policy input {
  width: auto;
  margin-top: 0.2rem;
}

.btn-submit {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #5f9805 0%, #7ac541 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.popup-wide {
  width: min(95vw, 840px);
}

.popup-wide-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.2rem;
}

.popup-side-image {
  border-radius: 10px;
  background: linear-gradient(140deg, #5f9805 0%, #7ac541 65%, #f3c531 100%);
  min-height: 320px;
}

.popup-reviews {
  width: min(96vw, 1200px);
}

.scroll-top-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #5f9805 0%, #7ac541 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(95, 152, 5, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Адаптив шапки */
@media (max-width: 900px) {
  .header-inner {
    height: var(--header-height);
    gap: 0.75rem;
  }

  .header-side-right {
    display: none;
  }

  .header-burger {
    display: inline-flex;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 1rem;
    right: 1rem;
    background: rgba(20, 50, 21, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.55rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    box-shadow: 0 12px 24px rgba(8, 20, 9, 0.35);
  }

  .site-header.menu-open .header-nav {
    display: flex;
  }

  .header-nav .header-nav-link {
    width: 100%;
    text-align: left;
  }

  .header-contacts {
    align-items: flex-end;
  }

  .home-one-block-inner {
    grid-template-columns: 1fr;
  }

  .home-one-stats {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .about-company-card {
    grid-template-columns: 1fr;
  }

  .about-company-visual {
    min-height: 180px;
  }

  .reviews-preview-grid,
  .reviews-modal-grid {
    grid-template-columns: 1fr;
  }

  .popup-wide-grid {
    grid-template-columns: 1fr;
  }

  .popup-side-image {
    min-height: 180px;
  }

  .home-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .header-inner {
    gap: 0.6rem;
  }

  .header-logo span {
    font-size: 1rem;
  }

  .header-nav {
    left: 0.75rem;
    right: 0.75rem;
  }

  .addresses-grid {
    grid-template-columns: 1fr;
  }

  .home-catalog-grid {
    grid-template-columns: 1fr;
  }

}
