:root{
  --primary-red:#e31e24;
  --dark-bg:#151515;
  --light-bg:#f6f6f6;
  --text-main:#1f1f1f;
  --text-light:rgba(31,31,31,.4);
  --white:#fff;
  /* Default input border (neutral). Error state is handled via .is-invalid / CF7 classes below */
  --border-color: rgba(17, 24, 39, 0.18);
}

*,
*::before,
*::after{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  font-family:'Inter',sans-serif;
  margin:0;
  padding:0;
  color:var(--text-main);
  background:var(--white);
  line-height:1.5;
}

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

h1,h2,h3,h4,h5,h6,p{ margin:0; }

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

button{
  border:0;
  background:none;
  cursor:pointer;
  font-family:inherit;
}

.container{
  max-width:1440px;
  margin:0 auto;
  padding:0 20px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--primary-red);
  color:var(--white);
  padding:15px 26px;
  border-radius:12px;
  font-weight:600;
  transition:opacity .2s;
  width: 100%;
  border: none;
  cursor: pointer;
}
.btn:hover{ opacity:.9; }

/* Utility for merged images */
.merged-image-container{ position:relative; }
.merged-image-layer{ position:absolute; }

/* ===================== HEADER ===================== */
#section-header{
  background:var(--dark-bg);
  color:var(--white);
}

.site-header{ padding:29px 0; }

.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.header-right{
  display:flex;
  align-items:center;
  gap:77px;
}

.main-nav{ display:flex; gap:50px; }
.main-nav a{ font-size:16px; font-weight:400; }

.header-contacts{ display:flex; gap:30px; }

.contact-item{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:16px;
}

.icon{ color:#c4300a; font-family:sans-serif; }

/* ===================== HERO ===================== */
#section-hero{ padding:60px 0; }

.hero-container{
  display:flex;
  align-items:center;
  gap:0;
}

.hero-content{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:87px;
  padding:0 65px;
  position:relative;
  flex:1;
  align-self:stretch;
  background:var(--light-bg);
  border-radius:12px 0 0 12px;
  overflow:hidden;
}

.hero-text-block{
  display:flex;
  flex-direction:column;
  gap:38px;
}

.hero-content h1{
  font-size:40px;
  font-weight:700;
  line-height:1.2;
  color:var(--text-main);
}
.hero-content h1 strong, .about-header h2 strong{ color:var(--primary-red); }

.hero-subtitle{
  font-size:24px;
  font-weight:600;
  color:var(--text-main);
}

.hero-description{
  font-size:16px;
  line-height:1.5;
  color:var(--text-main);
}

.hero-image-wrapper{
  width:44%;
  position:relative;
}
.hero-image-wrapper .merged-image-container{
  border-radius:0 12px 12px 0;
  overflow:hidden;
  position:relative;
}
.hero-gradient-overlay{
  border-radius:inherit;
  pointer-events:none;
}

.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  object-position: 13% 80%;
}

.hero-gradient-overlay{
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:32%;
  background:linear-gradient(to right, rgba(219,53,12,0) 0%, rgba(219,53,12,.8) 100%);
}

/* ===================== STATS ===================== */
#section-stats{ padding: 0 0 60px 0; }

.stats-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:18px;
}

