/* BAUKNOT / BAUMKNOT — v5.1
   Extracted from inline <style>.
   Keep paths relative to HTML root. */

:root{
      /* ===== BAUKNOT BRAND ===== */
      --primary:#284D6E;         /* корпоративный тёмно-синий */
      --primary-600:#2f5a80;     /* hover */
      --primary-100:#e9eff5;     /* мягкие подложки */

      --ink:#0f172a;
      --muted:#5f6f82;

      --bg:#ffffff;
      --soft:#f4f7fb;
      --border:#e3e8ef;

      --radius-lg:16px;
      --radius-xl:22px;

      --shadow-soft: 0 20px 40px rgba(40,77,110,.10);
    }

    html{ scroll-behavior:smooth; }
    body{
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color:var(--ink);
      background:var(--bg);
    }

    .container-xxl{ max-width:1200px; }

    /* ===== Header ===== */
    .site-header{
      position:sticky;
      top:0;
      z-index:1020;
      background:rgba(255,255,255,.92);
      backdrop-filter:saturate(160%) blur(10px);
      border-bottom:1px solid var(--border);
    }

    .brand{
      display:flex;
      align-items:center;
      gap:12px;
      text-decoration:none;
      color:var(--primary);
      font-weight:800;
      letter-spacing:.06em;
      text-transform:uppercase;
      line-height:1;
    }

    .brand-mark{
      width:40px;
      height:40px;
      padding:0 !important;
      overflow:hidden;
      background:#fff;
    }

    .brand-mark img{
      width:100% !important;
      height:100% !important;
      max-width:none !important;
      max-height:none !important;
      display:block;
      object-fit:contain;
      transform:scale(1.8);
      transform-origin:center;
    }

    .nav-link{
      color:var(--ink);
      font-weight:600;
      opacity:.92;
      text-transform: uppercase;
      font-size: 13px;

    }
    .nav-link:hover{ color:var(--primary); opacity:1; }

    /* ===== Language Switch ===== */
    .lang-switch .btn{
      border:1px solid var(--border);
      background:#fff;
      color:var(--primary);
      font-weight:700;
      padding:.40rem .5rem;
      border-radius:8px;
      line-height:1.1;
      font-size: 10px;

    }
    .lang-switch .btn.active{
      background:var(--primary);
      border-color:var(--primary);
      color:#fff;
    }

    /* ===== Buttons ===== */
    .btn-primary{
      background:var(--primary);
      border-color:var(--primary);
      font-weight:700;
      border-radius:14px;
      padding:.8rem 1.05rem;
    }
    .btn-primary:hover{
      background:var(--primary-600);
      border-color:var(--primary-600);
    }
    .btn-outline-primary{
      border-color:var(--primary);
      color:var(--primary);
      font-weight:700;
      border-radius:14px;
      padding:.8rem 1.05rem;
    }
    .btn-outline-primary:hover{
      background:var(--primary);
      color:#fff;
    }

    /* ===== Sections ===== */
    section{ padding:96px 0; }
    .section-soft{ background:var(--soft); }

    .kicker{
      text-transform:uppercase;
      letter-spacing:.18em;
      font-size:.75rem;
      color:var(--primary);
      margin-bottom:14px;
      font-weight:800;
    }
    .display-tight{
      letter-spacing:-0.02em;
      line-height:1.08;
    }
    .lead{ color:var(--muted); }

    .card-clean{
      background:#fff;
      border:1px solid var(--border);
      border-radius:var(--radius-lg);
      padding:28px;
      box-shadow:var(--shadow-soft);
    }

    .card-muted{
      background:linear-gradient(180deg, #fff, rgba(40,77,110,.03));
      border:1px solid var(--border);
      border-radius:var(--radius-lg);
      padding:22px;
    }

    .icon-dot{
      width:10px; height:10px; border-radius:99px;
      background:var(--primary);
      display:inline-block;
      margin-right:10px;
      position:relative; top:-1px;
    }

    .list-check{
      list-style:none;
      padding-left:0;
      margin:0;
    }
    .list-check li{
      position:relative;
      padding-left:28px;
      margin-bottom:14px;
      color:var(--ink);
    }
    .list-check li::before{
      content:"";
      position:absolute;
      left:0;
      top:.5em;
      width:12px;
      height:12px;
      border-radius:50%;
      background:var(--primary);
    }
    .muted{ color:var(--muted); }

    /* ===== Hero (base) ===== */
    .hero{
      padding:96px 0 72px;
      position:relative;
      overflow:hidden;
      background:
        radial-gradient(1200px 600px at 75% 30%, rgba(40,77,110,.14), transparent 60%),
        radial-gradient(900px 480px at 15% 80%, rgba(40,77,110,.10), transparent 55%),
        linear-gradient(180deg, #fff, #fff);
    }

    /* ===== Forms ===== */
    .form-control, .form-select{
      border-radius:12px;
      border:1px solid var(--border);
      padding:12px 14px;
    }
    .form-control:focus, .form-select:focus{
      border-color:var(--primary);
      box-shadow:0 0 0 .15rem rgba(40,77,110,.18);
    }
    .form-label{
      font-weight:700;
      color:var(--ink);
    }

    /* ===== Footer ===== */
    footer{
      background:#0b1522;
      color:#dce4ef;
      padding:64px 0;
    }
    footer a{ color:#dce4ef; text-decoration:none; }
    footer a:hover{ color:#fff; }
    footer hr{ border-color:rgba(255,255,255,.15); }

    /* ===== Utilities ===== */
    .section-title{ max-width: 840px; }
    .text-balance{ text-wrap:balance; }
    .pill{
      display:inline-flex;
      align-items:center;
      gap:10px;
      padding:10px 14px;
      border-radius:999px;
      border:1px solid var(--border);
      background:#fff;
      color:var(--primary);
      font-weight:700;
    }

    /* Active nav hint (JS toggles .active on nav links) */
    .nav-link.active{ color:var(--primary); }

    /* ===== HERO IMAGE ASYMMETRIC (как на референсе) ===== */
    .hero-media{
      position: relative;
      border-radius: 0;
      border: 1px solid var(--border);

      width: calc(100% + 140px);
      margin-left: -110px;
      margin-right: 0;

      overflow: visible; /* важно для "свисающего" overlay */
    }

    .hero-img{
      width: 100%;
      height: clamp(260px, 30vw, 400px);
      object-fit: cover;
      display: block;
    }

    /* ===== HERO OVERLAY FINAL (фикс всего: текст/разделитель/кнопки) ===== */
    .hero-overlay{
      position: absolute !important;
      right: 0 !important;
      bottom: -34px !important;

      width: 760px !important;
      max-width: 100% !important;

      background: var(--primary) !important;
      border-radius: 0 !important;
      box-shadow: 0 24px 60px rgba(0,0,0,.22) !important;

      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 22px !important;

      padding: 22px 28px !important;
    }

    .hero-overlay-text{
      color: rgba(255,255,255,.92) !important;
      font-size: 1rem !important;
      line-height: 1.45 !important;
      font-weight: 600 !important;
      max-width: 360px !important;
    }

    .hero-overlay-divider{
      width: 1px !important;
      height: 52px !important;
      background: rgba(255,255,255,.28) !important;
      flex-shrink: 0 !important;
    }

    .hero-overlay-actions{
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 14px !important;
      margin-left: auto !important;
      flex: 0 0 auto !important;
    }

    .hero-overlay-actions .btn{
      width: auto !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      white-space: nowrap !important;
    }

    .btn-overlay-light{
      background: #ffffff !important;
      color: var(--primary) !important;
      border: 1px solid rgba(255,255,255,.75) !important;
      font-weight: 800 !important;
      border-radius: 14px !important;
      padding: .78rem 1.2rem !important;
    }

    .btn-overlay-ghost{
      background: rgba(255,255,255,.14) !important;
      color: #ffffff !important;
      border: 1px solid rgba(255,255,255,.40) !important;
      font-weight: 800 !important;
      border-radius: 14px !important;
      padding: .78rem 1.2rem !important;
    }

    @media (max-width: 991.98px){
      section{ padding:76px 0; }
      .hero{ padding:78px 0 60px; }

      .hero-media{
        width: 100%;
        margin-left: 0;
      }

      .hero-overlay{
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
        width: auto !important;

        flex-direction: column !important;
        align-items: stretch !important;
      }

      .hero-overlay-divider{
        width: 100% !important;
        height: 1px !important;
      }

      .hero-overlay-actions{
        flex-direction: column !important;
      }

      .hero-overlay-actions .btn{
        width: 100% !important;
      }
        /* === HERO mobile fix: logo not covering overlay text === */
  .hero-crest{
    left: 50% !important;
    top: 18px !important;
    transform: translateX(-50%) !important;
    width: 92px !important;
    border-radius: 18px !important;
  }

  .hero-overlay{
    padding-top: 86px !important; /* место под логотип */
  }
    }
    
    /* ===== About rotating circle ===== */
#about{
  position: relative;
}

.about-rotating-circle{
  position: absolute;
  top: 80px;
  right: 80px;
  width: 180px;
  height: 180px;
  pointer-events: none;
  z-index: 2;
}

/* Logo in center of rotating circle */
.about-circle-logo{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;      /* при необходимости поменяешь */
  height: 56px;
  object-fit: contain;
  display: block;
}



.about-rotating-circle svg{
  width:100%;
  height:100%;
  animation: rotateCircle 18s linear infinite;
}

.about-rotating-circle text{
  fill: var(--muted);
  font-weight:600;
  text-transform:uppercase;
}

.about-circle-arrow{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  font-size:28px;
  color:var(--ink);
  font-weight:600;
}

/* Rotation animation */
@keyframes rotateCircle{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

/* Mobile: hide circle */
@media (max-width: 991.98px){
  .about-rotating-circle{
    display:none;
  }
}

/* ===== Stats strip (между About и Executors) ===== */
.stats-strip{
  padding: 56px 0;
  background: #fff;
  position: relative;
}



.stats-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.stat-item{
  padding: 10px 0 0;
}

/* УБРАЛИ: вертикальные разделители */
.stat-item:not(:first-child){
  padding-left: 0;
}
.stat-item:not(:first-child)::before{
  display:none;
}

.stat-value{
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  color: var(--primary); /* #284D6E */
}

/* ЛИНИЯ ПОД ЧИСЛОМ — отдельная на каждый блок */
.stat-label{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(40, 77, 110, .18); /* тонкая линия как в референсе */

  font-size: .85rem;
  letter-spacing: .02em;
  color: rgba(40, 77, 110, .72); /* подпись с прозрачностью */
  font-weight: 600;
}

@media (max-width: 991.98px){
  .stats-strip{ padding: 44px 0; }
  .stats-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 575.98px){
  .stats-grid{
    grid-template-columns: 1fr;
  }
}


.stats-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.stat-item{
  position: relative;
  padding: 10px 0 0;
}

/* вертикальные разделители между элементами */
.stat-item:not(:first-child){
  padding-left: 26px;
}
.stat-item:not(:first-child)::before{
  content:"";
  position:absolute;
  left:0;
  top: 6px;
  bottom: 6px;
  width:1px;
  background: rgba(40, 77, 110, .14);
}

.stat-value{
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  color: var(--primary); /* #284D6E */
}

.stat-label{
  margin-top: 10px;
  font-size: .85rem;
  letter-spacing: .02em;
  color: rgba(40, 77, 110, .72); /* синий с прозрачностью */
  font-weight: 600;
}

/* чуть мягче на мобильных */
@media (max-width: 991.98px){
  .stats-strip{ padding: 44px 0; }
  .stats-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .stat-item:not(:first-child){
    padding-left: 0;
  }
  .stat-item:not(:first-child)::before{
    display:none;
  }
}

@media (max-width: 575.98px){
  .stats-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== Services interactive (Executors section redesign) ===== */
.services-split{
  padding: 96px 0;
  background: var(--soft);
  text-transform: uppercase;
}

.services-wrap{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items:start;
}

.services-left .kicker{
  margin-bottom: 18px;
}

.services-title{
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0 0 20px;
}

.services-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.service-link{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;

  display:flex;
  align-items: baseline;
  gap: 10px;

  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  color: rgba(15, 23, 42, .45);
}

.service-link .idx{
  font-size: .8rem;
  font-weight: 800;
  color: rgba(40, 77, 110, .55);
  min-width: 34px;
}

.service-link.active{
  color: var(--ink);
}

.service-link.active .label{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(40, 77, 110, .35);
}

.services-note{
  margin-top: 24px;
  color: var(--muted);
  max-width: 520px;
}

.services-media{
  position: relative;
  border: 1px solid var(--border);
  background: #fff;
  overflow: visible;
}

.services-media img{
  width: 100%;
  height: clamp(320px, 36vw, 520px);
  object-fit: cover;
  display: block;
}

.service-detail-card{
  position: absolute;
  left: -84px;
  bottom: 200px;

  width: 360px;
  max-width: calc(100% - 24px);

  background: rgba(244, 247, 251, .92); /* “серый” как референс */
  border: 1px solid rgba(40, 77, 110, .12);
  box-shadow: 0 18px 46px rgba(15, 23, 42, .10);
  backdrop-filter: blur(8px);

  padding: 22px 22px 20px;
}

.service-detail-text{
  margin: 0;
  color: rgba(15, 23, 42, .70);
  line-height: 1.55;
  font-weight: 500;
}

@media (max-width: 991.98px){
  .services-wrap{
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .services-media{
    overflow: hidden;
  }
  .service-detail-card{
    position: static;
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    left: auto;
    bottom: auto;
  }
  .service-link{
    font-size: 1.1rem;
  }
}

/* ===== Services CTA: custom size and spacing ===== */

.services-left{
  max-width: 720px;
}

.services-cta{
  margin-top: 44px;
  max-width: 720px;
}

.btn-bauknot-cta{
  width: 100%;
  border-radius: 999px;
  padding: 20px 28px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.services-cta .text-muted{
  margin-top: 14px !important;
  font-size: 1.05rem;
  line-height: 1.55;
}

/* TEMP: уменьшение ширины кнопки "Стать партнёром" */

.services-cta{
  max-width: 520px;
}

.btn-bauknot-cta{
  max-width: 520px;
  width: 100%;
}


/* ===== Clients accordion (right column) ===== */

/* Background container (NO rounded corners) */
.clients-accordion-bg{
  position: relative;
  border-radius: 0;                 /* острые углы */
  overflow: hidden;
  border: 1px solid rgba(40, 77, 110, .12);
  min-height: 420px;
  background: #fff;
}

/* Background image behind accordion (more visible) */
.clients-accordion-bg::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("../img/clients-bg.webp");
  background-size: cover;
  background-position: center;
  opacity: .95;                     /* заметнее */
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.02);
}

/* Soft veil to keep text readable (but not killing image) */
.clients-accordion-bg::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.70) 0%,
    rgba(255,255,255,.62) 40%,
    rgba(255,255,255,.72) 100%
  );
}

.clients-accordion{
  position: relative;
  z-index: 1;
  padding: 10px 22px;               /* более “списковый” ритм */
  display: grid;
  gap: 0;                           /* без карточных зазоров */
}

/* CLOSED state = plain list item (no card, no border box) */
.cl-acc-item{
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;                 /* острые углы */
  overflow: visible;
}

/* thin dividers between list items */
.cl-acc-item + .cl-acc-item{
  border-top: 1px solid rgba(40, 77, 110, .14);
}

.cl-acc-summary{
  list-style: none;
  cursor: pointer;
  padding: 18px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.cl-acc-summary::-webkit-details-marker{ display:none; }

.cl-acc-title{
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

/* panel text */
.cl-acc-panel{
  padding: 0 18px 20px 42px;
  color: rgba(15, 23, 42, .65);
  font-weight: 600;
  line-height: 1.55;
  font-size: 1.05rem;
  max-width: 560px;
}

/* OPEN state = card (sharp corners) */
.cl-acc-item[open]{
  margin: 14px 0;
  border-radius: 0;                 /* острые углы */
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(40, 77, 110, .18);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.cl-acc-item[open] .cl-acc-summary{
  padding: 18px 18px 12px 18px;
}

/* Mobile */
@media (max-width: 991.98px){
  .clients-accordion-bg{
    min-height: 0;
  }
  .clients-accordion{
    padding: 8px 14px;
  }
  .cl-acc-item[open]{
    margin: 12px 0;
  }
  .cl-acc-panel{
    max-width: 100%;
    padding-left: 40px;
  }
}

/* ===== Partners marquee (SIMPLE + LOOP) ===== */
.partners-marquee{
  margin-top: -34px;       /* если нужно выше/ниже — меняй это */
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 3;
}

.partners-marquee__wrap{
  overflow: hidden;
  padding: 14px 0;
}

.partners-marquee__track{
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  flex-wrap: nowrap;
  animation: partnersMarquee 26s linear infinite;
  will-change: transform;
}

.partner-logo{
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: .28;
  filter: grayscale(1) contrast(1.05);
  flex: 0 0 auto;
}

@keyframes partnersMarquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Мобилка: компактнее и по центру контейнера (за счёт container-xxl в HTML) */
@media (max-width: 575.98px){
  .partners-marquee{ margin-top: -24px; }
  .partners-marquee__track{ gap: 38px; }
  .partner-logo{ height: 26px; max-width: 140px; }
}

/* Доступность */
@media (prefers-reduced-motion: reduce){
  .partners-marquee__track{ animation: none; }
}




/* ===== Approach photo (under intro text) ===== */
.approach-photo-wrap{
  margin-top: 22px;
}
.approach-photo{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  opacity: .45; /* полупрозрачная */
  filter: grayscale(1) contrast(1.05);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}


.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
}


/* Заголовок "Опыт, рождённый на стройплощадке" */
.about-title{
  font-size: 2.5rem;   /* меняйте это число */
  line-height: 1.2;    /* расстояние между строками */
}


/* ===== Section main titles (unified) ===== */
.section-title{
  font-size: 2.2rem;        /* главный размер */
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
   margin-bottom: 1rem;
}



/* Кнопка "Стать партнёром" — форма как на скрине 2 */
.btn-partner{
  border-radius: 14px;      /* скругление */
  padding: 14px 22px;       /* высота/ширина через отступы */
  min-height: 54px;         /* чтобы была стабильная высота */
  font-weight: 700;
  font-size: 17px;

}


/* Опустить правый текст в About */
.about-right-text{
  margin-top: 28px;
}


/* Services list: dots instead of numbers */
.services-list .idx{
  display: none;
}

.services-list .service-link{
  position: relative;
  padding-left: 18px;
}

/* точка по умолчанию — тусклая */
.services-list .service-link::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  opacity: 0.35;
}

/* активная точка — яркая */
.services-list .service-link.active::before{
  color: var(--ink);
  opacity: 1;
}

/* если active висит на <li>, а не на кнопке */
.services-list li.active .service-link::before{
  color: var(--ink);
  opacity: 1;
}

/* === FINAL: CTA note under buttons (wins over everything) === */
.cta-note-text{
  text-transform: none !important;  /* убрать CAPS */
  font-style: italic !important;    /* курсив */
  font-size: 11px !important;       /* размер */
  line-height: 1.2 !important;
  opacity: 0.7 !important;

  white-space: nowrap !important;   /* в одну строку */
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  display: block !important;
  max-width: 100% !important;

  margin: 0 !important;
  margin-left: 30px !important;      /* вправо */
  margin-top: 12px !important;       /* вниз */
}


/* === i18n note under "Найти подрядчика": JS replaces <p> with plain text === */
#clients [data-i18n="cli_note"].small.muted{
  text-transform: none !important;  /* убрать CAPS */
  font-style: italic !important;    /* курсив */
  font-size: 11px !important;       /* размер */
  line-height: 1.2 !important;
  opacity: 0.7 !important;

  display: block !important;
  margin-left: 15px !important;     /* вправо */
  margin-top: 6px !important;       /* вниз */

  white-space: nowrap !important;   /* одна строка */
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}


/* === Approach overlap (fixed) === */
#approach .approach-stack{
  position: relative;
  margin-bottom: 110px; /* резерв места под карточку (регулируется) */
}

#approach .approach-overlap-card{
  position: absolute;
  left: 0;
  right: 0;

  bottom: -90px; /* НАЕЗД на фото: больше число = ниже карточка */
  z-index: 2;

  background: rgba(255,255,255,.78) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  margin: 0 !important;
}

