/* Z-171 (04.12.2026): новости, карусель анонсов на главной, сжатый блок поиска; Z-172: заметная верхняя полоса шапки.
   Отдельный файл после ds.css и dark.css: генератор тёмной темы (deploy/dark/gen) его не пересчитывает,
   тёмные варианты — здесь же, в html[data-theme=dark]. */

/* ---------- Z-172: верхняя полоса шапки (Глеб 04.12: «теряется и не видно даже, а там важная информация»):
   светлая полоса над тёмно-синей шапкой — отделена по цвету; текст крупнее и тёмный, часы с иконкой,
   телефон крупно, «Заказать звонок» — красная кнопка. ---------- */
.topbar{background:#eef1f8;color:#1b2a55;font-size:14px;border-bottom:1px solid #d5dbea}
.topbar-in{min-height:42px}
.topbar-links{gap:4px 22px}
.topbar a{color:#14275a;font-weight:500}
.topbar-links a{padding:2px 0;border-bottom:2px solid transparent}
.topbar a:hover{color:var(--red)}
.topbar-links a:hover{border-bottom-color:var(--red)}
.topbar .muted-l{color:#3a4669}
.tb-hours{display:inline-flex;align-items:center;gap:6px;font-weight:500}
.tb-hours .ic{width:16px;height:16px;color:#14275a}
.topbar .tb-phone{color:#14275a!important;font-size:17px;font-weight:700;letter-spacing:.01em}
.topbar .tb-phone .ic{width:17px;height:17px;color:var(--red)}
.topbar .tb-phone:hover{color:var(--red)!important}
.topbar .tb-msg{width:30px;height:30px;color:#fff!important}
.topbar .tb-msg.tg{background:#229ed9;border-color:#229ed9}.topbar .tb-msg.tg .ic{color:#fff}.topbar .tb-msg.tg:hover{background:#1b8cc2}
.topbar .tb-msg.wa{background:#1fa855;border-color:#1fa855}.topbar .tb-msg.wa .ic{color:#fff}.topbar .tb-msg.wa:hover{background:#1a9149}
.topbar .tb-call{background:var(--red);color:#fff!important;border:0;padding:5px 16px;font-size:14px;font-weight:600}
.topbar .tb-call:hover{background:#b81e31;color:#fff!important}
@media (max-width:760px){.topbar-in{min-height:40px}.topbar .tb-phone{font-size:16px}.topbar .tb-call{padding:4px 12px;font-size:13px}}
html[data-theme=dark] .topbar{background:#1c2438;color:#e3e7ee;border-bottom:1px solid #2b3550}
html[data-theme=dark] .topbar a{color:#e8ecf6}
html[data-theme=dark] .topbar a:hover{color:#ff8a96}
html[data-theme=dark] .topbar-links a:hover{border-bottom-color:#ff8a96}
html[data-theme=dark] .topbar .muted-l{color:#c3cbdb}
html[data-theme=dark] .tb-hours .ic{color:#a9bdf0}
html[data-theme=dark] .topbar .tb-phone{color:#fff!important}
html[data-theme=dark] .topbar .tb-phone .ic{color:#ff8a96}
html[data-theme=dark] .topbar .tb-phone:hover{color:#ff8a96!important}
html[data-theme=dark] .topbar .tb-msg.tg{background:#229ed9;border-color:#229ed9}
html[data-theme=dark] .topbar .tb-msg.wa{background:#1fa855;border-color:#1fa855}
html[data-theme=dark] .topbar .tb-msg .ic{color:#fff}
html[data-theme=dark] .topbar .tb-call{background:var(--red);color:#fff!important;border:0}
html[data-theme=dark] .topbar .tb-call:hover{background:#b81e31}

/* ---------- главная: сжатый блок поиска (Глеб 04.12: «громоздко», скрин со сжатием) ---------- */
@media (min-width:1100px){
  section.hs{padding-top:22px;padding-bottom:18px;min-height:268px;justify-content:center}
  .hs h1{font-size:25px;margin-bottom:12px}
  .hs .hs-search{max-width:820px}
  .hs-search input,.hs-search button{height:42px}
  .hs-search input{font-size:16px}
  .hs-search button{padding:0 24px;font-size:15px}
  .hs-under{gap:4px 20px;margin-top:9px;font-size:13px}
  .hs .tries a+a::before{margin:0 6px}
  .hs .stat{margin-top:6px;font-size:12px}
  /* есть новости: слева такой же скошенный блок, поиск — по центру между ними */
  section.hs.hs-wn{--ak-w:clamp(270px,25%,460px);padding-left:calc(var(--ak-w) + 24px)}
}

/* ---------- карусель анонсов: зеркало кнопки «Запчасти АКПП» ---------- */
.hs-news{position:relative;isolation:isolate;overflow:hidden;color:#fff;
  background:linear-gradient(115deg,#22408f 0%,#1a3270 45%,#0f1f4c 100%)}
.hs-news::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,.06) 0 1px,transparent 1px 18px),repeating-linear-gradient(90deg,rgba(255,255,255,.06) 0 1px,transparent 1px 18px)}
.hs-news-tr{position:absolute;inset:0;z-index:1}
.hs-ns{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;color:#fff;text-decoration:none;
  opacity:0;visibility:hidden;transition:opacity .7s ease,visibility 0s linear .7s}
.hs-ns.on{opacity:1;visibility:visible;transition:opacity .7s ease,visibility 0s}
.hs-ns-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;z-index:-1;transform:scale(1.06);transition:transform 7s ease-out}
.hs-ns.on .hs-ns-bg{transform:scale(1)}
/* затемнение: сверху под заголовком блока и снизу под текстом, середина фото видна */
.hs-ns::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(9,18,45,.66) 0,rgba(9,18,45,.12) 30%,rgba(9,18,45,.5) 52%,rgba(9,18,45,.93) 78%,rgba(9,18,45,.96) 100%)}
.hs-ns-t{position:relative;z-index:1;display:flex;flex-direction:column;gap:5px;text-align:left;line-height:1.2}
.hs-ns-t b{font-size:19px;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-shadow:0 1px 3px rgba(0,0,0,.45)}
.hs-ns-t small{font-size:13px;line-height:1.35;color:#e4e9f7;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.hs-ns:hover{color:#fff}
.hs-ns:hover .hs-ns-t b{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.hs-ns:focus-visible{outline:3px solid #fff;outline-offset:-6px}
.hs-news-h{position:absolute;z-index:2;display:inline-flex;align-items:center;gap:8px;color:#fff;text-decoration:none;font-size:20px;font-weight:700;line-height:1;text-shadow:0 1px 3px rgba(0,0,0,.4)}
.hs-news-h .ic{width:24px;height:24px;flex:0 0 24px}
.hs-news-h:hover{color:#fff}.hs-news-h:hover span{text-decoration:underline;text-underline-offset:3px}
.hs-news-dots{position:absolute;z-index:2;display:flex;gap:7px}
.hs-news-dots button{width:9px;height:9px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.45);cursor:pointer;transition:background .2s,width .25s}
.hs-news-dots button.on{width:22px;border-radius:5px;background:#fff}
.hs-news-dots button:hover{background:#fff}
.hs-news-dots button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (min-width:1100px){
  /* слева на всю высоту полосы, правый край наискось — зеркально кнопке АКПП справа */
  .hs-news{position:absolute;top:0;bottom:0;left:0;width:var(--ak-w);clip-path:polygon(0 0,calc(100% - 46px) 0,100% 100%,0 100%)}
  .hs-news-h{left:28px;top:20px}
  .hs-news-dots{left:30px;bottom:18px}
  .hs-ns{padding:0 56px 40px 28px}
}
@media (max-width:1099.98px){
  /* узкий ПК, планшет, телефон: под кнопкой АКПП во всю ширину поиска, скошенные бока как у неё */
  .hs-news{order:6;width:100%;max-width:1000px;height:150px;margin-top:10px;clip-path:polygon(16px 0,100% 0,calc(100% - 16px) 100%,0 100%)}
  .hs-news-h{left:28px;top:12px;font-size:16px}.hs-news-h .ic{width:20px;height:20px;flex-basis:20px}
  .hs-news-dots{right:30px;top:16px}
  .hs-ns{padding:0 34px 14px 28px}
  .hs-ns-t b{font-size:17px;-webkit-line-clamp:1}
  .hs-ns-t small{-webkit-line-clamp:2}
}
@media (max-width:760px){.hs-news{height:140px}.hs-ns{padding:0 26px 12px 22px}.hs-news-h{left:22px}.hs-ns-t b{font-size:16px}.hs-ns-t small{font-size:12.5px}}
@media (prefers-reduced-motion:reduce){.hs-ns,.hs-ns.on{transition:none}.hs-ns-bg,.hs-ns.on .hs-ns-bg{transform:none;transition:none}}

/* ---------- раздел «Новости» ---------- */
.nw-head{margin:0 0 18px}
.nw-head h1{margin:0 0 4px}
.nw-head p{margin:0;color:var(--muted)}
.nw-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:20px}
.nw-card{display:flex;flex-direction:column;height:100%;background:var(--card);border:1px solid var(--line);border-radius:12px;overflow:hidden;color:var(--text);text-decoration:none;
  transition:border-color .2s,box-shadow .2s,transform .2s}
.nw-card:hover{color:var(--text);border-color:#b9c3da;box-shadow:0 10px 28px -16px rgba(20,39,90,.45);transform:translateY(-2px)}
.nw-pic{position:relative;display:block;aspect-ratio:16/9;background:linear-gradient(115deg,#22408f,#0f1f4c);overflow:hidden}
.nw-pic img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.nw-card:hover .nw-pic img{transform:scale(1.03)}
.nw-nopic{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.55)}.nw-nopic .ic{width:48px;height:48px}
.nw-body{display:flex;flex-direction:column;gap:6px;padding:14px 18px 18px;flex:1}
.nw-body time{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.nw-body b{font-size:18px;line-height:1.3;color:var(--navy)}
.nw-card:hover .nw-body b{color:var(--red)}
.nw-ex{font-size:14.5px;line-height:1.5;color:#3c4456}
.nw-more{margin-top:auto;padding-top:6px;font-size:14px;font-weight:600;color:var(--navy2)}
.nw-grid-s{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.nw-grid-s .nw-body b{font-size:16px}
/* статья */
.nw-art{max-width:900px}
.nw-art-h{margin:0 0 14px}
.nw-art-h time{font-size:14px;color:var(--muted)}
.nw-art-h h1{margin:4px 0 0;line-height:1.25}
.nw-edit{display:inline-block;margin-top:6px;font-size:14px}
.nw-art-pic{margin:0 0 18px;border-radius:12px;overflow:hidden;aspect-ratio:21/9;background:#0f1f4c}
.nw-art-pic img{width:100%;height:100%;object-fit:cover;display:block}
.nw-text{max-width:none}
.nw-text img{max-width:100%;height:auto;border-radius:8px}
.nw-text img.img-s{width:33%}.nw-text img.img-m{width:50%}.nw-text img.img-l{width:75%}
.nw-text figure{margin:16px 0}.nw-text figcaption{font-size:14px;color:var(--muted);margin-top:6px}
.nw-text table{border-collapse:collapse;width:100%;margin:12px 0}.nw-text th,.nw-text td{border:1px solid var(--line);padding:6px 10px;text-align:left}
.nw-text blockquote{margin:14px 0;padding:10px 16px;border-left:4px solid var(--red);background:var(--bg);border-radius:0 8px 8px 0}
.nw-back{margin:16px 0 0}
.nw-other{margin:30px 0 0;max-width:1200px}
.nw-other h2{margin:0 0 12px}
@media (max-width:600px){.nw-grid{grid-template-columns:1fr;gap:14px}.nw-art-pic{aspect-ratio:16/9;margin-left:-16px;margin-right:-16px;border-radius:0}.nw-text img.img-s,.nw-text img.img-m{width:100%}}
@media (prefers-reduced-motion:reduce){.nw-card,.nw-card:hover,.nw-pic img,.nw-card:hover .nw-pic img{transition:none;transform:none}}
html[data-theme=dark] .nw-card:hover{border-color:#3a4766;box-shadow:0 10px 28px -16px rgba(0,0,0,.7)}
html[data-theme=dark] .nw-body b{color:#e8ecf6}
html[data-theme=dark] .nw-card:hover .nw-body b{color:#ff8a96}
html[data-theme=dark] .nw-ex{color:var(--ink-2)}
html[data-theme=dark] .nw-more{color:#a9bdf0}
html[data-theme=dark] .nw-text blockquote{background:var(--surface-2)}
/* ссылки блока новостей — белые в обеих темах (общие правила тёмной темы красят ссылки в .hs синим) */
.hs .hs-news a,.hs .hs-news a:hover,html[data-theme=dark] .hs .hs-news a,html[data-theme=dark] .hs .hs-news a:hover{color:#fff}
/* верхняя полоса на ПК поуже 1440: всё в одну строку */
@media (min-width:1100px) and (max-width:1439.98px){
  .topbar{font-size:13.5px}.topbar-links{gap:4px 14px;flex-wrap:nowrap}.topbar-contact{gap:10px}
  .topbar .tb-phone{font-size:16px}.topbar .tb-call{padding:5px 12px;font-size:13.5px}
}
@media (min-width:1100px) and (max-width:1199.98px){.tb-hours .ic{display:none}.topbar-links{gap:4px 11px}}
/* планшет: часы прячутся, ссылки не рвутся посреди слова, при нехватке места — вторая строка */
@media (min-width:761px) and (max-width:1099.98px){
  .topbar{font-size:13px}.topbar-in{gap:10px}.topbar-links{gap:2px 12px}.topbar-links a{white-space:nowrap}
  .topbar .tb-hours{display:none}.topbar-contact{gap:8px}.topbar .tb-phone{font-size:15px}.topbar .tb-call{padding:4px 11px;font-size:13px}
}
