/* =========================
   Base reset and variables
   ========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; min-height: 100%; }

:root{
  --color-primary: #ff6b00;
  --color-primary-hover: #ff8c33;
  --color-primary-rgb: 255, 107, 0;
  --color-accent-green: #4caf50;
  --color-mountain-text: #006064;
  --color-header-forest: rgba(27, 94, 32, 0.85);
  --color-footer-forest: rgba(27, 94, 32, 0.85);
  --color-header-mountain: rgba(224, 247, 250, 0.85);
  --color-footer-mountain: rgba(224, 247, 250, 0.85);
  --grad-primary-start: #ff6b00;
  --grad-primary-end: #ff8c33;

  /* Route photo height */
  --route-photo-height: 240px;
}

/* =========================
   Global layout & BG layers
   ========================= */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  position: relative;
  min-height: 100%;
  background: transparent;
  overflow-x: hidden;
}

/* Фиксированный слой фона */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Затемняющий слой + размытие */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px) saturate(120%);
  -webkit-backdrop-filter: blur(4px) saturate(120%);
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

/* Тема — картинка фона */
body.forest-theme::before { background-image: url('img/bg/les.png'); }
body.mountain-theme::before { background-image: url('img/bg/gory.png'); }

/* Контейнер */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================
   Header
   ========================= */
header {
  background-color: var(--color-header-forest);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: background-color 0.5s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mountain-theme header { background-color: var(--color-header-mountain); }

.header-content {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.logo {
  font-size: 1.8rem; font-weight: bold; color: #fff;
  transition: opacity 0.3s ease; display: flex; align-items: center; flex-shrink: 0;
}
.logo i { margin-right: 10px; }
.mountain-theme .logo { color: var(--color-mountain-text); }
.logo-link { text-decoration: none; color: inherit; display: inline-block; }
.logo-link:hover .logo { opacity: 0.85; }

/* =========================
   Theme switcher
   ========================= */
.theme-switcher-container { display: flex; align-items: center; gap: 10px; }
.theme-label { font-size: 0.9rem; font-weight: 500; transition: all 0.3s ease; }
.theme-label.active { font-weight: 700; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
.mountain-theme .theme-label.active { color: var(--color-mountain-text); text-shadow: 0 0 5px rgba(0,97,100,0.5); }

.theme-switch { position: relative; display: inline-block; width: 60px; height: 30px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
  position: absolute; inset: 0; cursor: pointer;
  background-color: #1b5e20; transition: background-color .3s ease;
  border-radius: 34px; box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
.theme-slider::before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 4px; bottom: 4px;
  background-color: #fff; border-radius: 50%;
  transition: transform .3s ease, background-image .3s ease;
  background-size: 16px; background-position: center; background-repeat: no-repeat;
}
.forest-theme .theme-slider::before { background-image: url('img/icons/forest.png'); }
.mountain-theme .theme-slider::before { background-image: url('img/icons/mountain.png'); }
input:checked + .theme-slider { background-color: #e0f7fa; }
input:checked + .theme-slider::before { transform: translateX(30px); }
.forest-theme .theme-slider { background-color: #1b5e20; }
.mountain-theme .theme-slider { background-color: #e0f7fa; }
.forest-theme .theme-slider::before { transform: translateX(0); }
.mountain-theme .theme-slider::before { transform: translateX(30px); }

/* =========================
   Main
   ========================= */
main { padding: 0 0 2rem 0; min-height: calc(100vh - 160px); }

/* Hero intro */
.hero { text-align: center; padding: 3rem 0; }
.hero h1 {
  font-size: 3.2rem; margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 2rem; line-height: 1.6; }
.cta-button {
  display: inline-block; background-color: var(--color-primary); color: #fff;
  padding: 12px 30px; border-radius: 50px; text-decoration: none;
  font-weight: 700; font-size: 1.05rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.cta-button:hover { background-color: var(--color-primary-hover); transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.4); }

/* Content card */
.content {
  background: rgba(255,255,255,0.12);
  border-radius: 12px; padding: 2rem; margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
}
h2 {
  margin-bottom: 1.5rem; font-size: 2.1rem; text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5); color: var(--color-primary);
}
h3 { margin-bottom: 1rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
p { line-height: 1.6; margin-bottom: 1rem; }

/* =========================
   Features
   ========================= */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; margin: 3rem 0;
}
.feature-link { text-decoration: none; color: inherit; display: block; }
.feature {
  background: rgba(255,255,255,0.15); border-radius: 12px; padding: 1.5rem; text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  height: 100%; display: flex; flex-direction: column; align-items: center;
}
.feature:hover { transform: translateY(-5px); background: rgba(255,255,255,0.25); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.feature-img-container { width: 100px; height: 100px; margin-bottom: 1rem; display: grid; place-items: center; }
.feature img { max-width: 100%; max-height: 100%; object-fit: contain; }
.feature h3 { font-size: 1.4rem; margin-bottom: .5rem; }

/* =========================
   Routes
   ========================= */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}
.route-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.12));
  border-radius: 15px; padding: 2rem; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  will-change: transform;
}
.route-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); border-color: rgba(255,107,0,0.3); }
.route-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
  opacity: 0; transition: opacity .25s ease;
}
.route-card:hover::before { opacity: 1; }

