:root {
  --green-50: #eefbf1;
  --green-100: #d7f5df;
  --green-400: #34c05c;
  --green-500: #1fa84a;
  --green-600: #17863c;
  --green-700: #136a31;

  --bg: #f7f9f7;
  --surface: #ffffff;
  --surface-2: #eef3ee;
  --text: #15201a;
  --muted: #5c6b62;
  --line: #e2e8e3;
  --shadow: 0 10px 30px rgba(20, 40, 25, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 40, 25, 0.16);
  --hero-bg: linear-gradient(160deg, #102318 0%, #1d3a28 55%, #2a5238 100%);
  --hero-text: #ffffff;
}

[data-theme="dark"] {
  --bg: #0e1510;
  --surface: #16201a;
  --surface-2: #1d2a22;
  --text: #e7efe9;
  --muted: #9aab9f;
  --line: #26332b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --hero-bg: linear-gradient(160deg, #0a130d 0%, #122019 55%, #1b3525 100%);
  --hero-text: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

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

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.brand__logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__sub { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.brand__name { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; }

.nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav__link {
  padding: 0.5rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__link:hover { background: var(--surface-2); color: var(--green-600); }

.header__actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--green-500); }
.theme-toggle__icon { position: absolute; transition: opacity 0.25s ease, transform 0.35s ease; }
.theme-toggle__icon--moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle__icon--sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle__icon--moon { opacity: 1; transform: rotate(0) scale(1); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn--primary { background: var(--green-600); color: #fff; }
.btn--primary:hover { background: var(--green-500); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31, 168, 74, 0.35); }
.btn--ghost { background: transparent; color: var(--green-600); border-color: var(--green-600); }
.btn--ghost:hover { background: var(--green-50); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-text); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; padding: 4.5rem 1.25rem; }
.hero__eyebrow { color: var(--green-400); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 0.75rem; }
.hero__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.hero__text { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 520px; margin-bottom: 1.75rem; }
.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.1); }

.hero__media { position: relative; }
.hero__img { border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; height: 320px; object-fit: cover; }

/* Sections */
.section { padding: 4rem 0; }
.section--tint { background: var(--surface-2); }
.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 0.75rem; }
.section__lead { color: var(--muted); max-width: 720px; margin-bottom: 2rem; }

/* Advantages */
.advantages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.advantage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  font-weight: 600;
}
.advantage__mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--green-100);
  color: var(--green-700);
  border-radius: 8px;
  font-weight: 800;
}
[data-theme="dark"] .advantage__mark { background: rgba(31,168,74,0.2); color: var(--green-400); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: left;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--text);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--green-500); }
.service__icon { width: 60px; height: 60px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; }
.service__icon img { width: 40px; height: 40px; object-fit: contain; }
.service__title { font-size: 1.05rem; font-weight: 700; }
.service__short { color: var(--muted); font-size: 0.92rem; }
.service__more { color: var(--green-600); font-weight: 600; font-size: 0.9rem; }

/* News */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.news__loading { color: var(--muted); grid-column: 1 / -1; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card__img { width: 100%; height: 160px; object-fit: cover; background: var(--surface-2); }
.news-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.news-card__tag { align-self: flex-start; background: var(--green-100); color: var(--green-700); font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; }
[data-theme="dark"] .news-card__tag { background: rgba(31,168,74,0.2); color: var(--green-400); }
.news-card__title { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.news-card__date { color: var(--muted); font-size: 0.82rem; margin-top: auto; }

/* Contacts */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contacts__info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-item__label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-item__value { font-size: 1.05rem; font-weight: 600; }
.contact-item__value--link { color: var(--green-600); text-decoration: none; }
.contact-item__value--link:hover { text-decoration: underline; }
.contacts__map { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); min-height: 320px; }
.contacts__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 1.5rem 0; background: var(--surface); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.footer__logo { width: 34px; height: 34px; border-radius: 8px; }
.footer__lic { color: var(--muted); font-size: 0.82rem; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); animation: fade 0.2s ease; }
.modal__dialog {
  position: relative;
  max-width: 640px;
  width: calc(100% - 2rem);
  max-height: 84vh;
  overflow-y: auto;
  margin: 8vh auto 0;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.25s ease;
}
.modal__close {
  position: sticky; top: 0; float: right;
  width: 40px; height: 40px;
  margin: 0.75rem;
  border: none; background: var(--surface-2);
  color: var(--text);
  border-radius: 50%;
  font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.modal__close:hover { background: var(--line); }
.modal__body { padding: 1.5rem 1.75rem 2rem; }
.modal__body h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 1rem; }
.modal__body ul { margin: 0.75rem 0 0.75rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.modal__body p { margin-bottom: 0.75rem; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Responsive */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding: 3rem 1.25rem; }
  .hero__img { height: 240px; }
  .advantages { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .news { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 72px 0 0 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav.open { transform: translateX(0); }
  .nav__link { padding: 0.9rem; font-size: 1.05rem; }
  .burger { display: flex; }
  .header__cta { display: none; }
}

@media (max-width: 560px) {
  .advantages { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .news { grid-template-columns: 1fr; }
}
