/* ===== MAUS main.css (АККУРАТНО ПРИВЕДЁН В ПОРЯДОК) ===== */

/* =========================================================
   1) VARIABLES
   ========================================================= */
:root{
  /* фирменные */
  --brand: #1d4999;         /* MAUS основной */
  --brand2:#1D4ED8;         /* ваш яркий синий (можно оставить) */

  /* базовые */
  --white:#ffffff;
  --card:#f9fafb;
  --muted:#475569;
  --ink:#0f172a;
  --shadow:0 4px 12px rgba(0,0,0,.08);

  /* высоты фиксированных панелей */
  --header-h: 76px;         /* высота шапки */
  --subnav-h: 40px;         /* высота подшапки */

  /* контейнер */
  --container-pad: 10px;
}

/* =========================================================
   2) BASE / LAYOUT
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--white);                 /* было синее = ломало читаемость */
  color: var(--ink);
  width: 100%;
  max-width: none;

  /* место под fixed header + fixed subnav */
  padding-top: calc(var(--header-h) + var(--subnav-h));
}

.container{
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ===== МОБИЛЬНЫЕ — 100% ШИРИНА ===== */
@media (max-width: 800px) {
  section, footer, .hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding: 20px 6px !important;
  }

  .container {
    max-width: none !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding: 0 6px !important;
  }

  .hero h1 { font-size: 24px; }
  .dropdown-toggle { width: 100%; text-align: left; }
}

/* =========================================================
   3) HEADER
   ========================================================= */
header{ background: var(--brand2); color:#fff; padding:1px 1px; }

.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 1000;
  background: var(--brand2);
  height: auto;
}

/* верхняя строка */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:9px 0;
}

.brand{ display:flex; align-items:center; gap:10px; }
.brand img{
  width:180px; height:52px;
  border-radius:8px;
  background:#fff;
  object-fit:contain;
  display:block;
}

/* nav базовый */
nav ul{ list-style:none; padding:0; margin:0; display:flex; gap:18px; flex-wrap:wrap; align-items:center; }
nav a{ color:#fff; text-decoration:none; font-weight:bold; }
nav a:hover{ opacity:.85; }

/* dropdown */
nav ul li{ position:relative; }
.dropdown{ position:relative; }

.dropdown-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  min-width:120px;
  width:max-content;
  max-width:min(640px, 95vw);
  background:var(--brand2);
  padding:8px 0;
  border-radius:10px;
  box-shadow:0 10px 26px rgba(0,0,0,.25);
  z-index:2000;
}
.dropdown-menu li{ width:100%; }

.dropdown-menu a{
  display:block;
  padding:8px 10px;
  color:#ffffff;
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  white-space:nowrap;
}
.dropdown-menu a:hover{ background:rgba(255,255,255,.12); color:#0F172A; }

.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu{
  display:block;
}

.dropdown-menu .divider{
  height:1px;
  background:rgba(255,255,255,.25);
  margin:8px 12px;
}

/* =========================================================
   4) PRODUCTS MEGA MENU (ваша логика, но без конфликтующих дублей)
   ========================================================= */
.nav-dropdown{ position: relative; }

.nav-dropdown:hover .products-menu,
.nav-dropdown:focus-within .products-menu{
  display:grid;
}

.products-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  width:min(653px, 96vw);
  grid-template-columns: max-content max-content 1fr;
  gap:12px;
  background:var(--brand2);
  border-radius:14px;
  box-shadow:0 14px 36px rgba(0,0,0,.25);
  z-index:3000;
  overflow:hidden;
}

.products-left{
  width: clamp(220px, 26vw, 320px);
  padding: 1px 0;
  border-right:1px solid rgba(255,255,255,.15);
  max-height: calc(100vh - 140px);
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:8px;
}

.series-list{ list-style:none; margin:0; padding:0; display:block !important; }
.products-left .series-list > li{ display:block !important; width:100%; }

.series-divider{ height:1px; margin:8px 12px; background: rgba(255,255,255,.2); }