.way-overlay { position: absolute; bottom: -5px; right: -5px; width: 35px; height: 35px; background: var(--color-primary); border-radius: 50%; padding: 5px; box-shadow: 0 2px 10px rgba(255,107,0,0.4); }
.route-card h3 { color: var(--color-primary); text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }

.route-info { background: rgba(255,255,255,0.05); border-radius: 10px; padding: 1rem; margin-bottom: 1.5rem; }
.route-info p { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; font-size: .95rem; }
.route-info i { color: var(--color-primary); width: 20px; }

.route-features { list-style: none; padding: 0; margin: 1.5rem 0; }
.route-features li { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; font-size: .95rem; }
.route-features i { color: var(--color-accent-green); width: 20px; }

/* Фото маршрутов (единый размер) */
.route-card .route-media {
  position: relative; width: 100%; height: var(--route-photo-height);
  margin: 0 auto 1.5rem; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,0.06); box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.route-card .route-media img {
  display: block !important;
  width: 100% !important; height: 100% !important;
  max-width: none !important; max-height: none !important;
  object-fit: cover !important; object-position: center !important;
}

/* =========================
   Vehicles
   ========================= */
.vehicle-section {
  scroll-margin-top: 100px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px; padding: 2rem; margin: 3rem 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
}
.vehicle-section h2 { color: var(--color-primary); margin-bottom: 2rem; }

.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.vehicle-card {
  background: rgba(255,255,255,0.1); border-radius: 12px; padding: 1.5rem; text-align: center;
  transition: transform .25s ease, background .25s ease;
}
.vehicle-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.2); }

/* Контейнер изображений (сделали выше) */
.image-container {
  position: relative; display: block;
  height: 300px; /* выше для более крупных фото */
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
}

/* Фолбэк для старой разметки, если вдруг <img> лежит напрямую в .image-container */
.vehicle-card .image-container > img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain !important; object-position: center;
  display: block;
}

/* Слайдер внутри контейнера */
.image-container .gear-slider { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.image-container .gear-slides {
  display: flex; width: 100%; height: 100%;
  transition: transform 0.4s ease; will-change: transform;
}
.image-container .gear-slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  display: grid; place-items: center;
}

/* Универсальная посадка фото без обрезаний — одинаково во всех браузерах */
.image-container .gear-slide img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain !important; object-position: center;
  display: block; transition: transform 0.35s ease;
}
.image-container .gear-slider:hover .gear-slide img { transform: scale(1.02); }

• /* Навигация слайдера */
.gear-prev, .gear-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  border: none; background: rgba(0,0,0,0.35); color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  z-index: 3;
}
.gear-prev { left: 6px; }
.gear-next { right: 6px; }
.gear-prev:hover, .gear-next:hover { background: rgba(0,0,0,0.55); transform: translateY(-50%) scale(1.05); }

.gear-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 6px; z-index: 3;
}
.gear-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.6); border: none; padding: 0; cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.gear-dot.active { background: var(--color-primary); transform: scale(1.15); }

.vehicle-card h3 { color: var(--color-primary); margin-bottom: .5rem; }
.price { font-size: 1.5rem; font-weight: 700; color: var(--color-accent-green); margin: 1rem 0; }

.specs { display: flex; justify-content: space-around; margin: 1rem 0; }
.spec { text-align: center; }
.spec i { font-size: 1.5rem; color: var(--color-primary); margin-bottom: .5rem; }

/* =========================
   Footer
   ========================= */
