/* =========================
   BASE
========================= */

:root {
  --bg: #0c0c0c;
  --bg-dark: #141414;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #aaaaaa;
  --accent: #00ff99;
  --line: rgba(255,255,255,0.08);
  --danger: #ff8c8c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.header {
  padding: 18px 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  font-size: 20px;
}

nav a {
  margin-left: 18px;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

/* =========================
   HERO
========================= */

.hero {
  min-height: 90vh;
  background: url('/assets/img/hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.hero-content {
  position: relative;
  max-width: 700px;
}

.hero h1 {
  font-size: 48px;
  margin: 0 0 10px;
}

.hero p {
  color: var(--muted);
}

.hero button {
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--accent);
  border: none;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
}

/* =========================
   SECTIONS
========================= */

.section {
  padding: 80px 0;
}

.dark {
  background: var(--bg-dark);
}

/* =========================
   GRID
========================= */

.grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}

.image img {
  width: 100%;
  max-width: 520px;
  border-radius: 14px;
  display: block;
}

/* =========================
   PRODUCTS
========================= */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.card h3 {
  margin: 12px 0 4px;
}

.card p {
  color: var(--muted);
  margin: 0;
}

/* =========================
   CTA
========================= */

.cta {
  text-align: center;
  background: var(--accent);
  color: #000;
  padding: 80px 0;
}

.cta button {
  margin-top: 20px;
  padding: 14px 28px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 10px;
}

/* =========================
   FAQ FIX (ответ не белый на белом)
========================= */

.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.faq-item summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
}

.faq-answer {
  padding: 16px 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* =========================
   FORM FIX (стабильная сетка)
========================= */

.contact-form {
  margin-top: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f0f0f;
  color: var(--text);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* =========================
   FIELD ERROR
========================= */

.field-error {
  display: none;
  margin-top: 8px;
  padding: 10px;
  font-size: 13px;
  border-radius: 8px;
  background: rgba(255,0,0,0.08);
  color: var(--danger);
}

.field-error.show {
  display: block;
}

/* =========================
   BUTTON
========================= */

.btn-primary {
  margin-top: 18px;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* =========================
   STATUS
========================= */

.form-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  display: none;
}

.form-status.loading { display: block; background: #222; }
.form-status.success { display: block; background: rgba(0,255,153,0.12); color: var(--accent); }
.form-status.error { display: block; background: rgba(255,0,0,0.12); color: var(--danger); }

/* =========================
   MODAL FIXED
========================= */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  padding: 20px;
  z-index: 9999;
  overflow: hidden; /* важно */
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;

  display: flex;
  flex-direction: column;

  background: var(--bg-dark);
  border-radius: 16px;
  position: relative;
  overflow: hidden; /* важно */
}

#modal-body {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
  min-height: 0; /* критично для flex-scroll бага */
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
}

#modal-body img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* nav */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 26px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 10px;
}

.modal-nav.prev { left: 12px; }
.modal-nav.next { right: 12px; }

/* =========================
   HIDDEN FIX (ВАЖНО)
========================= */

.honeypot,
#ts {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;
  padding: 20px;
  background: #000;
  color: var(--muted);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
.nav-contact,
.nav-wa {
  margin-left: 0;
}
  .icon-wa {
    width: 20px;
    height: 20px;
  }
  .cards {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-nav {
    display: none;
  }
}
/* =========================
   BURGER
========================= */

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.burger span {
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* =========================
   MOBILE NAV
========================= */

@media (max-width: 900px) {

  nav {
    position: absolute;
    top: 70px;
    right: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    display: none;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 0;
  }

  .burger {
    display: flex;
  }
}
/* =========================
   HEADER CONTACT LINKS
========================= */

.nav-contact {
  color: var(--muted);
  margin-left: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-contact:hover {
  color: var(--text);
}

.nav-wa {
  margin-left: 12px;
  padding: 6px 10px;
  background: #25D366;
  color: #000;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s;
}

.nav-wa:hover {
  filter: brightness(1.1);
}
.icon-wa {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  padding: 8px 10px;
  background: #25D366;
  color: #000;
  border-radius: 10px;
  transition: 0.2s;
}

.nav-wa:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}