/* ====== FONTS ====== */
/* Папки: assets/Fonts/Montserrat Subrayada/MontserratSubrayada-Regular.ttf
          assets/Fonts/Montserrat Ace/Montserrat-Ace-Light.otf */
@font-face {
  font-family: "MontserratAce";
  src: url("assets/Fonts/Montserrat Ace/Montserrat-Ace-Light.otf")
    format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MontserratSubrayada";
  src: url("assets/Fonts/Montserrat Subrayada/MontserratSubrayada-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ====== THEME ====== */
:root {
  --bg: #ffffff;
  --text: #14171f;
  --muted: #5f6572;
  --primary: #e53935;
  --primary-600: #c62828;
  --border: #e9edf1;
  --container: 1200px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  /* команда: приглушённый красный (основной) и hover */
  --team-red: #b85b57; /* приглушённый терракотовый/красный */
  --team-red-hover: #d45752; /* чуть ярче при hover */
  --team-red-overlay: rgba(212, 87, 82, 0.14); /* мягкий tint для фото */
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    "MontserratAce",
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
h1,
h2,
h3,
h4 {
  font-family:
    "MontserratSubrayada",
    "MontserratAce",
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 10px;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
p {
  margin: 0 0 12px;
  color: var(--muted);
}

/* ====== Topbar + Header ====== */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: #4b5563;
}

.topbar .container {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 20px;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
}
.topbar svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}
.topbar .sp {
  flex: 1;
}

@media (max-width: 650px) {
  .topbar {
    font-size: 12px;
  }

  .topbar .container {
    padding: 8px 10px;
    gap: 10px;
  }
}

@media (max-width: 500px) {
  .topbar {
    font-size: 8px;
  }

  .topbar .container {
    gap: 5px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  z-index: 120;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border, #e9edf1);
  transition:
    box-shadow 0.25s,
    transform 0.25s;
}

/* Когда фиксируем — добавляем тень и делаем фиксированной поверх контента */
.site-header.sticky .header-inner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 220; /* больше чем у остальных элементов */
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  transform: translateZ(0);
}

@media (max-width: 1200px) {
  .header-inner {
    padding: 12px 10px;
  }

  .nav-list {
    font-size: 13px;
  }
}

.brand img {
  height: 46px;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  z-index: 1000;
  margin-right: 20px;
}
.nav-list a {
  position: relative;
  padding: 10px 10px;
  border-radius: 10px;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s;
}
.nav-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-list a.active {
  background: linear-gradient(
    180deg,
    rgba(229, 57, 53, 0.08),
    rgba(229, 57, 53, 0)
  );
}
.nav-list a.active::after {
  transform: scaleX(1);
}

/* ====== Sections / UI ====== */
.hero-slider {
  z-index: 100;
}

.hero {
  padding: 72px 0 28px;
  border-bottom: 1px solid var(--border);
}
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;

  img {
    width: 100%;
  }

  .company-build {
    max-height: 400px;
  }
}

.media {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fafafa;
}
.badge {
  display: inline-block;
  background: rgba(229, 57, 53, 0.1);
  color: var(--primary-600);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(229, 57, 53, 0.15);
}
.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  border-color: transparent;
  color: white;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.img-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.img-reveal.visible {
  opacity: 1;
  transform: none;
}

/* Slider */
.hero-slider {
  position: relative;
  border-bottom: 1px solid var(--border);
}
.slider {
  position: relative;
  height: 64vh;
  min-height: 420px;
  border-radius: 0;
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  object-fit: fill;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
}
.slide.active {
  opacity: 1;
}
.slide .ph {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #f6f6f6,
    #f6f6f6 20px,
    #ededed 20px,
    #ededed 40px
  );
}
.hero-box {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0 0 14px 14px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-box h1 {
  font-size: 38px;
  margin-top: 6px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hero-actions .btn {
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 800px) {
  .hero-box {
    max-width: 400px;
    padding: 10px 15px;
  }

  .hero-box h1 {
    font-size: 24px;
  }

  .hero-box p {
    font-size: 12px;
  }

  .hero-actions {
    gap: 5px;
  }

  .hero-actions .btn,
  .hero-actions .btn-primary {
    padding: 10px;
    font-size: 12px;
  }
}

@media (max-width: 500px) {
  .hero-box {
    width: 100%;
    max-width: 250px;
    margin-right: 60px;
    margin-top: auto;
    padding: 10px 15px;
    transform: unset;
    left: -9px;
  }

  .hero-box h1 {
    font-size: 16px;
  }

  .hero-box p {
    font-size: 10px;
    margin: 0;
  }

  .hero-actions {
    gap: 5px;
    display: flex;
    align-items: center;

    a {
      display: block;
    }
  }

  .hero-actions .btn,
  .hero-actions .btn-primary {
    padding: 5px;
    font-size: 5px;
    width: calc(100% - 40px);
  }
}

/* Cards (Unsere Leistungen) */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  object-fit: contain;
  border: 2px solid var(--primary);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #fff;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(229, 57, 53, 0.12);
}
.card .imgph {
  height: 555px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  background: repeating-linear-gradient(
    45deg,
    #fafafa,
    #fafafa 20px,
    #f0f0f0 20px,
    #f0f0f0 40px
  );
}

.card .imgph.uber-uns-image {
  object-position: top;
}

@media (max-width: 950px) {
  .cards {
    display: flex;
    align-items: center;
    flex-direction: column;
  }

  .card {
    height: fit-content;
    width: calc(100% - 20px);
    object-fit: contain;
  }

  .card .imgph {
    max-height: fit-content;
  }
}

@media (max-width: 600px) {
  .card .imgph {
    height: 250px;
  }
}

.card-inner {
  padding: 16px;
}
.card .fill {
  position: absolute;
  inset: 0;
  background: rgba(229, 57, 53, 0.06);
  opacity: 0;
  transition: opacity 0.25s;
}
.card:hover .fill {
  opacity: 1;
}
.card .btn {
  margin-top: 10px;
}

/* Vorteile */
.vorteile .center-ph {
  object-fit: contain;
  max-width: 100%;
  max-height: 500px;
  height: 100%;
  margin: 0 auto;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: #fafafa;
}
.vorteile-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 1020px) {
  .vorteile-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;

    .feature {
      h3 {
        font-size: 16px;
      }

      p {
        font-size: 12px;
      }
    }
  }
}