footer {
  background-color: var(--color-footer-forest);
  padding: 2rem 0; text-align: center;
  transition: background-color 0.5s ease;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mountain-theme footer { background-color: var(--color-footer-mountain); }
.mountain-theme footer p { color: var(--color-mountain-text); }

.footer-content { display: flex; flex-wrap: wrap; justify-content: space-around; text-align: left; margin-bottom: 2rem; }
.footer-section { flex: 1; min-width: 250px; margin: 1rem; }
.footer-section h3 { margin-bottom: 1rem; color: var(--color-primary); }
.footer-section p { margin-bottom: .5rem; }

.social-icons { display: flex; gap: 1rem; margin-top: 1rem; }
.social-icons a { color: #fff; font-size: 1.5rem; transition: color .25s ease, transform .25s ease; }
.mountain-theme .social-icons a { color: var(--color-mountain-text); }
.social-icons a:hover { color: var(--color-primary); transform: translateY(-2px); }

/* =========================
   Hero slider (главный)
   ========================= */
.hero-slider {
  position: relative;
  height: 20vh; min-height: 350px; max-height: 500px;
  overflow: hidden; margin-bottom: 2rem; border-radius: 15px;
  isolation: isolate;
}
.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease; will-change: opacity;
}
.slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.3));
}
.slide.active { opacity: 1; }
.slide-content { position: relative; z-index: 2; text-align: center; color: #fff; max-width: 700px; padding: 0 20px; }
.slide-content h2 {
  font-size: 2.1rem; margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7); font-weight: 700;
}
.slide-content p {
  font-size: 1.15rem; margin-bottom: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7); line-height: 1.4;
}
.slider-controls {
  position: absolute; top: 50%; left: 0; right: 0;
  display: flex; justify-content: space-between;
  transform: translateY(-50%); z-index: 3; padding: 0 15px;
}
.slider-prev, .slider-next {
  background: rgba(var(--color-primary-rgb), 0.8);
  border: none; color: #fff; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  transition: transform .25s ease, background .25s ease; font-size: .9rem;
}
.slider-prev:hover, .slider-next:hover { background: var(--color-primary); transform: scale(1.1); }
.slider-dots {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px; z-index: 3;
}
.slider-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer;
  transition: transform .25s ease, background .25s ease;
}
.slider-dot.active { background: var(--color-primary); transform: scale(1.2); }

/* =========================
   Stats section
   ========================= */
.stats-section {
  background: linear-gradient(135deg, rgba(255,107,0,0.08), rgba(255,140,51,0.08));
  padding: 2rem 0; margin: 0 0 1rem 0; border-radius: 12px;
}

/* Всегда одна строка для статистики + горизонтальный скролл */
.stats-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
}
.stat {
  display: flex; align-items: center; gap: .8rem;
  background: rgba(255,255,255,0.08);
  padding: 1rem; border-radius: 10px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  min-height: 70px; border: 1px solid rgba(255,255,255,0.1);
  animation: statAppear .5s ease-out both;
  scroll-snap-align: start;
}
.stat:hover { transform: translateY(-2px); background: rgba(255,255,255,0.12); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.stat-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(255,107,0,0.3);
}
.stat-content { display: flex; flex-direction: column; flex: 1; }
.stat-number { font-size: 1.5rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; margin-bottom: .2rem; }
.stat-label { font-size: .75rem; color: rgba(255,255,255,0.85); line-height: 1.2; font-weight: 500; }
@keyframes statAppear {
  from { opacity: 0; transform: translateY(15px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.stat:nth-child(1){ animation-delay: .1s; }
.stat:nth-child(2){ animation-delay: .2s; }
.stat:nth-child(3){ animation-delay: .3s; }
.stat:nth-child(4){ animation-delay: .4s; }

/* =========================
   Booking CTA links styling
   ========================= */
#booking p a:not(.cta-button) {
  color: var(--color-primary); font-weight: 600; text-decoration: none;
  position: relative; padding-left: 28px;
  transition: color .25s ease, transform .2s ease, text-shadow .25s ease, background-size .25s ease;
  background-image: linear-gradient(var(--color-primary), var(--color-primary));
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 2px;
}
#booking p a:not(.cta-button):hover, #booking p a:not(.cta-button):focus {
  color: #fff; text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.7);
  transform: translateY(-1px); background-size: 100% 2px; outline: none;
}
#booking p a:not(.cta-button)::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 20px; height: 20px; transform: translateY(-50%);
  color: var(--color-primary); transition: color .25s ease, transform .25s ease, opacity .25s ease;
  opacity: .95; text-rendering: auto; -webkit-font-smoothing: antialiased; font: var(--fa-font-solid);
}
#booking a[href^="tel:"]:not(.cta-button)::before    { content: "\f095"; } /* fa-phone */
#booking a[href^="mailto:"]:not(.cta-button)::before { content: "\f0e0"; } /* fa-envelope */
#booking p a:not(.cta-button)::after {
  content: ''; position: absolute; left: 2px; top: 50%;
  width: 26px; height: 26px; transform: translateY(-50%) scale(0.7);
  border-radius: 50%; border: 2px solid rgba(var(--color-primary-rgb), 0.28);
  opacity: 0; transition: transform .25s ease, opacity .25s ease; pointer-events: none;
}
#booking p a:not(.cta-button):hover::before, #booking p a:not(.cta-button):focus::before { color: #fff; transform: translateY(-50%) scale(1.05); opacity: 1; }
#booking p a:not(.cta-button):hover::after,  #booking p a:not(.cta-button):focus::after  { transform: translateY(-50%) scale(1); opacity: 1; }

