/* ================== root / базовые переменные ================== */
:root{
  --nav-h: 52px;
  --max-width: 1200px;
  --accent: #00ff94;
  --muted: #123f21;
}

/* ================== БАЗА ================== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(160deg, #001a00, #065f46, #0f766e);
  color: #fff;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* фоновой узор и виньетка (псевдоэлементы) */
body::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("hero.png");
  background-size: cover;
  background-repeat: repeat;
  opacity: 0.08;
  z-index: 0;
  mix-blend-mode: overlay;
  pointer-events: none;
}
body::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.25) 100%);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* параллакс-слои */
.parallax-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 130%;
  height: 130%;
  background-image: url("hero.png");
  background-repeat: repeat;
  background-size: cover;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.layer-back { opacity: 0.04; mix-blend-mode: multiply; }
.layer-front { opacity: 0.08; mix-blend-mode: overlay; z-index: 1; }

/* ================== NAVBAR ================== */
.main-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #1f1f1f;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.burger-wrapper { display: none; align-items: center; cursor: pointer; gap: 8px; padding: 0.75rem 1rem; }
.burger { display: flex; flex-direction: column; gap: 5px; }
.burger span { width: 22px; height: 3px; background: #e0ffe3; border-radius: 2px; }
.burger-label { color: #e0ffe3; font-size: 1rem; }

.main-navbar.animate {
  opacity: 1;
  transform: translateX(0);
}

.nav-links {
  display: flex;
  justify-content: center;
  padding: 14px 0;
  margin: 0;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  text-decoration: none;
  color: #e0ffe3;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #00ff94;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #00ff94;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ================== SHOWCASE ================== */
.showcase{
  min-height: calc(100vh - var(--nav-h));
  padding-top: calc(var(--nav-h) + 20px);
  background: linear-gradient(to bottom, #ffffff, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.showcase-content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  padding: 0 20px;
  gap: 40px;
  flex-wrap: wrap;
}

.showcase-text{
  flex: 1 1 48%;
  color: var(--muted);
}
.showcase-text h2{
  font-size: 2.5rem;
  margin: 0 0 24px;
  color: #123f21;
}
.showcase-text p{
  font-size: 1.1rem;
  color: #2a4e39;
  line-height: 1.6;
}

.showcase-image{
  flex: 1 1 48%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.showcase-image img{
  max-width: 550px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ================== SERVICES / PRODUCTS ================== */
.services-section{
  padding: 80px 20px;
  background: #ffffff;
  text-align: center;
  z-index: 2;
}
.section-title{
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #222;
}
.services-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 30px;
}
.service-card{
  border-radius: 16px;
  padding: 30px 20px;
  transition: transform .25s ease;
}
.service-card .icon{ font-size: 48px; margin-bottom: 18px; color: #007bff; }
.service-card h3{ font-size: 20px; margin-bottom: 12px; color: #333; }
.service-card p{ color:#666; font-size:15px; line-height:1.5; }

.products-section{ padding: 80px 20px; background:#fff; z-index:2; }
.products-content{ display:flex; flex-wrap:wrap; align-items:center; gap:40px; max-width:var(--max-width); margin:0 auto; padding:0 20px; }
.products-carousel{ flex:1 1 50%; overflow:hidden; max-width:600px; border-radius:16px; box-shadow:0 8px 24px rgba(0,0,0,0.06); }
.carousel-track{ display:flex; animation: scrollCarousel 20s linear infinite; }
.carousel-track img{ width:300px; height:auto; margin-right:20px; border-radius:12px; object-fit:cover; }
@keyframes scrollCarousel{ 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.products-text{ flex:1 1 45%; color:#222; }
.products-text h2{ font-size:36px; margin-bottom:20px; }
.products-text p{ font-size:16px; line-height:1.6; color:#555; }

/* ================== FOOTER ================== */
footer {
    background-color: rgb(36, 36, 36);
    color: rgb(255, 255, 255);
    padding: 20px;
    z-index: 999;
    position: relative;
}

.footer-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-left,
.footer-middle,
form#call-back-form {
    width: 30%;
}

.footer-left img {
    width: 100%;
    max-width: 250px;
    height: auto;
}

p { margin: 5px 0; }

.input-name, .input-phone {
    margin-top: 10px;
    padding: 10px;
    width: 95%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.submit-button {
    margin-top: 10px;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.social-icons a { margin-right: 10px; text-decoration: none; }
.social-icons img { width: 30px; height: auto; cursor: pointer; }

/* ================== SUCCESS POPUP ================== */
.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #4CAF50;
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    text-align: center;
}
.success-popup .checkmark {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
    animation: pop 0.5s ease;
}
@keyframes pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.success-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.success-popup.hidden { display: none; }

/* ================== ADAPTATION ================== */
@media (max-width: 1024px){
  .showcase-content{ padding: 0 24px; gap: 24px; }
  .showcase-image img { max-width: 400px; }
  .products-content{ gap: 24px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-left, .footer-middle, form#call-back-form {
    width: 30%;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  /* Бургер-меню */
  .burger-wrapper { display: flex; }
  .nav-links { display: none; width: 90%; }
  .nav-links.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: #1f1f1f;
    padding: 1rem;
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Showcase */
  .showcase-content{
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }
  .showcase-image{ display: none; }
  .showcase-text{ width: 100%; }
  .showcase-text h2{ font-size: 2rem; margin-bottom: 12px; }
  .showcase-text p{ font-size: 1rem; }

  /* Services / Products */
  .services-section{ padding: 40px 16px; }
  .products-section{ padding: 40px 16px; }
  .products-content{ flex-direction: column; }
  .services-grid{ grid-template-columns: 1fr; }
  .products-text h2 { font-size: 24px; }

  /* Footer */
  .footer-container{ flex-direction: column; }
  form#call-back-form{ order: 1; }
  .footer-middle{ order: 2; }
  .footer-left{ order: 3; text-align: left; }
  .footer-left, .footer-middle, form#call-back-form{ width:100%; margin-bottom:20px; }
  .footer-left img{ max-width:200px; display:block; margin:0; }
}


/* ================== TOUCH UX ================== */
a, button{ -webkit-tap-highlight-color: rgba(0,0,0,0); }
button{ font-family: inherit; outline: none; }