.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
}
.feature .ico {
  width: 28px;
  height: 28px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}

/* Partners */
.partners {
  overflow: hidden;
}

.partner-track {
  display: flex;
  width: max-content;
  animation: scroll 50s linear infinite;
  align-items: center;
}

.partner-list {
  display: flex;
  gap: 26px;
}

.partner-list.clone {
  display: flex;
  gap: 26px;
}

.partner {
  width: 220px;
  height: 90px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fafafa;
  flex: 0 0 auto;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.partners:hover .partner-track {
  animation-play-state: paused;
}

/* CTA */
.cta {
  position: relative;
}

.cta-image {
  width: 100%;
  height: 650px;
}

@media (max-width: 800px) {
  .cta-image {
    height: auto;
  }
}

.cta .bgph {
  height: 320px;
  background: repeating-linear-gradient(
    45deg,
    #f6f6f6,
    #f6f6f6 20px,
    #ededed 20px,
    #ededed 40px
  );
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cta .cta-box {
  position: absolute;
  left: 40px;
  bottom: 40px;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

@media (max-width: 1025px) {
  .cta .cta-box {
    max-width: 450px;
    width: fit-content;

    h2 {
      font-size: 18px;
    }

    p {
      font-size: 12px;
    }
  }
}

@media (max-width: 760px) {
  .cta .cta-box {
    max-width: 240px;
    width: fit-content;

    h2 {
      font-size: 12px;
    }

    p {
      font-size: 8px;
    }

    .btn-primary {
      padding: 6px;
      font-size: 12px;
    }
  }
}

/* Footer */
.site-footer {
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid(var(--border));
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
}
.linklist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.linklist li {
  margin: 6px 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 1025px) {
  .footer-bottom {
    padding: 18px 10px;
  }
}

@media (max-width: 420px) {
  .footer-bottom {
    font-size: 14px;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 200;
}
.cookie-banner .btn {
  padding: 8px 14px;
}

/* --- Dropdown подменю у Heizungsbau --- */
.nav .has-sub {
  position: relative;
}
.nav .has-sub > a {
  padding-right: 28px;
}
.nav .has-sub::after {
  content: "▾";
  position: absolute;
  right: 6px;
  top: 9px;
  font-size: 12px;
  color: var(--muted);
}
.nav .sub {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 0;
  list-style: none;
  margin: 8px 0 0 0;
  min-width: 280px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 200;
}
.nav .sub li a {
  display: block;
  padding: 10px 14px;
}
.nav .sub li a:hover {
  background: rgba(229, 57, 53, 0.06);
}
.nav .has-sub:hover > .sub {
  display: block;
}

/* На мобильном показывать под списком */
@media (max-width: 960px) {
  .nav .has-sub {
    width: 100%;
  }
  .nav .has-sub .sub {
    position: static;
    box-shadow: none;
    border: none;
    margin: 6px 0 0 0;
    display: none;
  }
  .nav-list.show .has-sub.open .sub {
    display: block;
  }
}

/* --- Hero c мягким красным затемнением --- */
.hero.hero-red {
  position: relative;
  padding: 60px 0 30px;
  overflow: hidden;
}
.hero.hero-red .hero-bg {
  position: absolute;
  inset: 0;
  background: #f3f4f6;
}
.hero.hero-red::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(229, 57, 53, 0.55),
    rgba(229, 57, 53, 0.55)
  );
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero .hero-underline {
  width: 180px;
  height: 4px;
  background: #fff;
  margin-top: 10px;
  border-radius: 3px;
}
.hero h1 {
  color: #fff;
  font-size: 46px;
}

/* Вспомогательные */
.subttl {
  margin-top: -4px;
  color: #6b7280;
  font-size: 18px;
}
.section.alt {
  background: #fff;
}
.ph-img {
  background: repeating-linear-gradient(
    45deg,
    #f6f6f6,
    #f6f6f6 20px,
    #ededed 20px,
    #ededed 40px
  );
}

/* Responsive */
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: block;
  }
  .nav-list {
    position: absolute;
    top: 64px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow);
  }
  .nav-list.show {
    display: flex;
  }
}