/* =========================
   Scroll behavior & anchors
   ========================= */
html { scroll-behavior: smooth; }
section[id], .content[id], .vehicle-section[id] { scroll-margin-top: 100px; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 1100px) {
  .routes-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 1.5rem; }
}
@media (max-width: 1024px) {
  .hero-slider { height: 45vh; min-height: 320px; max-height: 450px; }
  .slide-content h2 { font-size: 2rem; }
  .slide-content p  { font-size: 1.05rem; }
  :root { --route-photo-height: 200px; }
}
@media (max-width: 768px) {
  .header-content { padding: 0 15px; }
  .logo { font-size: 1.5rem; }
  .theme-label { font-size: 0.8rem; }
  .theme-switch { width: 50px; height: 25px; }
  input:checked + .theme-slider::before { transform: translateX(25px); }
  .theme-slider::before { height: 19px; width: 19px; background-size: 14px; }

  .hero h1 { font-size: 2.4rem; }
  .content { padding: 1.5rem; }

  .features { grid-template-columns: repeat(auto-fit, minmax(250px, 1,fr)); }
  .feature-img-container { width: 80px; height: 80px; }

  /* выше, чем на десктопе было раньше */
  .image-container { height: 260px; }

  .hero-slider { height: 40vh; min-height: 280px; max-height: 380px; margin-bottom: 1.5rem; }
  .slide-content h2 { font-size: 1.7rem; margin-bottom: .8рем; }
  .slide-content p  { font-size: 1rem;  margin-bottom: 1.2rem; }
  .slider-prev, .slider-next { width: 35px; height: 35px; font-size: .85rem; }
  .slider-dots { bottom: 15px; }
  .slider-dot { width: 8px; height: 8px; }

  .stats-section { padding: 1.5rem 0; margin: 1rem 0; }
  .footer-content { flex-direction: column; }
}
@media (max-width: 700px) {
  .routes-grid { grid-template-columns: 1fr; }
  .route-card { padding: 1.2рем; }
  .way-overlay { width: 30px; height: 30px; }
}
@media (max-width: 480px) {
  .logo { font-size: 1.3rem; }
  .theme-label { display: none; }

  .hero h1 { font-size: 2rem; }
  .content { padding: 1rem; }

  .features { grid-template-columns: 1fr; }
  .feature-img-container { width: 70px; height: 70px; }

  .vehicle-grid { grid-template-columns: 1fr; }

  .image-container { height: 220px; }
  .gear-prev, .gear-next { width: 28px; height: 28px; }
  .gear-dot { width: 6px; height: 6px; }

  .hero-slider { height: 35vh; min-height: 250px; max-height: 320px; border-radius: 10px; }
  .slide-content h2 { font-size: 1.5rem; }
  .slide-content p  { font-size: .9rem; margin-bottom: 1rem; }
  .cta-button { padding: 8px 20px; font-size: .9rem; }
  .slider-controls { padding: 0 10px; }

  /* Улучшаем читаемость фоновых карточек */
  .content, .vehicle-section, .route-card {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }
}
@media (max-width: 360px) {
  .stats-grid { grid-auto-columns: minmax(180px, 1fr); }
  .stat { flex-direction: row; text-align: left; padding: .6rem; }
  .stat-icon { width: 26px; height: 26px; font-size: .75rem; }
  .stat-number { font-size: 1.1rem; }
  .stat-label { font-size: .6rem; }
  .image-container { height: 200px; }
}

/* === FIX: фото техники не обрезаются + контейнер выше (оверрайды) === */

/* Чуть выше контейнер под фото + убираем паддинги, режем только фон */
.image-container {
  height: 300px !important;      /* сделано выше */
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
}