.stat-card{
  background:rgba(221,221,221,.25);
  border-radius:12px;
  padding:26px 25px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.stat-title{
  font-weight:700;
  font-size:20px;
  margin-bottom:4px;
}

.stat-subtitle{
  font-size:14px;
  color:var(--text-main);
}

@media (max-width:1024px){
  .stats-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:768px){
  .stats-grid{ grid-template-columns:repeat(2,1fr); }
  .avmfc-turnstile {
		width: 100%;
	}
}
@media (max-width:480px){
  .stats-grid{ grid-template-columns:1fr; }
}

/* ===================== ABOUT ===================== */
#section-about{ padding:60px 0; }

.about-container{ display:flex; gap:24px; }

.about-content{
  background:rgba(221,221,221,.25);
  border-radius:12px;
  padding:36px;
  width:50%;
  display:flex;
  flex-direction:column;
  gap:50px;
}

.about-header{ display:flex; flex-direction:column; gap:20px; }
.about-header h2{ font-size:32px; font-weight:700; }

.about-list{ display:flex; flex-direction:column; gap:26px; }
.about-item{ display:flex; gap:16px; align-items:flex-start; }

.about-note{ font-size:14px; color:rgba(0,0,0,.5); }

.about-images{ width:50%; }

.image-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  height:100%;
}
.grid-item{
  border-radius:12px;
  overflow:hidden;
  height:100%;
}
.grid-item img{
  width:100%;
  height:100%;
  object-fit:cover;
}

@media (max-width:1024px){
  .about-container{ flex-direction:column; }
  .about-content,.about-images{ width:100%; }
  .image-grid{ height:auto; }
  .grid-item{ aspect-ratio:1; }
  .hero-container{ flex-direction:column; }
  .hero-content{
    width:100%;
    padding:40px;
    gap:40px;
    border-radius: 12px 12px 0 0;
  }
  .hero-image-wrapper{ width:100%; }
  .hero-image-wrapper .merged-image-container{ border-radius: 0 0 12px 12px; }
  .hero-content h1 {
    font-size: 23px;
	line-height: 1;
  }
  .hero-subtitle {
	font-size: 20px;
	line-height: 1;
   }
   .about-header h2 {
     font-size: 22px;
	 line-height: 1;
   }
   .features-header h2, .traffic-header h2, .contact-info h2 {
		font-size: 28px !important;
		font-weight: 700;
		text-align: center;
		line-height: 1;
	}
}
/* ===================== FEATURES ===================== */
#section-features{ padding:60px 0; }

.features-header{ margin-bottom:60px; }
.features-header h2{ font-size:36px; font-weight:700; display: flex; justify-content: center; }

.features-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:36px;
}

.feature-card{
  background:var(--light-bg);
  border-radius:12px;
  padding:21px 29px;
  display:flex;
  flex-direction:column;
  gap:26px;
}

.feature-text h3{
  font-size:20px;
  font-weight:700;
  margin-bottom:18px;
}

.feature-text p{ font-size:16px; line-height:1.5; }

.feature-cta{ justify-content:space-between; }
.cta-title{ color:var(--primary-red); }

@media (min-width:1024px){
	.grid-item__img4 img {
		object-position: 38% 80%;
	}
}

@media (max-width:1024px){
  .features-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px){
  .features-grid{ grid-template-columns:1fr; }
}

/* ===================== TRAFFIC ===================== */
#section-traffic{ padding:60px 0; }

.traffic-header{
  text-align:center;
  margin-bottom:60px;
  padding: 36px;
}
.traffic-header h2{
  font-size:36px;
  margin-bottom:30px;
}

.traffic-interface{
  background:var(--light-bg);
  border-radius:12px;
  padding:36px;
  max-width:849px;
  margin:0 auto;
}

.traffic-controls{ margin-bottom:39px; }

.control-group label{
  display:block;
  margin-bottom:12px;
  font-weight:600;
}

/* results */
.traffic-results{
  background:var(--white);
  border-radius:12px;
  padding:10px 24px;
  border:1px solid #e5e5e5;
}

.result-header{
  display:flex;
  justify-content:space-between;
  color:rgba(0,0,0,.4);
  margin-bottom:10px;
  font-weight:600;
}

.result-row{
  display:flex;
  justify-content:space-between;
  padding:14px 0;
  font-weight:500;
}

.default-row{ color:var(--text-main); }

/* ===================== PORTFOLIO (FIX: 3 cards desktop + mobile like design) ===================== */
#section-portfolio{ padding:60px 0; }

.portfolio-header{
  text-align:center;
  margin-bottom:60px;
}