@media (max-width: 750px) {
  .grid-2 {
    h2 {
      font-size: 17px;
    }

    p {
      font-size: 12px;
    }
  }
}

/* Dropdown всегда по hover */
.header {
  position: relative;
  z-index: 1000;
}
.nav .has-sub {
  position: relative;
}
.nav .sub {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 0;
  margin-top: 8px;
  list-style: none;
  min-width: 280px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: none;
}
.nav .sub li a {
  display: block;
  padding: 10px 14px;
  color: #111;
}
.nav .sub li a:hover {
  background: rgba(229, 57, 53, 0.06);
}

/* ключевая строка: показывать на hover на любой странице */
.nav .has-sub:hover > .sub {
  display: block;
}

/* на мобильных меню раскрывается кликом, не hover */
@media (max-width: 960px) {
  .nav .sub {
    position: static;
    box-shadow: none;
    border: 0;
    margin: 6px 0 0;
  }
  .nav .has-sub:hover > .sub {
    display: none;
  }
  .nav .has-sub.open > .sub {
    display: block;
  }
}

/* Базовая геро-секция */
.hero {
  position: relative;
  padding: 110px 0 120px;
  overflow: hidden;
}

/* Фон (пока просто цвет, потом подставишь картинку) */
.hero .hero-bg {
  position: absolute;
  inset: 0;
  background: #f6f6f6; /* временный фон вместо фото */
  /* когда будет фото: background: url('assets/img/hero-heizung.jpg') center/cover no-repeat; */
  z-index: 0;

  img {
    width: 100%;
    height: 100%;
  }
}

/* Красное мягкое затемнение над фоном, но под текстом */
.hero.hero-red::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(229, 57, 53, 0.35); /* приглушённый красный */
  z-index: 0; /* остаётся под .hero-inner */
}

/* Контент всегда выше оверлея */
.hero .hero-inner {
  position: relative;
  z-index: 1;
}

/* Видимость заголовка гарантируем явно */
.page-title {
  font: "Montserrat Subrayada";
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.1;
  margin: 0;
  color: #000000;
  letter-spacing: 0.5px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   Team cards / Unser Team (новая секция для карточек сотрудников)
   - приглушённый красный цвет полоски
   - плавный hover: фото масштабируется, overlay появляется,
     нижняя полоска становится ярче
   - мобильная адаптация
   =========================================================== */

.team-section {
  padding: 60px 0;
}
.team-section .container {
  padding-left: 12px;
  padding-right: 12px;
}

/* Сетка карточек: 3 столбца на desktop, 2 на tablet, 1 на mobile */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

/* Карточка */
.team-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* Область с фото */
.team-card .card-media {
  position: relative;
  overflow: hidden;
  height: 400px;
  background: #f5f5f5;
}
.team-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
  transform-origin: center center;
}