/* === Contact section: keep right card aligned === */
#contact .col-lg-6:last-child {
  margin-top: -20px;
}


/* =========================
   MOBILE POLISH (≤ 992px)
   вставить в самый низ style.css
========================= */
@media (max-width: 991.98px){

  /* Общие отступы секций (чтобы не было “пустынь”) */
  section{ padding: 56px 0; }
  .hero{ padding: 56px 0 46px; }

  /* Заголовки: чтобы не разъезжались и не были слишком огромными */
  .hero-title{
    font-size: clamp(1.8rem, 6.6vw, 2.6rem);
    line-height: 1.12;
  }
  .section-title{
    font-size: clamp(1.45rem, 5.4vw, 2.05rem);
    line-height: 1.12;
  }

  /* HERO: убираем “шире контейнера” и отрицательные margin на мобиле */
  .hero-media{
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden; /* чтобы не торчало за края на мобиле */
  }
  .hero-img{
    height: clamp(240px, 55vw, 360px);
  }

  /* Crest-логотип: меньше и не мешает тексту */
  .hero-crest{
    left: 16px !important;
    top: 16px !important;
    width: 110px !important;
    border-radius: 20px !important;
  }

  /* HERO overlay: уже у вас адаптирован, но фиксируем отступы */
  .hero-overlay{
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    padding: 16px !important;
  }

  /* Stats: на мобиле в 2 колонки уже есть, но делаем аккуратнее */
  .stats-grid{
    gap: 16px !important;
  }
  .stat-value{
    font-size: clamp(1.6rem, 8vw, 2.3rem) !important;
  }

  /* Services: убираем CAPS в секции (сейчас стоит text-transform: uppercase на .services-split) */
  .services-split{
    text-transform: none !important;
    padding: 56px 0 !important;
  }

  /* Services: карточка справа — на мобиле должна быть “в потоке”, без смещения */
  .services-media{
    overflow: hidden; /* чтобы карточка не вылазила за края */
  }
  .service-detail-card{
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px !important;
    left: auto !important;
    bottom: auto !important;
  }

  /* CTA-note под кнопками: на мобиле разрешаем перенос строки (nowrap на узких экранах ломает) */
  .cta-note-text,
  #clients [data-i18n="cli_note"].small.muted{
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    margin-left: 0 !important;
  }

  /* Clients accordion: меньше внутренние отступы */
  .clients-accordion{
    padding: 8px 12px !important;
  }
  .cl-acc-panel{
    padding: 0 12px 16px 36px !important;
    font-size: 1rem !important;
  }

  /* Approach: на мобиле ОТКЛЮЧАЕМ absolute-overlap (иначе часто ломает высоты/сетку) */
  .approach-overlap-card{
    position: static !important;
    margin-top: 14px !important;
  }
  .approach-stack{
    padding-bottom: 0 !important;
  }

  /* Contact: блок персон — чуть компактнее */
  .contact-persons{
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .contact-persons a{
    word-break: break-word;
  }

  /* Footer: чтобы ссылки не “липли” и читались */
  footer .d-grid{
    gap: 8px !important;
  }
}