/* ВАЖНО: у тебя карусель на transform (JS), поэтому контейнер должен CLIP'ать */
.portfolio-gallery{
  /* базовые переменные */
  --pg-gap: 18px;
  --pg-item-w: calc((100% - (var(--pg-gap) * 2)) / 3); /* ровно 3 карточки на десктопе */

  position:relative;
  overflow:hidden;              /* режем 4-ю карточку */
  padding:0;                    /* без внутренних отступов на десктопе */
  touch-action: pan-y;          /* жесты обрабатывает JS, страницу можно скроллить по Y */
  user-select:none;
}

/* трек */
.portfolio-gallery .pg-track{
  display:flex;
  gap:var(--pg-gap);
  align-items:stretch;
  will-change:transform;
  transform:translate3d(0,0,0);
}

/* карточка — фиксируем ширину через переменную */
.portfolio-gallery .portfolio-item{
  flex:0 0 var(--pg-item-w);
  border-radius:12px;
  overflow:hidden;
  background:var(--light-bg);
  aspect-ratio: 425 / 468;      /* как в макете (примерно) */
  display:block;
}

/* фото должно заполнять карточку (без чёрных полос) */
.portfolio-gallery .portfolio-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:0;
  display:block;
}

/* планшет: 2 карточки */
@media (max-width: 1024px){
  .portfolio-gallery{
    --pg-item-w: calc((100% - var(--pg-gap)) / 2);
  }
}

/* мобилка: 1 карточка + видно соседние края (как в дизайне) */
@media (max-width: 768px){
  .portfolio-gallery{
    --pg-gap: 18px;
    --pg-item-w: 100%;          /* большая карточка */
    padding:0 16px;             /* чтобы карточка не прилипала к краю */
  }
}

/* курсор для десктоп drag */
.portfolio-gallery{ cursor:grab; }
.portfolio-gallery.is-dragging{ cursor:grabbing; }

/* ===== Lightbox ===== */
.pg-lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.78);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:24px;
}
.pg-lightbox.is-open{ display:flex; }
.pg-lightbox__inner{
  width:min(1100px,100%);
  max-height:100%;
  display:grid;
  grid-template-rows:1fr auto;
  gap:12px;
}
.pg-lightbox__imgWrap{
  display:grid;
  place-items:center;
  min-height:200px;
}
.pg-lightbox__img{
  max-width:100%;
  max-height:78vh;
  border-radius:14px;
  background:#111;
}
.pg-lightbox__caption{
  color:#fff;
  font-size:18px;
  text-align:center;
  opacity:.95;
}
.pg-lightbox__btn{
  position:absolute;
  top:16px;
  width:42px;
  height:42px;
  border-radius:999px;
  border:0;
  background:rgba(255,255,255,.14);
  color:#fff;
  cursor:pointer;
}
.pg-lightbox__close{ right:16px; }
.pg-lightbox__prev,
.pg-lightbox__next{
  top:50%;
  transform:translateY(-50%);
}
.pg-lightbox__prev{ left:16px; }
.pg-lightbox__next{ right:16px; }

/* ===================== MAP ===================== */
#section-map{ padding:60px 0; }

.map-header{
  text-align:center;
  margin-bottom:60px;
}

.map-interface{
  background:var(--light-bg);
  border-radius:18px;
  padding:24px;
}

.map-controls{
  margin-bottom:39px;
  max-width:450px;
}

.map-controls label{
  display:block;
  margin:0 0 10px;
  font-weight:600;
}

.map-content{
  background:var(--white);
  border-radius:12px;
  padding:36px 24px;
  display:flex;
  gap:30px;
}

.location-details{
  width:35%;
  display:flex;
  flex-direction:column;
  gap:30px;
}

.location-text h3{
  font-size:20px;
  margin-bottom:10px;
}

.location-text p{ color:rgba(31,31,31,.4); }

.location-image img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:14px;
  display:block;
}