/* Масштаб фото на hover */
.team-card:hover .card-media img {
  transform: scale(1.07);
}

/* Наложение мягкого красного оттенка поверх фото (плавно) */
.team-card .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.38s ease;
  pointer-events: none;
}
.team-card:hover .card-media::after {
  background: var(--team-red-overlay);
}

/* Нижняя информативная полоска (имя/должность/контакты) */
.card-info {
  background: var(--team-red);
  color: #ffffff;
  padding: 18px 16px;
  text-align: left;
  transition:
    background 0.28s ease,
    transform 0.28s ease;
  margin-top: auto; /* чтобы инфо была всегда внизу карточки */
}
.team-card:hover .card-info {
  background: var(--team-red-hover);
}

.card-info h4 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: 0.6px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}
.card-info .role {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 13px;
}
.card-info .contact {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
  opacity: 0.95;
}
.card-info .contact a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}
.card-info .contact a:hover {
  text-decoration: underline;
}

/* Текстовый верх карточки (необязательно) */
.card-top-text {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

/* Адаптив */
@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .team-card .card-media {
    height: 220px;
  }
}
@media (max-width: 600px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .team-card .card-media {
    height: 260px;
  }
}

/* ===========================================================
   Конец секции Team
   =========================================================== */

/* --- Остальная часть responsive/поведения сайта --- */
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;

    
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: block;
  }
  .nav-list {
    position: absolute;
    top: 64px;
    right: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: none;
    flex-direction: column;
    box-shadow: var(--shadow);
  }
  .nav-list.show {
    display: flex;
  }

  .hero-slider .slider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .hero-box {
    height: fit-content;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: 20px;
  }
}

/* обратная совместимость: если у вас уже есть селекторы .reveal.visible, оставить их */
/* (возможно дублирование — но оно harmless, т.к. те же значения) */
.reveal.visible {
  opacity: 1;
  transform: none;
}
.img-reveal.visible {
  opacity: 1;
  transform: none;
}

/* ====== Sticky header + topbar hide + layout helpers ====== */

/* Базовая позиция - header не перекрывает контент */
.site-header {
  position: relative;
  width: 100%;
  z-index: 120;
}

/* Верхняя панель (адрес / email / телефон) */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border, #e9edf1);
  transition:
    transform 0.35s ease,
    opacity 0.25s ease,
    height 0.35s ease;
  transform-origin: top;
  /* по умолчанию показываем */
}

/* Когда .site-header имеет класс .compact — прячем топбар */
.site-header.compact .topbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Основная строка меню (логотип + nav) — мы сделаем фиксированной при скролле */

/* Задаём плавность скролла по якорям как запасной вариант */
html {
  scroll-behavior: smooth; /* браузерный fallback */
}

/* Отступ для body (динамически управляется скриптом) — запасной статический вариант */
/* body { padding-top: var(--header-sticky-offset, 0px); } */

/* Немного уменьшим высоту/отступ логотипа на мобильных экранах при фиксировании */
@media (max-width: 960px) {
  .site-header.sticky .header-inner {
    padding: 8px 12px;
  }
}

.hero.hero-cover {
  position: relative;
  overflow: hidden;
  min-height: 800px;
  display: flex;
  align-items: center;
  padding: 0; /* inner padding управляется .hero-inner */
  border-bottom: 1px solid var(--border);
}

@media (max-width: 600px) {
  .hero.hero-cover {
    min-height: clamp(100px, 48vh, 620px);
  }
}

/* фон (заменяется через data-bg или inline style) */
.hero.hero-cover .hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  background-size: cover;
  background-position: center center;
  filter: saturate(0.95) contrast(0.98);
  z-index: 0;
  transition:
    opacity 0.6s ease,
    transform 0.8s ease;
  opacity: 0;
  transform: scale(1.02);
}

/* если фон не задан — покажем декоративный паттерн */
.hero.hero-cover.ph-empty .hero-bg {
  background: repeating-linear-gradient(
    45deg,
    #f6f6f6,
    #f6f6f6 20px,
    #ededed 20px,
    #ededed 40px
  );
  opacity: 1;
  transform: none;
}