/* =========================
   EXTRA SMALL (≤ 576px)
========================= */
@media (max-width: 575.98px){

  /* Кнопки на мобиле чаще удобнее full width */
  .btn-bauknot-cta,
  .services-cta .btn,
  #contact .btn{
    width: 100% !important;
  }

  /* Контактные кнопки в один столбец (у вас flex-sm-row — ок, но на xs фиксируем) */
  #contact .mt-4.d-flex{
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

/* =========================
   HERO: MOBILE FIX ONLY
   НЕ ТРОГАЕТ DESKTOP
========================= */
@media (max-width: 991.98px){

  /* На мобилке можно скрывать "вылезания" */
  .hero-media{
    overflow: hidden !important;
  }

  /* Логотип фиксируем влево, без центрирования */
  .hero-crest{
    left: 16px !important;
    top: 16px !important;
    transform: none !important;
    width: 92px !important;
    z-index: 3 !important;
  }

  /* Синий блок не должен пытаться "обходить" логотип паддингами */
  .hero-overlay{
    padding-top: 22px !important; /* возвращаем нормальный паддинг */
  }
}

@media (max-width: 420px){
  .hero-crest{
    width: 74px !important;
  }
}


/* === Contact section: mobile spacing fix === */
@media (max-width: 576px){

  /* карточка "Быстрый контакт" */
  #contact .card-clean{
    margin-top: 28px;
  }

}

