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

:root {
  --green: #7fdd9f;
  --transition: all 0.3s ease;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: "DIN Pro", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
  line-height: 1.45;
  width: 100%;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

/* Header */
.site-header {
  background: #000;
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  padding: 5px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  min-height: 50px;
}

/* Логотипы */
.brand img {
  height: 35px;
  width: auto;
  max-width: 160px;
  min-width: 100px;
}

/* Navigation */
.nav-list {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-list a {
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 8px 12px;
  display: block;
  font-size: 14px;
  transition: var(--transition);
  border-radius: 4px;
}

.nav-list a:hover {
  background: rgba(255,255,255,0.1);
}

/* Burger Menu */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  transition: var(--transition);
  transform-origin: center;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  backdrop-filter: blur(3px);
}

.nav-overlay.active {
  display: block;
}

.accent {
  height: 1px;
  background: var(--green);
}

/* Main Content */
main {
  margin-top: 60px;
  width: 100%;
}

/* ========== HERO SECTION - OPTIMIZED FOR MOBILE ========== */
.hero {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: #fff;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.55);
}

.hero-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 20px;
  width: 100%;
  text-align: center;
}

.hero-copy {
  max-width: 760px;
  width: 100%;
  padding: 0 10px;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0 0 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero .sub {
  font-size: clamp(1rem, 3vw, 1.3rem);
  opacity: .95;
  margin: 0 0 35px;
  line-height: 1.6;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  background: var(--green);
  color: #000;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .02em;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-block;
  text-align: center;
  transition: var(--transition);
  font-size: clamp(16px, 2.5vw, 18px);
  min-height: 54px;
  min-width: 200px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.btn-lg {
  font-size: clamp(17px, 3vw, 20px);
  padding: 18px 36px;
}

/* Sections */
.section {
  padding: 60px 0;
  width: 100%;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 14px;
  font-weight: 700;
}

.section-title.center {
  text-align: center;
}

/* Parts Grid */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  width: 100%;
}

.part-card {
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  background: #fff;
  transition: var(--transition);
}

.part-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f5f6f7;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumb:hover img {
  transform: scale(1.05);
}

.part-name {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 14px;
}

/* About Section */
.about {
  background: #f6faf8;
}

.narrow {
  max-width: 900px;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Why Section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.why-item {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: var(--transition);
}

.why-item:hover {
  transform: translateY(-5px);
}

.why-icon {
  font-size: 30px;
  margin-bottom: 6px;
}

.why-title {
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 18px;
}

.why-sub {
  color: #555;
  font-size: 14px;
  line-height: 1.4;
}

/* Contact Section */
.contact {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  width: 100%;
}

.contact .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.72);
}

.contact-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

.contact-left {
  flex: 1;
}

.contact-right {
  flex: 1;
}

/* Форма */
.form-panel {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lead-form input,
.lead-form textarea {
  border: 1px solid #ccc;
  background: #f9f9f9;
  color: #333;
  padding: 14px 12px;
  border-radius: 6px;
  outline: none;
  width: 100%;
  font-size: 16px;
  -webkit-appearance: none;
  transition: var(--transition);
  font-family: inherit;
}

.lead-form input:focus,
.lead-form textarea:focus {
  border-color: #007bff;
  background: #fff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.3);
  transform: translateY(-1px);
}

.lead-form textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.policy {
  font-size: 12px;
  color: #666;
  margin-top: 15px;
  opacity: 0.9;
  line-height: 1.4;
  text-align: center;
}

.contact-right h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 15px;
  font-weight: 700;
  color: #fff;
}

.contact-right .sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #f0f0f0;
  line-height: 1.5;
}

/* Contacts Section */
.contacts {
  background: #f8fafc;
}

.contacts-wrap {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

.contact-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #eee;
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateX(5px);
}

.cc-title {
  font-weight: 800;
  margin-bottom: 4px;
  font-size: 16px;
}

.map {
  flex: 1;
  height: auto;
}

.map iframe {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  border: none;
}

/* Footer */
.site-footer {
  background: #000;
  color: #eee;
  padding: 30px 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  flex: 1;
  min-width: 250px;
}

.footer-left img {
  height: 40px;
  width: auto;
  max-width: 160px;
}

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.footer-center .title {
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 16px;
  color: #fff;
}

.footer-center a {
  display: block;
  margin: 6px 0;
  color: #ccc;
  font-size: 14px;
  transition: var(--transition);
}