/* мягкий красный оверлей над фонoм для фирменной палитры */
.hero.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(229, 57, 53, 0.18),
    rgba(229, 57, 53, 0.18)
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* контейнер с контентом поверх */
.hero.hero-cover .hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(40px, 6vw, 64px) 20px;
  display: flex;
  align-items: center;
}

/* выравниваем контент: можно добавить центрирование или смещение */
.hero-content {
  /* background: rgba(255, 255, 255, 0.85); легкая полупрозрачная панель */
  padding: 20px 26px;
  border-radius: 12px;
  max-width: 820px;
  /* box-shadow: var(--shadow); */
  /* backdrop-filter: blur(3px); */
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 0.5); /* сильный красный оверлей */
}

@media (max-width: 500px) {
  .hero-content {
    padding: 10px;
    h1 {
      font-size: 25px;
    }
  }
}

/* Заголовок */
.hero-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.02;
  color: #111;
  font-family: "MontserratSubrayada", "MontserratAce", sans-serif;
}

/* Краткий текст */
.hero-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
}

/* Действия */

/* эффект появления фона */
.hero-bg.loaded {
  opacity: 1;
  transform: none;
}

/* Responsive: на мобильных контент занимает почти всю ширину */
@media (max-width: 960px) {
  .hero-content {
    padding: 18px 16px;
  }
  .hero-inner {
    padding: 28px 18px;
  }
  .hero-title {
    font-size: clamp(26px, 8vw, 36px);
    /* }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  } */
    .hero-actions .btn {
      width: 100%;
    }
  }
}

/* ===================================================
   SITE HEADER: FIXED + TOPBAR HIDE + COMPENSATION
   (вставить в конец style.css)
   ===================================================*/

:root {
  /* если этих переменных ещё нет — гарантируем их наличие */
  --header-z: 220;
  --topbar-height: 48px; /* базовая высота топбара, JS скрипт пересчитает */
}

/* Гарантируем, что .site-header не перекрывается и ведёт себя прогнозируемо */
.site-header {
  position: relative; /* оставляем относительным, фиксируем .header-inner при скролле */
  width: 100%;
  z-index: var(--header-z);
  transition: height 0.25s ease;
}

/* При фиксировании делаем .header-inner fixed (у вас уже был стиль — оставляем, но уточняем) */
.site-header.sticky .header-inner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: calc(var(--header-z) + 10);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.98);
}

/* Compact — прячет верхний топбар (адрес/email/телефон) */
.site-header .topbar {
  transition:
    transform 0.35s ease,
    opacity 0.25s ease;
  will-change: transform, opacity;
}
.site-header.compact .topbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Когда header фиксирован, добавляем отступ контента через CSS-переменную (скрипт заполняет) */
body {
  transition: padding-top 0.18s ease;
}

/* НО: JS будет динамически выставлять padding-top: var(--header-offset) на body */

/* Стили для "подсветки" пунктов меню (dropdown) — тонкие поправки */
.nav .sub {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  transform-origin: top center;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.nav .has-sub:hover > .sub,
.nav .has-sub.open > .sub {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===================================================
   CONTACT / HERO BLOCK STYLES (правая форма + левый инфоблок)
   Совместимы с .grid-2 / .container
   ===================================================*/

.contact-wrap {
  padding: 56px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Левый инфоблок — приглушённый красный фон */
.contact-info {
  background: linear-gradient(180deg, var(--team-red), var(--team-red));
  color: #fff;
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-info h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}
.contact-info .muted {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}
.contact-info .contact-line {
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255, 255, 255, 0.95);
}
.contact-info .map-placeholder {
  margin-top: 12px;
  border-radius: 6px;
  overflow: hidden;
}

/* Правая колонка — форма */
.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.contact-form h2 {
  margin-top: 0;
  color: var(--text);
}
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.contact-form .form-row.single {
  grid-template-columns: 1fr;
}
@media (max-width: 700px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

.input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
}
textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.checkbox-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Кнопка отправки — в вашем стиле */
.btn-submit {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
}

/* Вспомогательные заголовки в форме */
.form-title-underline {
  width: 80px;
  height: 4px;
  background: var(--team-red-hover);
  margin: 10px 0 18px;
  border-radius: 3px;
}

/* Маленькая подсказка для блока drag&drop */
.dropzone {
  border: 2px dashed #d0d0d0;
  padding: 12px;
  border-radius: 6px;
  background: #fafafa;
  color: var(--muted);
}

/* ===================================================
   Team card hover refinement (если нужно)
   ===================================================*/
.team-card .card-info {
  transition:
    background 0.28s ease,
    transform 0.28s ease;
}
.team-card:hover .card-info {
  background: var(--team-red-hover);
}

/* ====== Contact block styles (add to style.css) ====== */
:root {
  --contact-red: #b85b57; /* приглушённый красный (левая панель) */
  --contact-red-600: #a64b4a;
  --contact-left-width: 360px; /* ширина левой панели */
}

.contact-split {
  display: grid;
  grid-template-columns: var(--contact-left-width) 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 10px;
}

/* единый большой левый блок */
.contact-left {
  background: var(--contact-red);
  color: #fff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: stretch;
}
.contact-left-inner {
  width: 100%;
}
.contact-left-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}
.divider {
  height: 4px;
  width: 56px;
  background: rgba(255, 255, 255, 0.12);
  margin: 10px 0 18px 0;
  border-radius: 2px;
}
.divider.short {
  width: 40px;
  margin-bottom: 12px;
}

.company strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}
.company a {
  color: #fff;
  text-decoration: underline;
}