/* список точек */
.location-points{
  border-top:1px solid #eee;
  padding-top:12px;
}
.points-title{ font-weight:700; margin-bottom:10px; }
.points-list{ display:flex; flex-direction:column; gap:8px; }

.point-btn{
  border:1px solid #e5e5e5;
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  text-align:left;
}
.point-btn:hover{ background:#f6f7f8; }
.point-btn.active{ border-color:#111827; }

.map-view{ width:65%; position:relative; }

.map-cover{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  height:100%;
  max-height:420px;
  background:#f3f4f6;
}
.map-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(.9);
}
.map-open-btn{
  position:absolute;
  left:16px;
  bottom:16px;
  border:0;
  border-radius:12px;
  padding:12px 14px;
  background:rgba(17,24,39,.92);
  color:#fff;
  cursor:pointer;
  font-weight:700;
}
.map-canvas{
  width:100%;
  height:420px;
  border-radius:14px;
  overflow:hidden;
}

@media (max-width:1024px){
  .map-content{ flex-direction:column; }
  .location-details,.map-view{ width:100%; }
}
@media (max-width:900px){
  .map-cover,.map-canvas{ min-height:320px; height:320px; }
}

/* ===================== CONTACT ===================== */
#section-contact{
  padding:60px 0;
}

.contact-container{
  display:flex;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  padding: 0 20px;
}
.contact-container__inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  background: var(--light-bg);
  border-radius: 18px;
  padding: 36px 48px;
  width: 100%;
}


.contact-info{ width:50%; }
.contact-info h2{
  font-size:36px;
  margin-bottom:60px;
}

.contact-methods{
  display:flex;
  flex-direction:column;
  gap:35px;
  margin-bottom:100px;
}

.contact-row{
  display:flex;
  align-items:center;
  gap:22px;
  font-size:18px;
}

.legal-info{
  color:rgba(31,31,31,.4);
  line-height:1.6;
}

.contact-form-wrapper{
  width:50%;
  max-width:591px;
}

.contact-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.form-group input,
.form-group textarea{
  width:100%;
  padding:15px 24px;
  border:1px solid var(--border-color);
  border-radius:12px;
  font-family:inherit;
  font-size:16px;
}
.form-group textarea{ resize:vertical; }

@media (max-width:768px){
  .contact-container{
    flex-direction:column;
    align-items:flex-start;
  }
  .contact-info,.contact-form-wrapper{ width:100%; }
  .contact-methods{ margin-bottom:40px; }

}

@media (max-width:1024px){
  .container{ padding:0 16px; }
  .contact-container__inner{
    flex-direction: column;
  }
  .stat-card {
    flex-direction: row;
  }

  #section-hero {
    padding: 80px 0 60px 0;
  }

  #section-contact {
    padding: 60px 0;
    margin-top: 0;
  }
  #section-features {
    padding: 60px 0;
  }

}

/* ===================== UI: DROPDOWN (общий для traffic и map) ===================== */
.dropdown-mockup{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  height:59px;

  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:12px;
  cursor:pointer;
}