.footer-center a:hover {
  color: var(--green);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.line {
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #ccc;
}

.line a {
  transition: var(--transition);
  color: #ccc;
}

.line a:hover {
  color: var(--green);
}

.small {
  font-size: 14px;
  color: #999;
  line-height: 1.4;
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-window {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  position: relative;
  color: #333;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  color: #ff0000;
}

.modal-window h3 {
  margin: 0 0 20px;
  font-size: 24px;
  text-align: center;
}

/* ========== MOBILE ADAPTATION - ENHANCED ========== */
@media (max-width: 1200px) {
  .brand img {
    height: 32px;
    max-width: 150px;
  }
  
  .parts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .brand img {
    height: 30px;
    max-width: 140px;
  }
  
  .footer-left img {
    height: 35px;
    max-width: 140px;
  }
  
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-right h2 {
    font-size: 2rem;
  }
  
  .nav-list a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 3px 0;
  }
  
  .header-inner {
    min-height: 45px;
    padding: 0 10px;
  }
  
  main {
    margin-top: 50px;
  }
  
  .brand img {
    height: 28px;
    max-width: 120px;
    min-width: 90px;
  }
  
  /* Burger Menu - Enhanced */
  .burger {
    display: flex;
  }
  
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 70px 20px 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    align-items: flex-start;
    gap: 0;
  }
  
  .nav-list.active {
    right: 0;
  }
  
  .nav-list li {
    width: 100%;
  }
  
  .nav-list a {
    display: block;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: #333;
    width: 100%;
    font-weight: 600;
  }
  
  .nav-overlay.active {
    display: block;
  }
  
  /* Hero Section - Mobile Optimized */
  .hero {
    min-height: 50vh;
    background-position: center center;
    background-attachment: scroll !important;
  }
  
  .hero-container {
    min-height: 50vh;
    padding: 30px 15px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.25;
  }
  
  .hero .sub {
    font-size: 1.05rem;
    margin-bottom: 25px;
    line-height: 1.5;
  }
  
  .btn-lg {
    padding: 14px 28px;
    font-size: 17px;
    min-width: 180px;
    min-height: 50px;
  }
  
  /* Sections */
  .section {
    padding: 40px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  /* Parts Grid */
  .parts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  /* Why Grid */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  /* Contact Section */
  .contact-wrap {
    flex-direction: column;
    gap: 25px;
  }
  
  .form-panel {
    padding: 25px 20px;
    margin: 0 10px;
  }
  
  .contact-right h2 {
    font-size: 1.8rem;
    text-align: center;
  }
  
  .contact-right .sub {
    text-align: center;
    font-size: 1rem;
  }
  
  /* Contacts Section */
  .contacts-wrap {
    flex-direction: column;
    gap: 25px;
  }
  
  .map {
    width: 100%;
    order: -1;
  }
  
  .map iframe {
    height: 250px;
  }
  
  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    align-items: center;
  }
  
  .footer-left,
  .footer-center,
  .footer-right {
    width: 100%;
    align-items: center;
    text-align: center;
  }
  
  .footer-left img {
    height: 30px;
    max-width: 130px;
    min-width: 100px;
  }
}

@media (max-width: 576px) {
  .brand img {
    height: 25px;
    max-width: 110px;
    min-width: 80px;
  }
  
  .footer-left img {
    height: 28px;
    max-width: 120px;
    min-width: 90px;
  }
  
  /* Hero - Small Mobile */
  .hero {
    min-height: 45vh;
  }
  
  .hero-container {
    min-height: 45vh;
    padding: 25px 15px;
  }
  
  .hero h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
  }
  
  .hero .sub {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  
  .btn {
    min-width: 170px;
    min-height: 48px;
    padding: 14px 24px;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .parts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .part-card {
    padding: 10px;
  }
  
  .form-panel {
    padding: 20px 15px;
    margin: 0;
  }
  
  .contact-right h2 {
    font-size: 1.6rem;
  }
  
  .contact-right .sub {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .brand img {
    height: 22px;
    max-width: 100px;
    min-width: 70px;
  }
  
  /* Hero - Extra Small Mobile */
  .hero {
    min-height: 40vh;
  }
  
  .hero-container {
    min-height: 40vh;
    padding: 20px 12px;
  }
  
  .hero h1 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  
  .hero .sub {
    font-size: 0.9rem;
    margin-bottom: 18px;
  }
  
  .btn {
    min-width: 160px;
    min-height: 46px;
    padding: 12px 20px;
    font-size: 15px;
  }
  
  .parts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  .part-name {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .brand img {
    height: 20px;
    max-width: 90px;
  }
  
  .header-inner {
    padding: 0 8px;
  }
  
  /* Hero - Very Small Devices */
  .hero {
    min-height: 35vh;
  }
  
  .hero-container {
    min-height: 35vh;
    padding: 15px 10px;
  }
  
  .hero h1 {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }
  
  .hero .sub {
    font-size: 0.85rem;
    margin-bottom: 15px;
  }
  
  .btn {
    min-width: 140px;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .parts-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
    background-attachment: scroll;
  }
  
  .hero-container {
    min-height: -webkit-fill-available;
  }
  
  input, textarea {
    font-size: 16px !important;
  }
  
  /* Предотвращение масштабирования на iOS */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    transform: translateZ(0);
  }
}

/* Android Specific Fixes */
@supports not (-webkit-touch-callout: none) {
  .hero {
    background-attachment: fixed;
  }
}

/* Landscape Mode */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-container {
    min-height: 100vh;
    padding: 20px 15px;
  }
  
  .nav-list {
    padding-top: 60px;
    height: 100vh;
    overflow-y: auto;
  }
  
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .hero .sub {
    font-size: 1rem;
    margin-bottom: 20px;
  }
}

/* Высокие мобильные устройства */
@media (max-width: 768px) and (min-height: 700px) {
  .hero {
    min-height: 55vh;
  }
  
  .hero-container {
    min-height: 55vh;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero .sub {
    font-size: 1.1rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .part-card:hover {
    transform: none;
  }
  
  .why-item:hover {
    transform: none;
  }
  
  .contact-card:hover {
    transform: none;
  }
  
  .nav-list a:hover {
    background: transparent;
  }
}