/* карта */
.map-wrap {
  margin-top: 18px;
  border-radius: 4px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.06);
}
.map-wrap iframe {
  width: 100%;
  height: 200px;
  border: 0;
  display: block;
}

/* правая колонка */
.contact-right {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.page-section-title {
  color: var(--primary); /* можно заменить на --contact-red если хотите */
  margin: 2px 0 10px 0;
  font-size: 28px;
  font-weight: 700;
}

/* form layout */
.contact-form {
  margin-top: 8px;
}
.form-row {
  margin-bottom: 14px;
  display: block;
}
.form-row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.form-row.two-cols > div label,
.form-row > label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="date"],
.contact-form input[type="time"],
.contact-form textarea,
.contact-form input[type="file"] {
  width: 100%;
  border: 1px solid #cfcfcf;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* радио / inline */
.inline-radios label {
  display: inline-block;
  margin-right: 14px;
  color: var(--muted);
}
.anrede-controls label {
  margin-right: 10px;
  color: var(--muted);
}

/* dropzone */
.dropzone {
  position: relative;
  border: 2px dashed #cfcfcf;
  border-radius: 6px;
  padding: 18px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.dropzone-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.drop-preview {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* кнопка отправки */
.contact-form .btn {
  padding: 10px 18px;
  font-weight: 700;
  border-radius: 6px;
}
.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #fff;
  border: 0;
}

/* сообщение успеха / ошибка */
.form-msg {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: block;
}
.form-msg.success {
  background: #e8f8ef;
  color: #1a7a46;
  border: 1px solid #d6f0de;
}
.form-msg.error {
  background: #fff0f0;
  color: #a22929;
  border: 1px solid #f2cfcf;
}

/* мобильная адаптация */
@media (max-width: 980px) {
  .contact-split {
    grid-template-columns: 1fr;
  }
  .contact-left {
    order: 2;
  }
  .contact-right {
    order: 1;
  }
  .form-row.two-cols {
    grid-template-columns: 1fr;
  }
}

/* ============ Contact block styles (insert into style.css) ============ */

:root {
  --contact-left-bg: var(--team-red, #b85b57); /* приглушённый красный */
  --contact-left-bg-dark: #a24e4a;
  --contact-left-text: #fff;
  --contact-area-border: 1px solid rgba(0, 0, 0, 0.08);
}

/* wrapper */
.contact-block {
  display: flex;
  gap: 24px;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

/* left column */
.contact-left {
  flex: 0 0 340px; /* более широкий "левый блок" по вашему требованию */
  background: var(--contact-left-bg);
  color: var(--contact-left-text);
  padding: 28px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-left .contact-left-title {
  font-family: "MontserratSubrayada", "MontserratAce", Inter, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.6px;
}
.contact-divider {
  width: 58px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 0 6px;
  border-radius: 2px;
}
.contact-left .company-name {
  font-size: 16px;
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  line-height: 1.6;
}
.contact-list a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}
.office-title {
  font-size: 18px;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.98);
  text-transform: uppercase;
  font-weight: 700;
}
.office-times {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
}

/* map */
.map-wrap {
  margin-top: 10px;
  border-radius: 6px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.06);
}
.map-wrap iframe {
  width: 100%;
  height: 180px;
  border: 0;
  display: block;
}

.map-adaptive {
  display: none;
}

@media (max-width: 1025px) {
  .footer-grid {
    padding: 28px 10px;
  }
}

@media (max-width: 765px) {
  .footer-grid {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 765px) {
  .map-def {
    display: none;
  }

  .map-adaptive {
    display: block;
  }

  .map-adaptive-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 450px) {
  .footer-grid {
    h4 {
      font-size: 14px;
    }

    p,
    li {
      font-size: 10px;
    }
  }

  .map-adaptive iframe {
    width: 300px;
  }
}

/* right column */
.contact-right {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}
.contact-right-title {
  font-family: "MontserratSubrayada", "MontserratAce", Inter, sans-serif;
  color: var(--team-red);
  font-size: 26px;
  margin: 0 0 8px;
}
.section-subtitle {
  margin: 16px 0 8px;
  font-weight: 700;
  color: #333;
  font-size: 16px;
}

/* result message */
.contact-result {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.contact-result.success {
  background: #e6f8eb;
  color: #1f7a3a;
  border: 1px solid #c7efd7;
}
.contact-result.error {
  background: #fdecea;
  color: #7a2222;
  border: 1px solid #f5c6c6;
}

/* form */
.contact-form {
  display: block;
  width: 100%;
}
.form-field {
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="number"],
.form-field textarea,
.form-field input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  transition:
    box-shadow 0.12s,
    border-color 0.12s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary-600, #c62828);
  box-shadow: 0 4px 18px rgba(198, 40, 40, 0.06);
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 960px) {
  .contact-block {
    flex-direction: column;
  }
  .contact-left {
    flex: 0 0 auto;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .contact-left {
    order: 2;
  }
  .contact-right {
    order: 1;
  }
}

/* radios */
.radios label {
  display: inline-block;
  margin-right: 14px;
  font-size: 14px;
  color: #444;
}
.radio input {
  margin-right: 6px;
}

/* file drop */
.file-drop {
  border: 2px dashed #d0d0d0;
  border-radius: 6px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  position: relative;
  background: linear-gradient(180deg, #fff, #fbfbfb);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop-text {
  color: #666;
  font-size: 14px;
}
.selected-file {
  font-size: 13px;
  color: #333;
}

/* submit */
.form-row {
  margin-top: 12px;
}
.btn.btn-primary {
  background: linear-gradient(
    180deg,
    var(--contact-left-bg),
    var(--contact-left-bg-dark)
  );
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.btn.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  transition: all 0.12s ease;
}

/* checkbox style small */
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #444;
}

/* small visual tweaks to match screenshot: sharp edges for inputs */
.form-field input,
.form-field textarea {
  border-radius: 3px;
}

/* error styles for invalid fields */
.contact-form .invalid {
  border-color: #d9534f !important;
  box-shadow: 0 4px 10px rgba(217, 83, 79, 0.06);
}

  .hero-box.adaptive {
    position: relative;
    left: auto;
    bottom: auto;
    width: 50%;
    max-width: unset;
    padding: 50px;
    margin: 0 auto;
    border-radius: 0 0 25px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

@media (max-width: 760px) {

  .hero-box.adaptive {
    width: 85%;
    
    .hero-actions {
      justify-content: space-between;
      width: 100%;
    }
  }
}



@media (max-width: 370px) {
  .hero-slider {
    height: fit-content;
  }
}

.hero-cropped-image {
  display: block;
  width: 100%;
  height: 600px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 760px) {
  .hero-cropped-image {
    object-position: left center;
  }
}

.hero.hero-cover.hero-red.hero-page {
  min-height: 700px;
  height: 700px;
}

.hero.hero-cover.hero-red.hero-page .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hybrydGasImage {
  object-fit: cover;
  object-position: center;
  height: 400px;
}

@media (max-width: 600px) {
.hybrydGasImage {
  height: 250px;
}
}

.hero.hero-cover.hero-red.hero-page .hero-bg img.uber-uns__banner-bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero.hero-cover.hero-red.hero-page.hero-ueber-uns {
  min-height: clamp(240px, 32vw, 420px);
  height: clamp(240px, 32vw, 420px);
}

.hero.hero-cover.hero-red.hero-page.hero-ueber-uns .hero-bg {
  opacity: 1;
  transform: none;
  background: #8f2b2b;
}