.series-btn{
  display:block !important;
  width:100%;
  box-sizing:border-box;
  text-align:left;
  background:transparent;
  border:0;
  color:#fff;
  padding:7px 14px;
  font-weight:700;
  font-size:13px;
  cursor:pointer;
  border-radius:10px;
  margin:2px 8px;
  text-decoration:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.series-btn:hover,
.series-btn:focus-visible{
  background: rgba(255,255,255,.12);
  outline:none;
  color:#0F172A;
}

.series-btn.is-active{ background: rgba(255,255,255,.18); }

.series-btn.is-active::after{
  content:"→";
  margin-left:8px;
}

.products-all{
  display:block;
  margin:8px 12px 10px;
  padding:10px 14px;
  color:#fff;
  text-decoration:none;
  border-radius:10px;
  background: rgba(0,0,0,.12);
}
.products-all:hover{ background: rgba(0,0,0,.18); }

.products-right{
  min-width:320px;
  width:100%;
  padding:10px 10px 12px;
  max-height: calc(100vh - 140px);
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:8px;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 10px 10px;
}

.panel-title{
  color:#fff;
  text-decoration:none;
  font-weight:800;
  font-size:14px;
}
.panel-title:hover{ color:#0F172A; }

.models-panel{ display:none; }
.models-panel.is-active{ display:block; }

.models-list{ list-style:none; margin:0; padding:0; display:block !important; }
.models-list > li{ display:block !important; width:100%; }

.models-list a{
  display:block !important;
  width:100%;
  box-sizing:border-box;
  padding:2px 10px;
  margin:2px 0;
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  border-radius:10px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.models-list a:hover{ background: rgba(255,255,255,.12); color:#0F172A; }

.nav-muted{ color: rgba(255,255,255,.75); padding: 1px 10px; display:block; }

@media (max-width: 860px){
  .products-menu{
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    border-radius: 12px;
    margin-top: 8px;
  }
  .products-left{
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.15);
    width: 100%;
  }
  .products-right{ min-width: 0; }
}

/* разделитель */
.menu-divider { height:1px; margin:1px 0; background: rgba(0,0,0,.08); }

/* =========================================================
   5) TOP ACTIONS (search, contacts, lang)
   ========================================================= */
.top-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.top-actions form{
  display:flex;
  gap:8px;
  align-items:center;
}

.top-actions input{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid #e2e8f0;
  min-width:170px;
}

.top-actions button{
  background:#fff;
  color:var(--brand2);
  border:none;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
}

.top-contacts{
  line-height:1.2;
  font-weight:700;
  white-space:nowrap;
}
.top-contacts a{ color:#fff; text-decoration:none; font-weight:700; }
.top-contacts a:hover{ text-decoration:underline; }

/* lang flags */
.lang{
  display:flex;
  gap:6px;
  align-items:center;
  white-space:nowrap;
}

.lang-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#fff;
  text-decoration:none;
  padding:5px 6px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
}
.lang-link:hover{ background: rgba(255,255,255,.12); }

.flag{
  display:inline-flex;
  width:22px;
  height:16px;
  border-radius:3px;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
}

/* burger */
.nav-toggle{
  display:none;
  background:#fff;
  color:var(--brand2);
  border:none;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:800;
  line-height:1;
}

.main-nav{ flex:1 1 auto; }
.main-nav ul{ justify-content:center; }

/* MOBILE header behavior */
@media (max-width: 980px){
  .topbar{ gap:10px; }
  .nav-toggle{ display:inline-flex; }

  .main-nav{ display:none; width:100%; }
  .main-nav.is-open{ display:block; }

  .main-nav ul{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px 0;
  }

  /* dropdowns as lists on mobile */
  .dropdown-menu{
    position:static;
    display:block;
    min-width:360px;
    width:max-content;
    max-width:min(640px, 95vw);
    box-shadow:none;
    background:rgba(255,255,255,.08);
    border-radius:12px;
    margin-top:8px;
    padding:8px 0;
  }

  .dropdown-menu a{ padding: 2px 2px; white-space: nowrap; }

  .top-actions{ width:100%; justify-content:space-between; }
  .top-actions form{ flex:1 1 320px; }
  .top-actions input{ flex:1; min-width:0; width:100%; }
  .top-contacts{ flex:0 0 auto; }
  .lang{ flex:0 0 auto; }
}

.dropdown-toggle{
  background:none;
  border:none;
  color:#fff;
  font-weight:bold;
  padding:0;
  cursor:pointer;
  position:relative;
}
.dropdown-toggle::after{ content:" ▾"; font-size:12px; margin-left:4px; }
.dropdown-toggle:focus{ outline:2px solid rgba(255,255,255,.5); border-radius:4px; }



/* =========================================================
   7) HERO / CONTENT
   ========================================================= */
.hero{
  background: linear-gradient(rgba(11,42,74,.12), rgba(11,42,74,.75)), url('/images/crane-hero.webp');
  background-size:cover;
  background-position:center;
  color:#fff;
  padding:10px 5px;
}

.hero h1{
  margin:0 0 10px;
  font-size:40px;
  line-height:1.1;
  color:#fff;
}

.hero-text h2{ color:#ffffff; }
.hero p{ margin:0 0 18px; max-width:900px; line-height:1.6; color:#fff; }

.cta{ display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }

.btn{
  display:inline-block;
  padding:0.8rem 1.8rem;
  border-radius:8px;
  font-weight:600;
  text-decoration:none;
  transition: all 0.2s;
  margin:0.5rem;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn.primary{ background:#11b055; color:#fff; border:1px solid rgba(255,255,255,.25); }
.btn.secondary{ background:#007bff; color:#fff; border:1px solid rgba(255,255,255,.25); }

section{
  padding:1px 4px;
  background:#fff;
  margin-bottom:10px;
  width:100%;
}

h2,h3{ color: var(--brand); }

.grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(50px,340px)); gap:15px; }

.card{
  background: var(--card);
  border-radius:12px;
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card img{
  width:100%;
  height:170px;
  object-fit:cover;
  background:#e5e7eb;
}

.card .c{ padding:10px; }

.small{ font-size:14px; color: var(--brand2); }
.small2{ font-size:10px; color: var(--brand2); }

.links ul{ line-height:1.8; }

/* =========================================================
   8) FOOTER
   ========================================================= */
footer{
  background: var(--brand2);
  color:#fff;
  padding:5px;
  width:100%;
  max-width:none;
}

footer a{ color:#fff; text-decoration:none; }
footer a:hover{ text-decoration:underline; }

/* =========================================================
   9) COOKIE MODAL
   ========================================================= */
.cookie-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
}
.cookie-modal.is-open{ display:block; }

.cookie-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.65);
  backdrop-filter: blur(2px);
}

.cookie-box{
  position:relative;
  max-width:860px;
  margin: min(12vh, 120px) auto 0;
  background:var(--white);
  border-radius:16px;
  box-shadow:0 18px 55px rgba(0,0,0,.35);
  padding:18px 18px 16px;
}

.cookie-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.cookie-title{
  font-weight:800;
  color:var(--brand);
  letter-spacing:.2px;
  font-size:18px;
}

.cookie-text{
  color:var(--muted);
  line-height:1.6;
  font-size:15px;
}

.cookie-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  justify-content:flex-end;
}

.cookie-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  text-decoration:none;
  font-weight:700;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
}

.cookie-btn-primary{ background: var(--brand); color: var(--white); }
.cookie-btn-primary:hover{ opacity:.95 }

.cookie-btn-ghost{
  background:#ffffff;
  color:var(--brand);
  border-color:rgba(29,73,153,.25);
}
.cookie-btn-ghost:hover{ background:rgba(29,73,153,.06) }

@media (max-width: 540px){
  .cookie-box{ margin: 10vh 12px 0; }
  .cookie-actions{ justify-content:stretch; }
  .cookie-btn{ width:100%; }
}

/* =========================================================
   10) MAUS universal footer (ваш блок — оставил, без конфликтов)
   ========================================================= */
.maus-footer{
  margin-top:40px;
  padding:24px 16px;
  background:#0f2f66;
}

.maus-footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.maus-socials{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  justify-content:center;
}

.maus-social{
  width:40px;
  height:40px;
  border-radius:10px;
  background:rgba(255,255,255,.15);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  text-decoration:none;
}

.maus-social svg{
  width:22px;
  height:22px;
  fill:#fff;
}

.maus-social:hover{ background: var(--brand); }

.maus-counter{
  position:absolute;
  top:-6px;
  right:-6px;
  background: var(--brand);
  color:#fff;
  font-size:11px;
  font-weight:800;
  padding:2px 6px;
  border-radius:999px;
  pointer-events:none;
}

.maus-footer-title{
  color:#fff;
  font-weight:700;
  text-align:center;
}

/* соцсети (второй вариант — оставил, он не конфликтует) */
.maus-social{
  display:flex;
  gap:10px;
  align-items:center;
}

.maus-social__link{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color: var(--brand);
  border:1px solid rgba(29,73,153,.22);
  background:#fff;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.maus-social__icon{ display:block; fill: currentColor; }

.maus-social__link:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(0,0,0,.10);
  background: var(--brand);
  color:#fff;
}

.maus-social__link:focus-visible{
  outline:3px solid rgba(29,73,153,.35);
  outline-offset:2px;
}

.contact-link{
  display:flex;
  align-items:center;
  gap:0.5rem;
  text-decoration:none;
  border-radius:4px;
  transition: background 0.2s;
}

.contact-link svg{
  flex-shrink:0;
  vertical-align:middle;
}

.contact-link:hover{ color:#FFC107; }

/* доп. лейблы */
.series-label,
.series-label2{
  display:block;
  margin:6px 8px 4px;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-weight:700;
  letter-spacing:.01em;
  color:#FFC107;
  background:#0250e7;
  border:1px solid #ffffff;
  border-radius:7px;
}

.series-label{ padding:10px 13px; font-size:15px; }
.series-label2{ padding:1px 1px; font-size:14px; }




/* =========================
   SUBNAV — FORCE ONE LINE
   (FINAL OVERRIDE)
   ========================= */

.subnav{
  position: fixed !important;
  top: var(--header-h) !important;
  left: 0 !important;
  width: 100% !important;
  height: var(--subnav-h) !important;
  z-index: 900 !important;

  background: #1d4999;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.subnav .container{
  height: 100% !important;
}

/* одна строка */
.subnav-row{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;

  height: 100% !important;

  white-space: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

/* крошки + пункты */
.subnav-crumbs,
.subnav-tabs{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;

  flex: 0 0 auto !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

/* если крошек много — аккуратно обрежем */
.subnav-crumbs{
  max-width: 55vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* разделитель */
.subnav .sep{
  display: inline-block !important;
  margin: 0 6px !important;
  opacity: .55 !important;
}

/* внутри не может быть блочных */
.subnav-crumbs *,
.subnav-tabs *{
  white-space: nowrap !important;
}


/* приоритет: вкладки важнее, крошки можно обрезать */
.subnav-crumbs{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.subnav-tabs{
  flex: 0 0 auto !important;
}
