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

html {
  /* Fluid root font-size:
     ~14px on phones, ~17–18px on 1080p, ~20px on 1440p, ~21px on 4K */
  font-size: clamp(14px, 0.35vw + 11px, 21px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #1A1A1A; /* важное: фон корня страницы */
}

body {
  font-family: Arial, sans-serif;
  color: #f5f5f5;
  background-color: #1A1A1A;
  line-height: 1.6;
  overflow-x: hidden; /* защита от горизонтального скролла */
}

/* Фон для каждой секции */
.hero {
  background-color: #1A1A1A; /* Главный экран */
}

#partners {
  background-color: #3E4347; /* Партнери */
}

.products {
  background-color: #1A1A1A; /* Продукція */
}

.advantages {
  background-color: #3E4347; /* Переваги */
}

.about {
  background-color: #1A1A1A; /* Про нас */
}

.certificates {
  background-color: #3E4347; /* Сертифікати */
}

.contact {
  background-color: #1A1A1A; /* Контакти */
}

.container {
  width: min(90%, 1200px); /* адаптивная ширина */
  margin-inline: auto;
  padding-inline: 12px; /* небольшой отступ от краёв на телефонах */
}

/* Header styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.85);
  padding: var(--header-vpad) 0;
  z-index: 10000;             /* шапка выше всего */
  transform: translateZ(0);
  backface-visibility: hidden;

  /* ограничиваем размер текста в шапке независимо от html clamp */
  font-size: clamp(14px, 0.25vw + 12px, 18px);
  line-height: 1.2;
}

/* Контейнер в шапке */
header .container {
  width: min(90%, 1200px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between; /* логотип и меню по краям */
}

/* Навигация (десктоп) */
header nav {
  display: flex;
  align-items: center;
}

/* Logo styles */
.logo {
  height: var(--header-logo);
  width: auto;
  filter: none;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 20px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap; /* чтобы ссылки в шапке не ломались */
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #e06d17;
}

.header-phone {
  /* phone number styling */
  color: #e06d17;
  font-weight: 600;
  text-decoration: none;
  margin-left: 20px;
}

.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  margin-left: 20px;
}

/* навигация и телефон как прямые потомки header-inner */
.header-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.burger span {
  width: 25px;
  height: 3px;
  background: #f5f5f5;
  transition: transform 0.3s;
}

/* Hero section */
.hero {
  position: relative;
  min-height: 100svh;
  height: auto;
  padding: 0;
  overflow: hidden;
}

.hero-picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--header-offset);
  padding-inline: 24px;
  padding-bottom: 24px;
}

.hero-img{
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  object-fit: cover;      
  object-position:center;
  pointer-events:none;
}

/* Стили для контента hero */
.hero-content {
  color: #f5f5f5;
  max-width: 980px;
  text-align: center;
  position: relative;
  border-radius: 8px;
  z-index: 2;

  /* ВАЖНО: без translateY (он “прыгает” от высоты/разрешения).
     Вертикальный отступ задаём через margin-top в media (>=769px). */
  padding: 16px;
  margin-inline: auto;
}
.hero .hero-content::before {
  content: '';
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -20px;
  right: -20px;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  z-index: -1;
  pointer-events: none;
}
.hero h1 {
  /* Более контролируемый размер: не раздувается на 2K/4K,
     но остаётся читабельным на телефонах. */
  font-size: clamp(24px, 1.4vw + 16px, 40px);
  line-height: 1.18;
  margin-bottom: 26px;
}

.hero p {
  font-size: clamp(14px, 0.45vw + 10px, 18px);
  line-height: 1.65;
  margin: 0 auto 20px;
  max-width: 78ch;
}

.btn {
  display: inline-block;
  background: #e06d17; /* медь классика */
  color: #111; /* тёмный текст для контраста */
  padding: 8px 20px;
  text-transform: none;
  border-radius: 4px;
  transition: background 0.3s;
  font-weight: 600;
  text-decoration: none;
  margin-top: 20px;
}

.btn:hover {
  background: #d4823d; /* чуть светлее при наведении */
}

