/* Base reset and variables */
:root {
  --primary: #0e73ff; /* синий как спецтехника */
  --primary-dark: #0a57c3;
  --accent: #ffb703; /* жёлтый как строительная техника */
  --accent-dark: #f29f05;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #ef4444;
  --maxw: 1200px;
  --radius: 12px;
  --shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* Sticky footer */
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}
a { color: inherit; text-decoration: none; }

img { 
  display: block; 
  max-width: 100%; 
  height: auto; 
  object-fit: cover;
  transition: transform 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.grid { display: grid; gap: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--primary); color: white; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--primary-dark); box-shadow: 0 10px 34px rgba(14,115,255,.35); }
.btn--outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn--outline:hover { background: #f1f5f9; }
.btn--accent { background: var(--accent); color: #1f2937; }
.btn--accent:hover { background: var(--accent-dark); }

/* Top bar and header */
.topbar { background: #ffffff; border-bottom: 1px solid var(--border); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar__contact { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.topbar__contact a { color: var(--text); font-weight: 600; }

header.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: rgba(255,255,255,.85); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .2px; }
.brand__logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; font-weight: 900; color: #fff; }
.nav__menu { display: flex; gap: 14px; flex-wrap: wrap; }
.nav__menu a { padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav__menu a:hover, .nav__menu a.active { color: var(--text); background: #f1f5f9; }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; background: transparent; border: none; color: var(--text); font-size: 24px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 48px; }
.hero__bg {
  position: absolute; inset: -10% -10% auto -10%; height: 80%;
  background: radial-gradient(60% 60% at 20% 10%, rgba(14,115,255,.18) 0%, rgba(14,115,255,0) 70%),
              radial-gradient(50% 50% at 80% 0%, rgba(255,183,3,.16) 0%, rgba(255,183,3,0) 60%);
  filter: blur(60px); pointer-events: none;
}
.hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.hero__title { font-size: clamp(28px, 4vw, 46px); line-height: 1.1; margin: 0 0 14px; }
.hero__subtitle { color: var(--muted); font-size: clamp(16px, 2.2vw, 18px); margin: 0 0 22px; }
.hero__badges { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.badge { padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-weight: 600; background: #ffffff; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__media { position: relative; }
.hero__card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.hero__card img { border-radius: 12px; }

.hero__image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

/* Специальные стили для изображения на странице отзывов */
.hero__card img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .hero__card img {
    max-height: 300px;
  }
}

@media (max-width: 480px) {
  .hero__card img {
    max-height: 250px;
  }
}

/* Sections */
.section { padding: 56px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__title { font-size: clamp(22px, 3vw, 32px); margin: 0; }
.section__desc { color: var(--muted); max-width: 760px; }

/* Services cards */
.cards { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 18px; 
}
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .card__title { font-size: 16px; }
  .card__text { font-size: 13px; }
  .btn { padding: 12px 16px; font-size: 14px; }
}
.card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(14,115,255,.15); }
.card__media { 
  aspect-ratio: 16/10; 
  background: #f3f4f6; 
  overflow: hidden;
  border-radius: 8px;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card__media img {
  transform: scale(1.05);
}
.card__body { padding: 14px; display: grid; gap: 8px; }
.card__title { font-weight: 700; font-size: 18px; }
.card__text { color: var(--muted); font-size: 14px; }
.card__footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 14px; gap: 10px; }
.pill { background: #eef2ff; color: #1d4ed8; font-weight: 700; padding: 6px 10px; border-radius: 999px; border: 1px solid #c7d2fe; font-size: 12px; }

/* Advantage list */
.adv-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.adv { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: grid; gap: 8px; }
.adv__title { font-weight: 800; }
.adv__text { color: var(--muted); font-size: 14px; }

/* Reviews grid */
.reviews-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
  gap: 20px; 
  margin-bottom: 40px;
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.review__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.review__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.review__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review__info {
  flex: 1;
}

.review__name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.review__rating {
  color: #fbbf24;
  font-size: 14px;
  margin-bottom: 4px;
}

.review__date {
  color: var(--muted);
  font-size: 12px;
}

.review__text {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.review__service {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  background: rgba(14, 115, 255, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  display: inline-block;
}

/* Gallery with swipe gestures */
.gallery-container {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 20px 0;
}

.gallery-slider {
  display: flex;
  transition: transform 0.3s ease;
  touch-action: pan-x;
}

.gallery-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.gallery-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
  transition: all 0.2s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav--prev {
  left: 10px;
}

.gallery-nav--next {
  right: 10px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-dot.active {
  background: var(--primary);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .reviews-grid { 
    grid-template-columns: 1fr; 
    gap: 16px;
  }
  
  .review-card {
    padding: 16px;
  }
  
  .review__header {
    gap: 10px;
  }
  
  .review__avatar {
    width: 40px;
    height: 40px;
  }
  
  .gallery-slide img {
    height: 250px;
  }
  
  .gallery-nav {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
}

/* SEO block */
.seo { background: #ffffff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.seo__content { display: grid; gap: 10px; color: #111827; }
.seo__content p { margin: 0; }

/* CTA banner */
.cta { background: linear-gradient(135deg, #0e73ff 0%, #ffb703 100%); color: #062243; border-radius: 16px; padding: 20px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.cta__title { margin: 0; font-size: 22px; }
.cta__actions { display: flex; gap: 10px; }
.btn--dark { background: #111827; border-color: rgba(0,0,0,.08); color: #f9fafb; }
.btn--dark:hover { background: #0b1220; }

/* Footer */
footer.site-footer { border-top: 1px solid var(--border); background: #ffffff; margin-top: 0; }
.footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; padding: 24px 0; }
.footer__copy { color: var(--muted); font-size: 13px; }
.footer__list { display: grid; gap: 10px; }
.footer__list a { color: #334155; }

/* Forms */
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 14px; font-weight: 600; }
.input, .select, .textarea { 
  width: 100%; 
  padding: 16px 14px; 
  border-radius: 12px; 
  border: 2px solid var(--border); 
  background: #ffffff; 
  color: var(--text);
  font-size: 16px;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 115, 255, 0.1);
  transform: translateY(-1px);
}

.input:invalid, .select:invalid, .textarea:invalid {
  border-color: var(--danger);
}

.input:valid, .select:valid, .textarea:valid {
  border-color: var(--success);
}

.textarea { 
  min-height: 120px; 
  resize: vertical; 
  font-family: inherit;
}

.form__row { 
  display: grid; 
  grid-template-columns: repeat(2,1fr); 
  gap: 12px; 
}

.form__note { 
  color: var(--muted); 
  font-size: 12px; 
  line-height: 1.4;
}

/* Mobile form optimizations */
@media (max-width: 768px) {
  .input, .select, .textarea {
    padding: 18px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 16px;
  }
  
  .form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .field label {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .form {
    gap: 20px;
  }
  
  .btn {
    padding: 18px 24px;
    font-size: 16px;
    border-radius: 16px;
    min-height: 56px;
  }
  
  .form__note {
    font-size: 14px;
    text-align: center;
  }
}

/* Form validation styles */
.field.error .input,
.field.error .select,
.field.error .textarea {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.field.success .input,
.field.success .select,
.field.success .textarea {
  border-color: var(--success);
  background: rgba(22, 163, 74, 0.05);
}

.error-message {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.field.error .error-message {
  display: block;
}

/* Map */
.map-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #ffffff; }
.map-wrap iframe { width: 100%; height: 360px; border: 0; display: block; }

/* Modal */

/* Responsive */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .adv-list { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal[aria-hidden="false"] .modal__content {
  transform: scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.modal__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.modal__close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal__close:hover {
  background: var(--border);
  color: var(--text);
}

.modal__body {
  padding: 0 24px 24px;
}

/* Mobile menu */
.nav__menu {
  transition: all 0.3s ease;
  /* Prevent layout shifts */
  contain: layout style;
}

.nav__menu.mobile-open {
  display: flex !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1000;
  padding: 20px;
  margin: 0;
}

.nav__menu.mobile-open a {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  padding: 16px 24px;
  border-radius: 12px;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  max-width: 300px;
  background: transparent;
}

.nav__menu.mobile-open a:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.hamburger {
  position: relative;
  z-index: 1001;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.hamburger.active {
  transform: rotate(90deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 640px) {
  .nav__menu { 
    display: none; 
  }
  
  .hamburger { 
    display: block; 
  }
  
  .nav {
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    position: relative;
  }
  
  .nav__cta {
    flex-shrink: 0;
    gap: 8px;
    display: flex;
    align-items: center;
  }
  
  .nav__cta .btn {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .brand {
    flex-shrink: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .brand span:last-child {
    display: none;
  }
  
  /* Ensure mobile menu doesn't affect header layout */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
  }
  
  .nav__menu.mobile-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
  }
  
  .cards { 
    grid-template-columns: 1fr; 
  }
  
  .form__row { 
    grid-template-columns: 1fr; 
  }
  
  .section { 
    padding: 40px 0; 
  }
  
  .hero { 
    padding: 52px 0 28px; 
  }
  
  .cta { 
    grid-template-columns: 1fr; 
  }
  
  .footer__inner { 
    grid-template-columns: 1fr; 
  }
  
  .modal { 
    padding: 10px; 
  }
  
  .modal__content { 
    max-height: 95vh; 
  }
  
  .modal__header { 
    padding: 16px 16px 0; 
    margin-bottom: 16px; 
  }
  
  .modal__body { 
    padding: 0 16px 16px; 
  }
  
  .modal__title { 
    font-size: 20px; 
  }
}

/* Уведомления */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification__title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 16px;
}

.notification__text {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

@media (max-width: 640px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}