/* ===== HERO (mobile fix): overlay stays on image, logo doesn't block text ===== */
@media (max-width: 575.98px){

  /* контейнер картинки — якорь для абсолютных элементов */
  .hero-media{
    position: relative !important;
    overflow: hidden !important; /* чтобы не торчало за края */
  }

  /* синий блок всегда поверх картинки, а не "после" */
  .hero-overlay{
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;

    padding: 18px 16px !important;
    border-radius: 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  /* текст внутри синего блока — читаемо и не режется */
  .hero-overlay-text{
    max-width: none !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
  }

  /* разделитель */
  .hero-overlay-divider{
    width: 100% !important;
    height: 1px !important;
  }

  /* кнопки — столбиком на всю ширину */
  .hero-overlay-actions{
    flex-direction: column !important;
    gap: 10px !important;
    margin-left: 0 !important;
  }
  .hero-overlay-actions .btn{
    width: 100% !important;
  }

  /* логотип — по центру сверху, чтобы не закрывал текст */
  .hero-crest{
    left: 50% !important;
    top: 14px !important;
    transform: translateX(-50%) translateZ(0) !important;
    width: 92px !important;
    border-radius: 20px !important;
  }

  /* на всякий случай даём картинке нормальную высоту под оверлей */
  .hero-img{
    height: 420px !important;
    object-fit: cover !important;
  }
}

/* ===== Services: mobile text must start from image top ===== */
@media (max-width: 575.98px){

  /* контейнер с картинкой — опорная точка */
  .services-media{
    position: relative !important;
  }

  /* карточка с текстом */
  .service-detail-card{
    position: absolute !important;

    /* КЛЮЧЕВОЕ: карточка начинается от верха картинки */
    top: 12px !important;
    bottom: auto !important;

    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 16px !important;

    border-radius: 14px !important;
    z-index: 2 !important;

    /* лёгкий стеклянный эффект */
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(6px);
  }

  /* текст компактнее для мобилки */
  .service-detail-text{
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }

  /* сама картинка — фиксируем высоту */
  .services-media img{
    height: 360px !important;
    object-fit: cover !important;
  }
}


/* ===== Services: premium animation + stable height (mobile) ===== */
@media (max-width: 575.98px){

  /* фиксируем “стекло” чуть богаче */
  .service-detail-card{
    background: rgba(255,255,255,0.88) !important;
    border: 1px solid rgba(40,77,110,.10) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .14) !important;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);

    /* чтобы карточка не “прыгала” при разной длине текста */
    min-height: 138px;
  }

  /* плавный fade */
  .service-detail-text{
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
  }

  /* состояние “прячем текст” */
  .service-detail-text.is-fading{
    opacity: 0;
    transform: translateY(4px);
  }
}