/* Section defaults */
section {
  padding: 40px 0 50px;
}

section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: clamp(28px, 1.2vw + 14px, 38px);
  line-height: 1.2;
  color: #e06d17;
}

/* Partners */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.partner-card {
  background: #1c1c1c;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s;
}

.partner-card:hover {
  transform: translateY(-5px);
}

.partner-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.partner-card h3 {
  color: #f5f5f5;
  font-size: 1.2rem;
  margin: 15px 15px 5px;
}

.partner-card p {
  color: #ccc;
  font-size: max(0.9rem, 14px);
  margin: 0 15px 15px;
}

.partner-card a {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

/* Уменьшаем зазор между двумя группами партнёров */
#partners .partner-grid + h2 {
  margin-top: 12px;
}

/* About */
.about {
  color: #f5f5f5;
  text-align: center;
}

.about p {
  max-width: 800px;
  margin: 0 auto 20px;
}

/* About list styling */
.about-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto 20px;
  padding-left: 0;
}
.about-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.about-list li::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background-color: #e06d17;
  flex-shrink: 0;
}

.about .experience {
  font-weight: bold;
  color: #e06d17;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.product-card {
  background: #1c1c1c;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #e06d17;
}

.product-card p {
  color: #ccc;
  font-size: 0.9rem;
}

/* Product icons styling */
.product-card img.product-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  filter: invert(40%) sepia(50%) saturate(600%) hue-rotate(160deg) brightness(90%) contrast(85%);
}

/* Advantages */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.adv-card {
  background: #1c1c1c;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s;
}

.adv-card:hover {
  transform: translateY(-5px);
}

.adv-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  filter: invert(40%) sepia(50%) saturate(600%) hue-rotate(160deg) brightness(90%) contrast(85%);
}

.adv-card h4 {
  color: #e06d17;
  margin-bottom: 10px;
}

.adv-card p {
  color: #ccc;
  font-size: 0.9rem;
}

/* Accent text highlight */
.accent {
  color: #e06d17;
  font-weight: 600;
}

/* Certificates */
.certificates-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.certificate-img {
  width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Contact */
.contact .container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: stretch;
}

/* две отдельные карточки */
.contact-left,
.contact-right {
  flex: 1 1 420px;
  background: #151515;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px 24px 20px;
}

/* убираем вертикальный разделитель у правой колонки */
.contact-right {
  border-left: none;
  padding-left: 24px;
}

/* заголовки колонок — слева с акцентной линией под ними */
.contact-left h2,
.contact-right h2 {
  text-align: left;
  margin: 0 0 16px;
  color: #e06d17;
  line-height: 1.2;
}
.contact-left h2::after,
.contact-right h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: #e06d17;
  opacity: 0.6;
  margin-top: 8px;
}

/* контактная инфо слева */
.contact-info {
  color: #f5f5f5;
}
.contact-info p {
  margin-bottom: 10px;
  color: #f5f5f5;
}
.contact-info p:last-of-type {
  margin-bottom: 22px;
}
.contact-info a {
  color: #e06d17;
  text-decoration: none;
}
.contact-info a:hover {
  color: #d4823d;
}

/* Мессенджеры */
.socials {
  margin-bottom: 6px;
}
.socials-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.socials-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
.socials-list a:hover {
  color: #d4823d;
}
.social-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: block;
}

/* форма */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form label {
  font-weight: 500;
  color: #f5f5f5;
}
.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #222;
  color: #f5f5f5;
  font: inherit;          /* чтобы input/textarea не были “мельче” текста */
  font-size: 1rem;
  line-height: 1.35;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #8b8b8b;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #e06d17;
}

/* кнопка Видправити */
.contact .btn {
  padding: 7px 16px;
  width: auto;
  min-width: 150px;
  align-self: flex-start; 
  margin-top: 10px;      
}