.dropdown-placeholder{ color:#9aa0a6; }

.chip{
  display:flex;
  align-items:center;
  background:#f3f4f6;
  border-radius:999px;
  padding:8px 10px;
}

.chip-x{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  opacity:.7;
}

.reset-btn{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  background:transparent;
  cursor:pointer;
  color:#6b7280;
}

.dropdown-menu{
  position:absolute;
  left:0; right:0;
  top:calc(100% + 8px);
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  padding:10px;
  z-index:50;
}

.dropdown-search{
  width:100%;
  border:1px solid #e5e5e5;
  border-radius:10px;
  padding:10px 12px;
  outline:none;
}

.dropdown-list{
  list-style:none;
  margin:10px 0 0;
  padding:0;
  max-height:260px;
  overflow:auto;
}

.dropdown-item{
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.dropdown-item:hover{ background:#f6f7f8; }
.dropdown-item small{ color:#9aa0a6; }

/* ===================== MOBILE MENU (off-canvas + fixed header) ===================== */
.mobile-menu-toggle{
  display:none; /* desktop */
  background:transparent;
  border:0;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  color:#fff;
}

/* backdrop */
.mobile-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:1150;
}

/* mobile */
@media (max-width:1290px){
  .mobile-menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  /* фиксируем шапку */
  .site-header{
    position:fixed;
    top:0; left:0; right:0;
    z-index:3000;
    background:var(--dark-bg);
    box-shadow:0 6px 16px rgba(0,0,0,.12);
  }

  /* отступ под fixed header */
  body{ padding-top:74px; }

  /* off-canvas panel */
  .header-right{
    position:fixed;
    top:0;
    right:0;
    height:100vh;
    width:min(86vw,360px);
    background:#111;
    z-index:2900; /* выше backdrop */

    display:flex;
    flex-direction:column;
    gap:16px;

    padding:84px 20px 20px;
    transform:translateX(110%);
    transition:transform .22s ease;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }

  .header-right.is-open{ transform:translateX(0); }

  /* вертикальная навигация */
  .main-nav{
    display:flex;
    flex-direction:column;
    gap:14px;
  }
  .main-nav a{
    color:#fff;
    text-decoration:none;
    font-size:16px;
  }

  .header-contacts{
    display:flex;
    flex-direction:column;
    gap:10px;
    color:#fff;
  }
  .contact-item span{ color:#fff; }
}

/* lock scroll when menu open */
body.menu-open{ overflow:hidden; }

/* CF7 validation + layout (ArtVision) */
.wpcf7 .wpcf7-form-control-wrap{
  display:block;
  width:100%;
}

/* Красная рамка на невалидном поле */
.wpcf7 .wpcf7-not-valid{
  border: 1px solid #e53935 !important;
  outline: none;
}

/* Текст ошибки под полем */
.wpcf7 .wpcf7-not-valid-tip{
  display:block;
  margin-top:6px;
  font-size:12px;
  line-height:1.2;
  color:#e53935;
}

/* Сообщение формы (убираем жёлтый стиль CF7, но показываем success) */
.wpcf7 form .wpcf7-response-output{
  display:none; /* по умолчанию скрыто */
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  font-size:14px;
  line-height:1.35;
  background:#fff;
  border:1px solid transparent;
  color:#111;
}

/* Показываем только при успешной отправке (класс ставим в global.js) */
.wpcf7 form.is-success .wpcf7-response-output{
  display:block;
  border-color:#1b7a3a;
}

/* Не показываем общий блок при ошибках — подсвечиваем поля */
.wpcf7 form.is-invalid .wpcf7-response-output,
.wpcf7 form.is-failed .wpcf7-response-output,
.wpcf7 form.is-aborted .wpcf7-response-output{
  display:none;
}

/* Подсветка невалидных полей (класс ставит наш JS) */
.wpcf7 form .wpcf7-form-control.is-invalid{
  border-color:#d32f2f !important;
  box-shadow:0 0 0 2px rgba(211,47,47,.18) !important;
}
.wpcf7 form .wpcf7-form-control.is-invalid::placeholder{
  color:#b71c1c;
}

/* Визуальный disabled для кнопки */
.wpcf7 form .btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Отступы между полями как в макете */
#section-contact .contact-form-wrapper .form-group{
  margin-bottom:12px;
}

/* Чтобы textarea не “прилипала” к ошибке */
#section-contact .contact-form-wrapper textarea{
  resize: vertical;
}

.wpcf7 .screen-reader-response {
    position: relative;
    overflow: auto;
    height: auto;
    display: flex;
    margin: 0;
    padding: 15px 0;
    width: 100%;
    border: 0;
    word-wrap: normal !important;
	display: flex;
	flex-direction: column;
	clip-path: border-box;
}
.screen-reader-response ul {
	width: 100%;
	display: none;
}
.screen-reader-response p {
    color: green;
    padding: 15px;
    border-radius: 12px;
    width: 100%;
}