/* ===== HERO: mobile typography fix (ровно и структурно) ===== */
@media (max-width: 575.98px){

  /* убираем «столбик» и даём нормальную ширину тексту */
  .hero .hero-head{
    max-width: 520px !important;
    padding-left: 16px;
    padding-right: 16px;

    text-align: left !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero .kicker{
    text-align: left !important;
    margin-bottom: 10px !important;
  }

  .hero .hero-title{
    text-align: left !important;

    font-size: 2.05rem !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em !important;

    /* чтобы строки «собирались» аккуратно */
    text-wrap: balance;
    hyphens: auto;
    overflow-wrap: normal;
    word-break: normal;

    margin-bottom: 12px !important;
  }

  .hero .hero-subtitle{
    text-align: left !important;

    font-size: 1.02rem !important;
    line-height: 1.55 !important;

    text-wrap: pretty;
    hyphens: auto;
    overflow-wrap: normal;
    word-break: normal;

    margin-top: 0 !important;
  }
}


/* ===== Contact persons formatting ===== */
.contact-person {
  font-size: 0.95rem;
  color: var(--ink);
}

.contact-role {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.contact-email {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.contact-email:hover {
  text-decoration: underline;
}

.contact-phone {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

/* защита от автоссылок телефонов на мобиле */
.contact-phone a {
  color: inherit !important;
  text-decoration: none !important;
}