/* карта (статичное изображение) */
.map{
  margin-top:40px;
  width:100%;
  max-width:1000px;
  margin-left:auto;
  margin-right:auto;
}
.map a{
  display:block;
  line-height:0;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 4px 8px rgba(0,0,0,.4);
}
.map img{
  width:100%;
  height:300px;
  display:block;
  object-fit:cover;
  border:0;
}
.map-attrib{
  font-size:12px;
  color:#9aa0a6;
  text-align:center;
  margin:6px 0 0;
}

/* Footer */
footer {
  background: #080808;
  padding: 20px 0;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.footer-nav {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #e06d17;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ≤600px (small devices) */
@media (max-width: 600px) {
  /* Single-column grids on narrow screens */
  .partner-grid,
  .product-grid,
  .advantages-grid {
    grid-template-columns: 1fr;
  }

  /* Stack certificates vertically */
  .certificates-grid {
    flex-direction: column;
    align-items: center;
  }
  .certificate-img {
    width: 90%;
    max-width: 300px;
  }
}

/* Partner headings: prevent odd breaks */
.partners h2,
.partners .section-title,
#partners h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.nowrap {

  white-space: nowrap;
  display: inline-block;
}

/* Contact info links (tel/mail) */
.contact-info a[href^="tel"],
.contact-info a[href^="mailto"] {
  color: #e06d17;
  text-decoration: none;
}
.contact-info a[href^="tel"]:hover,
.contact-info a[href^="mailto"]:hover {
  color: #d4823d;
}


/* Desktop about list padding */
@media (min-width: 769px) {
  .about .about-list {
    padding-left: 200px;
  }
}

/* Suppliers (default compact card styles) */
.suppliers-grid .partner-card img {
  height: 45px;
  padding: 2px;
}
.suppliers-grid .partner-card {
  padding-bottom: 10px;
}
.suppliers-grid .partner-card h3 {
  font-size: 0.95rem;
  margin: 10px 10px 4px;
}
.suppliers-grid .partner-card p {
  font-size: 0.8rem;
  margin: 0 10px 10px;
}

/* HEADER */
:root {
  --header-logo: 52px;
  --header-vpad: 5px;
  --header-desktop: calc(var(--header-logo) + (var(--header-vpad) * 2));
  --header-mobile: 60px;           /* 48px логотип + 12px паддинги */
  --header-offset: var(--header-desktop); /* сюда JS запишет фактическую высоту */
}

/* Scroll offset under fixed header (anchors) */
[id] { scroll-margin-top: var(--header-offset); }

/* Lock page scroll when body is fixed */
.body-locked {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

/* Combined mobile styles (≤768px) */
@media (max-width: 768px) {
  :root { --header-offset: var(--header-mobile); }

  /* Header and Navigation */
  .logo {
    height: 48px;
  }
  .header-phone {
    display: none;
    margin-left: 0;
    font-size: 16px;
  }
  .burger {
    display: flex;
    margin-left: auto;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    touch-action: manipulation;
  }
  .burger span {
    width: 25px;
    height: 3px;
    background: #f5f5f5;
    transition: transform 0.3s, opacity 0.3s;
  }
  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger.active span:nth-child(2) {
    opacity: 0;
  }
  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  header .nav-links {
    position: fixed;
    top: var(--header-offset);
    right: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 240px;
    height: 100vh;
    padding: 20px;
    background: rgba(0,0,0,0.95);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  header .nav-links.active {
    transform: translateX(0);
  }
  header .nav-links li {
    margin: 10px 0;
  }


  /* Hero — mobile: читаемый текст и “широкая” карточка */
  .hero-overlay {
    padding-top: var(--header-offset);
    padding-inline: 16px;
    padding-bottom: 18px;
  }
  .hero-img {
    object-fit: cover;
    object-position: left center;
  }

  /* ВАЖНО: .hero-overlay — flex. Без явной ширины flex-item может “сжаться”
     до ширины контента и выглядеть маленьким окошком по центру. */
  .hero-content {
    width: 100%;
    flex: 1 1 auto;
    max-width: 680px;
    text-align: center;
    padding: 16px 14px;
    margin-inline: auto;
  }

  .hero .hero-content::before {
    top: -10px;
    bottom: -12px;
    left: -10px;
    right: -10px;
    z-index: -1;
  }

  .hero h1 {
    font-size: clamp(28px, 6.2vw, 38px);
    line-height: 1.15;
    margin-bottom: 14px !important;
  }

  .hero p {
    font-size: clamp(16px, 3.8vw, 20px);
    line-height: 1.55;
    margin: 0 auto 14px;
    max-width: 40ch;
  }

  .hero .btn {
    font-size: 16px;
    padding: 10px 22px;
    margin-top: 12px;
  }

/* Partners section */
  .partners h2,
  .partners .section-title,
  #partners h2 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.2;
    margin-right: 0;
  }

  /* About section */
  .about .about-list {
    text-align: left !important;
    margin-bottom: 12px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px;
    max-width: 90%;
  }
  .about .about-list li {
    justify-content: flex-start;
  }
  .about .about-list li::before {
    margin-right: 6px;
  }

  /* Contact section */
  .contact .container {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
  }
  .contact-left,
  .contact-right {
    padding: 20px;
  }
  .contact-left h2,
  .contact-right h2 {
    text-align: center;
  }
  .contact-info p,
  .contact-info a {
    margin-bottom: 6px;
  }
  .socials {
    margin-bottom: 6px;
  }
  .contact-form {
    margin-top: 0;
  }

  /* Suppliers section */
  .suppliers-grid .partner-card img {
    height: 36px;
    padding: 1px;
  }
  .suppliers-grid .partner-card h3 {
    font-size: 0.9rem;
  }
  .suppliers-grid .partner-card p {
    font-size: 0.75rem;
  }


  /* Footer */
  footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  footer .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    order: -1;
    margin: 0 0 10px;
  }
  footer .container p {
    margin-top: 20px;
  }
}

/* Tablet header fix (769px–1024px): burger + off-canvas menu to avoid squishing */
@media (min-width: 769px) and (max-width: 1024px) {
  /* phone in header often breaks layout on tablets */
  .header-phone {
    display: none;
    margin-left: 0;
  }

  /* slightly smaller logo on tablets */
  .logo {
    height: 46px;
  }

  /* show burger on tablets */
  .burger {
    display: flex;
    margin-left: auto;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    touch-action: manipulation;
  }
  .burger span {
    width: 25px;
    height: 3px;
    background: #f5f5f5;
    transition: transform 0.3s, opacity 0.3s;
  }
  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger.active span:nth-child(2) {
    opacity: 0;
  }
  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* off-canvas menu (same behavior as mobile) */
  header .nav-links {
    position: fixed;
    top: var(--header-offset);
    right: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;

    width: 260px;
    height: 100vh;
    padding: 20px;

    background: rgba(0,0,0,0.95);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  header .nav-links.active {
    transform: translateX(0);
  }
  header .nav-links li {
    margin: 10px 0;
  }

  /* keep links a bit smaller on tablet */
  header .nav-links a {
    font-size: 15px;
  }
}

/* desktop: зазор между нижним меню и копирайтом */
.footer-copyright{
  margin-top: 26px;
  color: #9AA0A6;
}

/* Сжать низ только у секции Контакти */
section.contact{ padding-bottom:28px; }



/* Tablets / laptops / desktops (НЕ мобильные): опускаем hero-карточку вниз,
   но сохраняем вертикальное центрирование как раньше.
   Используем relative top вместо transform (так проще контролировать и меньше артефактов). */
@media (min-width: 769px) {
  .hero-overlay{
    align-items: center;
  }
  .hero-content{
    position: relative;
    top: clamp(32px, 10vh, 260px);
  }
     .hero p{
    max-width: 90ch;
    line-height: 1.72;
  }
}

/* Большие десктопы: ещё ниже + расширить карточку */
@media (min-width: 1441px) {
  .hero-content{
    max-width: 1100px;
    padding: 18px;
    top: clamp(60px, 12vh, 420px);
  }

  .hero .hero-content::before{
    background: rgba(0,0,0,0.58);
    top: -24px; bottom: -24px;
    left: -28px; right: -28px;
  }
}