/* Слайдер занимает весь контейнер */
.image-container .gear-slider,
.image-container .gear-slides,
.image-container .gear-slide {
  width: 100% !important;
  height: 100% !important;
}

/* Центрирование содержимого слайда */
.image-container .gear-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Универсальная посадка фото: без обрезаний во всех браузерах */
.image-container img,
.image-container .gear-slide img,
.vehicle-card .image-container > img { /* фолбэк если без слайдера */
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;   /* ключевой момент: НИЧЕГО НЕ РЕЖЕМ */
  object-position: center !important;
  display: block !important;
}

/* Отключаем масштаб на hover, чтобы не «подпиливало» края в некоторых браузерах */
.image-container .gear-slider:hover img {
  transform: none !important;
}

/* Стрелки поверх фото (на случай z-index конфликтов) */
.gear-prev, .gear-next, .gear-dots {
  z-index: 3 !important;
}

/* Адаптив: тоже чуть выше, но поменьше на узких экранах */
@media (max-width: 768px) {
  .image-container { height: 260px !important; }
}
@media (max-width: 480px) {
  .image-container { height: 220px !important; }
}
@media (max-width: 360px) {
  .image-container { height: 200px !important; }
}

/* Лого в шапке как картинка */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}
.logo-text {
  line-height: 1;
}

/* =========================
   Header: навигация + бургер на телефонах
   ========================= */

/* Базовая горизонтальная навигация (десктоп) */
.site-nav { display: block; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin: 0;
}
.nav-item { display: inline-block; }
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  transition: background-color .18s ease, transform .12s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-links a:hover,
.nav-links a:focus {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

/* Бургер (скрыт на десктопе) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: none; background: transparent; color: #fff; cursor: pointer;
  border-radius: 8px;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mountain-theme .menu-toggle { color: var(--color-mountain-text); }
.menu-toggle:hover { background: rgba(255,255,255,0.10); transform: translateY(-1px); }
.menu-toggle:focus { outline: 2px solid rgba(255,255,255,0.3); outline-offset: 2px; }

.menu-toggle .bar {
  position: relative;
  width: 22px; height: 2px; background: currentColor;
  border-radius: 1px; transition: background .2s ease;
}
.menu-toggle .bar::before,
.menu-toggle .bar::after {
  content: "";
  position: absolute; left: 0;
  width: 22px; height: 2px; background: currentColor;
  border-radius: 1px; transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle .bar::before { transform: translateY(-6px); }
.menu-toggle .bar::after  { transform: translateY( 6px); }
.menu-toggle.is-active .bar { background: transparent; }
.menu-toggle.is-active .bar::before { transform: rotate(45deg); }
.menu-toggle.is-active .bar::after  { transform: rotate(-45deg); }

/* Мобильная логика: переключатель темы левее, меню – бургер справа */
@media (max-width: 720px) {
  .header-content { position: relative; gap: 10px; }
  .logo-link                 { order: 0; }
  .theme-switcher-container  { order: 1; } /* "переезжает" левее — ближе к логотипу */
  .menu-toggle               { order: 2; display: inline-flex; } /* бургер справа */
  .site-nav                  { order: 3; }

  /* Превращаем навигацию в выпадающее меню в правом верхнем углу */
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    display: none !important; /* скрыто по умолчанию */
    width: min(86vw, 320px);
    border-radius: 12px;
    z-index: 120;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
  }
  /* Цвет под тему */
  .forest-theme .site-nav { background-color: var(--color-header-forest); }
  .mountain-theme .site-nav { background-color: var(--color-header-mountain); }

  /* Маленький «треугольник»-указатель */
  .site-nav::before {
    content: "";
    position: absolute;
    top: -8px; right: 16px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255,255,255,0.85); /* будет перекрыт темой ниже */
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.15));
  }
  .forest-theme .site-nav::before   { border-bottom-color: var(--color-header-forest); }
  .mountain-theme .site-nav::before { border-bottom-color: var(--color-header-mountain); }

  /* Внутри дропа — вертикальный список */
  .site-nav .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    margin: 0;
    overflow: visible;
  }
  .site-nav .nav-links a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    white-space: nowrap;
  }

  /* Показ меню при открытии (добавляется классом из JS) */
  .site-nav.is-open { display: block !important; }
}

/* Чуть поджать элементы на очень узких */
@media (max-width: 480px) {
  .menu-toggle { width: 36px; height: 36px; }
  .site-nav { right: 10px; width: min(90vw, 300px); }
  .site-nav .nav-links a { padding: 9px 10px; font-size: 0.95rem; }
}
