/* Строителството.бг: нов облик „чертеж“. Mobile-first: основата е за телефон, @media (min-width) добавя таблет и компютър. */

:root {
  /* синьото от логото и „милиметровката“ на чертежа */
  --bp: #0e2747;
  --bp-2: #13335c;
  --blue: #24508f;
  --blue-700: #1b3f73;
  --blue-50: #eaf0f8;
  /* жълто като предупредителна лента на строителен обект */
  --yellow: #ffc61a;
  --yellow-700: #e3a900;
  --yellow-50: #fff5d1;

  --ink: #141a22;
  --ink-2: #343c47;
  --muted: #5d6571;
  --faint: #8a919b;
  --paper: #f2f0eb;
  --surface: #fff;
  --line: #d9d5cb;
  --line-2: #e7e4dd;

  --r: 6px;
  --r-lg: 10px;
  --sh: 0 1px 2px rgba(14, 39, 71, .06), 0 10px 24px -18px rgba(14, 39, 71, .45);
  --hard: 4px 4px 0 var(--yellow);

  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gut: 16px;
  --hdr-h: 60px;
  --hdr-vis: var(--hdr-h);
  --bnav-h: 64px;
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 9px, var(--ink) 9px 18px);
}

*, *::before, *::after { box-sizing: border-box; }
* { font-feature-settings: "locl" 0 !important; } /* шорткът font: нулира настройката, а lang="bg" иначе включва българските форми (д като g, т като m) */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-vis) + 12px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
body.sheet-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; } /* иначе display: grid/flex на някои блокове (напр. лентата за бисквитките) не им дава да се скрият */
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--yellow); color: var(--ink); font-weight: 600; }
.skip:focus { top: 8px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--fill { fill: currentColor; stroke: none; }

/* Етикети като надписи на чертеж */
.label { margin: 0 0 8px; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.label::before { content: ""; width: 14px; height: 2px; background: var(--yellow-700); }
.label--bp { color: #9fb6d6; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 198, 26, .22); }
.tick .label::before, .label:has(.dot)::before { display: none; }

/* Бутони */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: var(--r); border: 2px solid transparent; font: 600 15px/1.2 var(--f-body); text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s, background-color .15s, border-color .15s; }
.btn .i { width: 18px; height: 18px; }
.btn--yellow { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn--yellow:hover { background: #ffd34d; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.btn--line { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn--line:hover { color: var(--ink); box-shadow: var(--hard); transform: translate(-1px, -1px); }
.btn--ghost-dark { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost-dark:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.btn--sm { min-height: 40px; padding: 7px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); color: var(--ink); }
.icon-btn:hover { background: var(--line-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.chip .i { width: 16px; height: 16px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip--sm { min-height: 30px; padding: 3px 10px; font-size: 13.5px; }
.chip--bp { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: #dbe5f3; }
.chip--bp:hover { border-color: var(--yellow); color: #fff; }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Горната лента с контакти (само на компютър) */
.util { display: none; background: var(--ink); color: #c9d0da; font-size: 13px; }
.util__in { display: flex; align-items: center; gap: 22px; min-height: 36px; }
.util a { color: #c9d0da; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.util a:hover { color: #fff; }
.util .i { width: 15px; height: 15px; color: var(--yellow); }
.util__tag { font: 600 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.util__nav { margin-left: auto; display: flex; gap: 18px; }
.util__nav a[aria-current] { color: #fff; text-decoration: underline; }

/* Горна лента */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); transition: transform .25s; }
.hdr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--hazard); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr__in { display: flex; align-items: center; gap: 12px; min-height: var(--hdr-h); padding-top: 4px; }
.wm { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.wm:hover { color: var(--ink); }
.mark { width: 40px; height: 28px; flex: none; }
.wm__txt { display: grid; line-height: 1.05; min-width: 0; }
.wm__txt b { font: 600 19px/1.1 var(--f-head); letter-spacing: .01em; color: var(--bp); }
.wm__txt i { font-style: normal; color: var(--yellow-700); }
.wm__txt small { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.nav { display: none; }
.hdr__login { display: none; }
.hdr__menu { margin-left: auto; }
.hdr .finder--hdr { display: none; }

/* Търсачката */
.finder { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 5px 5px 5px 14px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); }
.finder > .i { color: var(--muted); }
.finder input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; padding: 8px 2px; }
.finder input::-webkit-search-cancel-button { display: none; }
.finder .btn { min-height: 42px; }
.finder:focus-within { box-shadow: var(--hard); }
.finder--hero { border-color: var(--yellow); max-width: 640px; }
.finder--hero:focus-within { box-shadow: 4px 4px 0 rgba(255, 198, 26, .45); }
.finder--band { margin-top: 18px; max-width: 640px; border-color: var(--yellow); }

/* „Милиметровка“: фонът на чертожните части */
.bp { position: relative; background-color: var(--bp); color: #fff;
  background-image: linear-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .075) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px; background-position: -1px -1px; }
.bp a { color: #fff; }

/* Начало */
.hero { padding: 34px 0 22px; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 12px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #9fb6d6; }
.eyebrow span { padding: 3px 7px; border: 1px solid var(--yellow); color: var(--yellow); }
.hero h1 { font: 600 clamp(32px, 8.4vw, 58px)/1.06 var(--f-head); letter-spacing: .005em; max-width: 19ch; }
.hero__lead { margin: 14px 0 22px; max-width: 58ch; color: #c8d5e7; font-size: 16.5px; }
.hero .qchips { margin-top: 14px; }
.hero__draw { display: none; }
.draw { width: 100%; height: auto; }
.draw path { fill: none; stroke: #b9cbe4; stroke-width: 1.6; stroke-linecap: square; }
.draw__grid path { stroke: rgba(255, 255, 255, .5); }
.draw__crane { stroke: var(--yellow) !important; }
.draw__dim path { stroke: #7f9cc4; stroke-width: 1; }
.draw__dim text { fill: #9fb6d6; font: 500 11px var(--f-mono); text-anchor: middle; }
.draw__lines path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s cubic-bezier(.5, 0, .2, 1) forwards; }
.draw__lines path:nth-child(n+5) { animation-delay: .5s; }
.draw__lines .draw__crane { animation-delay: 1.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dims { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255, 255, 255, .22); }
.dims li { position: relative; padding: 14px 8px 4px 0; display: grid; }
.dims li + li { padding-left: 12px; border-left: 1px dashed rgba(255, 255, 255, .22); }
.dims b { font: 600 clamp(22px, 6vw, 34px)/1.1 var(--f-head); color: var(--yellow); }
.dims span { font: 500 11.5px/1.35 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: #9fb6d6; }

/* ТОП фирми: лента, която се движи (спира при посочване; без движение при „намалени анимации“) */
.tick { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 0 16px; }
.tick__head .label { margin-bottom: 10px; color: var(--ink); }
.tick__viewport { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tick__viewport::-webkit-scrollbar { display: none; }
.tick__track { list-style: none; margin: 0; padding: 0 var(--gut); display: flex; gap: 12px; width: max-content; }
.tick__item { display: block; height: 92px; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; transition: border-color .2s, box-shadow .2s; }
.tick__item img { height: 100%; width: auto; max-width: none; }
.tick__item:hover { border-color: var(--ink); box-shadow: var(--hard); }
.tick.is-moving .tick__viewport { overflow: hidden; }
.tick.is-moving .tick__track { animation: tick var(--tick-d, 60s) linear infinite; }
.tick.is-moving .tick__viewport:hover .tick__track, .tick.is-moving .tick__viewport:focus-within .tick__track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

/* Раздели */
.sec { padding: 40px 0; }
.sec--paper { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sec__title { font: 600 clamp(25px, 6vw, 36px)/1.1 var(--f-head); color: var(--bp); }
.sec__note { margin: 0; font: 500 12.5px/1.3 var(--f-mono); color: var(--muted); }
.rv { opacity: 0; transform: translateY(14px); transition: opacity .55s, transform .55s; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* Отраслите: номерирани табели */
.cico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--bp); border-radius: var(--r); color: var(--bp); background: var(--blue-50); }
.cico .i { width: 22px; height: 22px; stroke-width: 1.6; }
.cico--lg { width: 54px; height: 54px; }
.cico--lg .i { width: 28px; height: 28px; }
.bp .cico { border-color: var(--yellow); color: var(--yellow); background: rgba(255, 198, 26, .08); }
.plates { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.plate { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px; transition: border-color .2s, box-shadow .2s; }
.plate:hover { border-color: var(--ink); box-shadow: var(--hard); }
.plate__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.plate__no { position: absolute; top: 8px; right: 10px; font: 600 11px/1 var(--f-mono); color: var(--faint); letter-spacing: .06em; }
.plate h3 { font: 600 18px/1.2 var(--f-head); letter-spacing: .01em; }
.plate h3 a { color: var(--ink); text-decoration: none; }
.plate h3 a:hover { color: var(--blue); text-decoration: underline; }
.plate__n { align-self: end; font: 600 12px/1 var(--f-mono); color: var(--blue); background: var(--blue-50); padding: 4px 6px; border-radius: 3px; }
.plate__n:empty { display: none; }
.plate__subs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.plate__subs a { display: inline-block; padding: 3px 0; margin-right: 10px; color: var(--ink-2); font-size: 14.5px; text-decoration: none; border-bottom: 1px dashed var(--line); }
.plate__subs a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.plate__more { margin-top: 6px; }
.plate__more summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font: 600 13px/1 var(--f-mono); color: var(--blue); cursor: pointer; }
.plate__more summary::-webkit-details-marker { display: none; }
.plate__more summary .i { width: 16px; height: 16px; transition: transform .2s; }
.plate__more[open] summary .i { transform: rotate(180deg); }
.plate__more .plate__subs { margin-top: 2px; }
.plate__empty { margin: 10px 0 0; font-size: 14.5px; }
.plate__empty a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.plate__empty .i { width: 16px; height: 16px; }

/* Препоръчани */
.recs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.rec { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.rec:hover { border-color: var(--ink); box-shadow: var(--hard); }
.rec__img { height: 72px; display: grid; place-items: center; padding: 6px; border-radius: 4px; background: #fff; border: 1px solid var(--line-2); }
.rec__img img { max-height: 60px; width: auto; object-fit: contain; }
.rec__name { font: 600 17px/1.2 var(--f-head); color: var(--ink); text-decoration: none; }
.rec__name::after { content: ""; position: absolute; inset: 0; }
.rec__body p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec__ext { color: var(--faint); }

/* Новини + реклама */
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.news { list-style: none; margin: 0; padding: 0; counter-reset: n; border-top: 2px solid var(--ink); }
.news li { counter-increment: n; border-bottom: 1px solid var(--line); }
.news a { position: relative; display: grid; gap: 4px; padding: 14px 0 14px 46px; color: var(--ink); text-decoration: none; }
.news a::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 16px; font: 600 13px/1 var(--f-mono); color: var(--yellow-700); }
.news b { font-size: 16.5px; line-height: 1.35; }
.news a:hover b { color: var(--blue); text-decoration: underline; }
.news span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.news small { display: inline-flex; align-items: center; gap: 4px; font: 500 12px/1 var(--f-mono); color: var(--faint); }
.news small .i { width: 13px; height: 13px; }
.ads__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.ad { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.3; transition: border-color .2s, box-shadow .2s; }
.ad:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--hard); }
.ad__img { height: 92px; display: grid; place-items: center; }
.ad__img img { max-height: 92px; width: auto; object-fit: contain; }

/* Покана */
.cta { position: relative; overflow: hidden; display: grid; gap: 18px; padding: 26px 20px 24px; border-radius: var(--r-lg); background: var(--bp); color: #fff; }
.cta::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--hazard); }
.cta .label { color: #9fb6d6; }
.cta h2 { font: 600 clamp(24px, 6vw, 34px)/1.1 var(--f-head); }
.cta p { margin: 8px 0 0; color: #c8d5e7; max-width: 62ch; }
.cta__act { display: flex; flex-wrap: wrap; gap: 10px; }
.cta--doc { margin-top: 30px; }
.cta--doc h2 { font-size: 24px; }

/* Долна част */
.ftr { background: var(--ink); color: #b9c2ce; padding: 38px 0 20px; font-size: 14.5px; }
.ftr__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.ftr .wm__txt b { color: #fff; }
.ftr .wm__txt small { color: #8d97a5; }
.ftr__brand p { margin: 12px 0 0; max-width: 38ch; }
.ftr h3 { margin: 0 0 12px; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.ftr a { color: #dfe5ec; text-decoration: none; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.cinfo { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cinfo li { display: flex; gap: 10px; align-items: flex-start; }
.cinfo .i { width: 18px; height: 18px; margin-top: 2px; color: var(--yellow-700); }
.ftr .cinfo .i { color: var(--yellow); }
.ftr__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.regs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.regs a { display: grid; gap: 2px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); }
.regs a:hover { border-color: var(--yellow); text-decoration: none; }
.regs b { color: #fff; font-weight: 600; font-size: 14px; }
.regs span { color: #8d97a5; font-size: 12.5px; }
.ftr__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #8d97a5; }
.ftr__bottom p { margin: 0; }
.totop { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--r); color: #fff; }
.totop:hover { border-color: var(--yellow); color: var(--yellow); }

/* Телефон: долна лента с жълт бутон за търсене в средата */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: var(--bp); border-top: 3px solid var(--yellow); }
.bnav > a, .bnav > button:not(.bnav__fab) { display: grid; justify-items: center; align-content: center; gap: 3px; height: var(--bnav-h); color: #b9c9df; text-decoration: none; font-size: 11.5px; font-weight: 500; }
.bnav .i { width: 22px; height: 22px; }
.bnav [aria-current], .bnav [aria-expanded="true"] { color: var(--yellow); }
.bnav__fab { justify-self: center; align-self: start; width: 62px; height: 62px; margin-top: -22px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); border: 4px solid var(--bp); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); transition: transform .15s; }
.bnav__fab .i { width: 26px; height: 26px; stroke-width: 2.2; }
.bnav__fab:active { transform: scale(.94); }

/* Листове: търсене, отрасли, меню */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet__bg { position: absolute; inset: 0; background: rgba(10, 18, 30, .55); animation: fade .2s; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-top: 4px solid var(--yellow); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 14px var(--gut) calc(22px + env(safe-area-inset-bottom)); animation: up .25s cubic-bezier(.2, .8, .2, 1); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__title { font: 600 22px/1.1 var(--f-head); color: var(--bp); }
.sheet.is-closing .sheet__panel { animation: down .17s forwards; }
.sheet.is-closing .sheet__bg { animation: fade .17s reverse forwards; }
.sheet--side .sheet__panel { top: 0; left: auto; width: min(360px, 88vw); max-height: none; border-radius: 0; border-top: 0; border-left: 4px solid var(--yellow); animation: slide .25s cubic-bezier(.2, .8, .2, 1); }
.sheet--side.is-closing .sheet__panel { animation: slide-out .17s forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes slide-out { to { transform: translateX(100%); } }
.clist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.clist a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.25; }
.clist a:hover { border-color: var(--ink); color: var(--ink); }
.clist a[aria-current] { border-color: var(--bp); background: var(--blue-50); }
.clist .cico { width: 38px; height: 38px; }
.clist small { font: 600 12px/1 var(--f-mono); color: var(--faint); }
.mnav { display: grid; gap: 2px; }
.mnav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px; border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 500; }
.mnav a:hover { background: var(--line-2); color: var(--ink); }
.mnav a[aria-current] { background: var(--ink); color: #fff; }
.mnav .i { color: var(--blue); }
.mnav a[aria-current] .i { color: var(--yellow); }

/* Бисквитки */
.cookie { position: fixed; left: 10px; right: 10px; bottom: calc(var(--bnav-h) + 12px + env(safe-area-inset-bottom)); z-index: 50; display: grid; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--ink); color: #dfe5ec; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); border-left: 5px solid var(--yellow); }
.cookie p { margin: 0; }
.cookie a { color: var(--yellow); }

/* Шапка на вътрешните страници */
.band { padding: 14px 0 26px; }
.band--firm { padding-bottom: 72px; }
.crumbs { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13.5px; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--faint); }
.bp .crumbs li + li::before { color: #6f8db7; }
.crumbs a { color: var(--blue); text-decoration: none; }
.bp .crumbs a { color: #c8d5e7; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .i { width: 17px; height: 17px; }
.crumbs [aria-current] { color: var(--muted); overflow-wrap: anywhere; }
.bp .crumbs [aria-current] { color: #9fb6d6; }
.band__head { display: flex; align-items: center; gap: 14px; }
.band h1 { font: 600 clamp(27px, 7vw, 44px)/1.08 var(--f-head); overflow-wrap: anywhere; }
.band__meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font: 500 12.5px/1.4 var(--f-mono); color: #9fb6d6; text-transform: uppercase; letter-spacing: .04em; }
.band__meta b { color: var(--yellow); font-weight: 600; }

/* Категориите на отрасъла */
.subs { margin: 22px 0 6px; }
.subgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.subgrid a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; line-height: 1.25; }
.subgrid a:hover { border-color: var(--ink); color: var(--ink); box-shadow: 3px 3px 0 var(--yellow); }
.subgrid .i { width: 16px; height: 16px; color: var(--faint); }
.subgrid.is-cut li:nth-child(n+9) { display: none; }
.subs__more { margin-top: 10px; }
.subnav { display: flex; gap: 8px; overflow-x: auto; margin: 18px calc(var(--gut) * -1) 0; padding: 2px var(--gut) 6px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }

/* Списъци с фирми */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 22px 0 46px; }
.side { display: none; }
.side__box { position: sticky; top: calc(var(--hdr-vis) + 14px); max-height: calc(100vh - var(--hdr-vis) - 28px); overflow-y: auto; padding-right: 4px; transition: top .25s; }
.side .clist a { min-height: 44px; font-size: 14px; }
.side .clist .cico { width: 32px; height: 32px; }
.side .clist .cico .i { width: 18px; height: 18px; }
.slist { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.slist a { display: block; padding: 7px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.3; }
.slist a:hover { color: var(--ink); border-left-color: var(--ink); }
.slist a[aria-current] { color: var(--ink); font-weight: 600; border-left-color: var(--yellow-700); background: var(--yellow-50); }
.results__bar { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.results__bar h2 { font: 600 20px/1.1 var(--f-head); color: var(--bp); }
.results__bar span { font: 500 12.5px/1.3 var(--f-mono); color: var(--muted); }
.results__bar b { color: var(--ink); }
.flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fcard { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .2s, box-shadow .2s; }
.fcard:hover { border-color: var(--ink); box-shadow: var(--hard); }
.fcard--vip { border-left: 5px solid var(--yellow); }
.fcard__logo { width: 64px; height: 64px; display: grid; place-items: center; padding: 4px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; overflow: hidden; }
.fcard__logo img { max-height: 100%; width: auto; object-fit: contain; }
.fcard__logo b { font: 600 22px/1 var(--f-head); color: var(--bp); }
.fcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fcard__name { font: 600 18px/1.2 var(--f-head); letter-spacing: .01em; overflow-wrap: anywhere; }
.fcard__name a { color: var(--ink); text-decoration: none; }
.fcard__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.fcard__name a:hover { color: var(--blue); }
.vip { flex: none; padding: 3px 7px 3px 8px; font: 700 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink); background: var(--yellow); border-radius: 2px; box-shadow: inset 4px 0 0 var(--ink); }
.fcard__act { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.fcard__meta { margin: 8px 0 0; display: grid; gap: 4px; }
.fcard__meta div { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.fcard__meta dt .i { width: 16px; height: 16px; margin-top: 2px; color: var(--faint); }
.fcard__meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tels { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; }
.fcard .tels a { position: relative; z-index: 2; }
.tels a { color: var(--blue); text-decoration: none; font-weight: 500; }
.tels a:hover { text-decoration: underline; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pager__info { font: 500 12.5px/1.3 var(--f-mono); color: var(--muted); }
.pager__info b { color: var(--ink); }
.pager__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 479px) { .pager a, .pg { min-width: 36px; height: 40px; padding: 0 4px; } .pg--gap { min-width: 14px; } }
.pager a, .pg { min-width: 42px; height: 42px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 14.5px/1 var(--f-mono); }
.pager a:hover { border-color: var(--ink); }
.pg[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.pg--gap { border: 0; background: none; min-width: 20px; }
.pager .i { width: 18px; height: 18px; }
.ads .label { color: var(--ink); }
.empty { padding: 34px 18px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface); }
.empty .cico { margin: 0 auto 12px; }
.empty h2 { font: 600 22px/1.2 var(--f-head); }
.empty p { color: var(--muted); margin: 8px 0 0; }

/* Профил на фирма */
.prof { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: -56px; padding-bottom: 46px; }
.phead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); }
.phead::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--hazard); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.phead__logo { width: 120px; height: 90px; display: grid; place-items: center; padding: 8px; margin-top: 4px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.phead__logo img { max-height: 100%; width: auto; object-fit: contain; }
.phead__logo b { font: 600 34px/1 var(--f-head); color: var(--bp); }
.phead__cats { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 0; font: 500 12px/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; }
.phead__cats a { color: var(--blue); text-decoration: none; }
.phead__cats a + a::before { content: "·"; margin: 0 8px; color: var(--faint); }
.phead__cats a:hover { text-decoration: underline; }
.phead h1 { font: 600 clamp(28px, 7.4vw, 42px)/1.08 var(--f-head); color: var(--bp); overflow-wrap: anywhere; }
.phead__addr { margin: 8px 0 0; display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.phead__addr .i { width: 18px; height: 18px; margin-top: 3px; color: var(--yellow-700); }
.phead__act { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.phead__act .btn { padding-left: 10px; padding-right: 10px; }
.prof__side { display: grid; gap: 14px; align-content: start; }
.tblock { border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.tblock h2 { margin: 0; padding: 10px 14px; background: var(--ink); color: #fff; font: 600 12.5px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.tblock dl { margin: 0; }
.tblock dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-top: 1px solid var(--line); }
.tblock dl > div:first-child { border-top: 0; }
.tblock dt { padding: 10px 10px 10px 14px; font: 600 11.5px/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); background: #faf9f6; }
.tblock dd { margin: 0; padding: 9px 14px; font-size: 14.5px; line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.tblock__kw { padding: 12px 14px 14px; border-top: 2px solid var(--ink); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw .chip { cursor: default; white-space: normal; max-width: 100%; height: auto; line-height: 1.35; background: var(--paper); border-color: transparent; }
.kw.is-cut .chip:nth-child(n+7) { display: none; }
.kw__more { margin-top: 10px; font: 600 13px/1 var(--f-mono); color: var(--blue); min-height: 32px; }
.mapbox { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.mapbox iframe { display: block; width: 100%; height: 220px; border: 0; }
.mapbox a { display: flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14.5px; border-top: 1px solid var(--line); }
.mapbox a .i:last-child { width: 15px; height: 15px; margin-left: auto; color: var(--faint); }
.mapbox--wide { margin: 18px 0 8px; }
.mapbox--wide iframe { height: 260px; }
.ptabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(var(--gut) * -1) 12px; padding: 2px var(--gut) 4px; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-weight: 600; font-size: 14.5px; white-space: nowrap; color: var(--ink-2); }
.ptab .i { width: 18px; height: 18px; }
.ptab:hover { border-color: var(--ink); }
.ptab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ptab[aria-selected="true"] .i { color: var(--yellow); }
.ppanel { padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.ppanel__t { margin: 0 0 12px; font: 600 22px/1.15 var(--f-head); color: var(--bp); }
.loading { color: var(--muted); }
.gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 8px; }
.gal a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; border: 1px solid var(--line-2); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gal a:hover img { transform: scale(1.05); }

/* Текст от админ панела */
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--f-head); font-weight: 600; color: var(--bp); margin: 1.4em 0 .5em; line-height: 1.2; }
.prose h2 { font-size: 24px; } .prose h3 { font-size: 20px; } .prose h4 { font-size: 18px; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose ul li::marker { color: var(--yellow-700); }
.prose img { max-width: 100%; height: auto; border-radius: 4px; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose iframe, .prose video { max-width: 100%; }
.prose a { overflow-wrap: anywhere; }
.h2 { margin: 28px 0 14px; font: 600 24px/1.15 var(--f-head); color: var(--bp); }

/* Форми */
.form { display: grid; gap: 14px; }
.form__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .captcha label { font: 600 12px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.field label i, .captcha label i { color: #c0392b; font-style: normal; }
.field input, .field textarea, .captcha input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; font-size: 16px; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .captcha input:focus { outline: 0; border-color: var(--ink); box-shadow: 3px 3px 0 var(--yellow); }
.captcha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha input { width: 90px; }
.form__foot { display: grid; gap: 12px; align-items: center; }
.form__note { margin: 0; color: var(--muted); font-size: 13.5px; }
.field--icon { position: relative; }
.field--icon > .i { position: absolute; left: 13px; bottom: 14px; width: 18px; height: 18px; color: var(--faint); }
.field--icon input { padding-left: 40px; }
.field__eye { position: absolute; right: 4px; bottom: 4px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); border-radius: var(--r); }

/* Статични страници */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px var(--gut) 46px; }
.doc__body { min-width: 0; padding: 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.doc__side { display: grid; gap: 14px; align-content: start; }
.sheetbox { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.sheetbox h2 { margin: 0 0 12px; font: 600 20px/1.2 var(--f-head); color: var(--bp); }
.sheetbox .cinfo { margin-bottom: 14px; font-size: 14.5px; }
.sheetbox--links { padding: 6px; display: grid; }
.sheetbox--links a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 10px; border-radius: 4px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sheetbox--links a:hover { background: var(--line-2); color: var(--ink); }
.sheetbox--links a[aria-current] { background: var(--ink); color: #fff; }
.sheetbox--links .i { width: 16px; height: 16px; color: var(--faint); }
.contacts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.contact:hover { border-color: var(--ink); color: var(--ink); box-shadow: 3px 3px 0 var(--yellow); }
.contact > .i { width: 22px; height: 22px; color: var(--blue); }
.contact small { display: block; font: 600 11px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contact b { font-weight: 600; overflow-wrap: anywhere; }

/* Вход */
.auth { padding: 0 var(--gut) 46px; }
.authcard { max-width: 460px; margin: -8px auto 0; padding: 24px 18px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--hard); }
.authcard h1 { margin: 14px 0 6px; font: 600 30px/1.1 var(--f-head); color: var(--bp); }
.authcard > p { margin: 0 0 18px; color: var(--muted); }
.authnote { display: flex; gap: 10px; margin-top: 18px; padding: 12px; border-radius: var(--r); background: var(--yellow-50); font-size: 14px; line-height: 1.5; }
.authnote > .i { color: var(--yellow-700); }

/* Снимки на цял екран */
.lb { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(8, 14, 24, .94); }
.lb img { max-width: calc(100vw - 24px); max-height: calc(100vh - 120px); object-fit: contain; }
.lb__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.lb__btn:hover { background: var(--yellow); color: var(--ink); }
.lb__close { top: 12px; right: 12px; }
.lb__prev { left: 10px; top: 50%; translate: 0 -50%; }
.lb__next { right: 10px; top: 50%; translate: 0 -50%; }
.lb__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #c9d0da; font: 500 13px var(--f-mono); }

/* ===== Таблет ===== */
@media (min-width: 640px) {
  :root { --gut: 24px; }
  .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__foot { grid-template-columns: minmax(0, 1fr) auto; }
  .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phead { grid-template-columns: auto minmax(0, 1fr); padding: 22px; }
  .phead__act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  .ftr__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .regs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ftr__col--reg { grid-column: 1 / -1; }
  .cookie { left: auto; max-width: 420px; }
  .doc__body { padding: 28px; }
  .ppanel { padding: 24px; }
}

/* ===== Компютър ===== */
@media (min-width: 1024px) {
  :root { --hdr-h: 74px; --bnav-h: 0px; }
  body { padding-bottom: 0; }
  .bnav { display: none; }
  .util { display: block; }
  .hdr__in { gap: 18px; }
  .hdr .finder--hdr { display: flex; max-width: 420px; min-height: 48px; padding: 3px 3px 3px 12px; border-width: 1.5px; }
  .finder--hdr .btn { min-height: 38px; padding: 6px 14px; }
  .nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
  .nav a, .nav button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
  .nav .i { width: 18px; height: 18px; color: var(--blue); }
  .nav a:hover, .nav button:hover { background: var(--line-2); color: var(--ink); }
  .nav [aria-current] { box-shadow: inset 0 -3px 0 var(--yellow); }
  .hdr__login { display: inline-flex; }
  .hdr__menu { display: none; }
  .cookie { bottom: 16px; }
  .sheet--drop .sheet__panel { top: calc(var(--hdr-vis) + 36px); bottom: auto; left: 50%; right: auto; width: min(760px, calc(100vw - 48px)); translate: -50% 0; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 20px 24px 24px; animation: drop .22s cubic-bezier(.2, .8, .2, 1); }
  .sheet--wide .sheet__panel { width: min(1040px, calc(100vw - 48px)); }
  .sheet--wide .clist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet.sheet--drop.is-closing .sheet__panel { animation: drop .15s reverse forwards; }
  @keyframes drop { from { opacity: 0; transform: translateY(-10px); } }

  .hero { padding: 56px 0 30px; }
  .hero__in { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; }
  .hero__draw { display: block; }
  .dims { margin-top: 34px; max-width: 760px; }
  .dims li { padding-top: 18px; }
  .dims li::before { content: ""; position: absolute; left: 0; top: -5px; width: 1px; height: 10px; background: rgba(255, 255, 255, .5); }
  .dims li + li { padding-left: 20px; }
  .tick__item { height: 110px; }
  .sec { padding: 64px 0; }
  .plates { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .plate { padding: 18px 18px 14px; }
  .recs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .duo { grid-template-columns: minmax(0, 1fr) 360px; gap: 44px; align-items: start; }
  .ads--home .ads__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 38px 40px 34px; gap: 30px; }
  .ftr__top { grid-template-columns: 1.1fr .9fr .8fr 1.6fr; }
  .ftr__col--reg { grid-column: auto; }
  .regs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ftr__links { grid-template-columns: minmax(0, 1fr); }

  .band { padding: 18px 0 34px; }
  .band--firm { padding-bottom: 84px; }
  .subgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .subs .subgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout { grid-template-columns: 270px minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .layout--3 { grid-template-columns: 250px minmax(0, 1fr) 200px; }
  .side { display: block; }
  .ads:not(.ads--home) .ads__list { grid-template-columns: minmax(0, 1fr); position: sticky; top: calc(var(--hdr-vis) + 14px); }
  .fcard { grid-template-columns: 92px minmax(0, 1fr); padding: 16px 18px; gap: 18px; }
  .fcard__logo { width: 92px; height: 76px; }
  .fcard__meta { grid-template-columns: repeat(2, minmax(0, auto)); justify-content: start; gap: 4px 22px; }

  .prof { grid-template-columns: minmax(0, 1fr) 340px; gap: 22px 26px; margin-top: -64px; }
  .phead { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 26px 28px; gap: 22px; }
  .phead__logo { width: 168px; height: 118px; }
  .phead__act { grid-column: auto; display: grid; grid-template-columns: minmax(0, 1fr); width: 200px; }
  .prof__side { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--hdr-vis) + 14px); }
  .prof__main { grid-column: 1; grid-row: 2; min-width: 0; }
  .ptabs { margin: 0 0 12px; padding: 0; flex-wrap: wrap; overflow: visible; }
  .doc { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; padding-top: 30px; }
  .doc__side { position: sticky; top: calc(var(--hdr-vis) + 14px); }
  .doc__body { padding: 34px 38px; }
}

@media (min-width: 1280px) {
  .layout--3 { grid-template-columns: 270px minmax(0, 1fr) 220px; }
  .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .wm__txt b { font-size: 17px; }
  .phead__act .btn { font-size: 14px; }
  .rec { grid-template-columns: 84px minmax(0, 1fr); }
  .rec__ext { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
  .draw__lines path { stroke-dashoffset: 0; }
}

/* Цифри в кръгчета и етикети: еднакви цифри */
.dims b, .plate__n, .pg, .pager a, .news a::before { font-variant-numeric: lining-nums tabular-nums; }

/* ===== Вграждане в системата (views_nov) ===== */

/* Страниците от system/class.pagination.php: „N резултата в M страници“ + ?page=N; „Първа“ и „Последна“ са картинки в стария дизайн, тук са числа */
.pager--sys { display: block; margin-top: 18px; }
.pager--sys .paginations_wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pager--sys .paginations_wrap > div:first-child { font: 500 12.5px/1.3 var(--f-mono); color: var(--muted); }
.pager--sys .paginations_wrap > div:last-child { display: flex; flex-wrap: wrap; gap: 4px; }
.pager--sys .pagination_page_number, .pager--sys .pagination_active_item { min-width: 42px; height: 42px; padding: 0 8px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; font: 600 14.5px/1 var(--f-mono); }
.pager--sys a.pagination_page_number:hover { border-color: var(--ink); }
.pager--sys .pagination_active_item { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.pager--sys .first_page::before { content: "1"; }
.pager--sys .last_page::before { content: "»"; }
.pager--sys .last_page.has-n::before { content: none; }
@media (max-width: 479px) { .pager--sys .pagination_page_number, .pager--sys .pagination_active_item { min-width: 36px; height: 40px; padding: 0 4px; } }

/* Съобщенията на системата (class.messages.php: <div class="messages success|error">) */
.msgs { margin: 0 0 16px; }
.messages { position: relative; margin: 0 0 10px; padding: 12px 44px 12px 14px; border-radius: var(--r); border: 1px solid; border-left-width: 5px; font-size: 15px; line-height: 1.5; }
.messages p { margin: 0; }
.messages.success { background: #e9f8ef; border-color: #2e9e5b; color: #135a30; }
.messages.error { background: #fdecec; border-color: #c0392b; color: #8a1f1f; }
.messages.info, .messages.help { background: var(--blue-50); border-color: var(--blue); color: var(--ink); }
.messages.warning { background: var(--yellow-50); border-color: var(--yellow-700); color: #6b4b00; }
.closeMessage { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 4px; }
.closeMessage::before, .closeMessage::after { content: ""; position: absolute; left: 7px; right: 7px; top: 13px; height: 2px; background: currentColor; transform: rotate(45deg); }
.closeMessage::after { transform: rotate(-45deg); }

/* Снимка до текста „За фирмата“ (big_ → orig_ при натискане) */
.prose__pic { float: right; display: block; width: 40%; max-width: 220px; margin: .2em 0 12px 18px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line-2); }
.prose__pic img { width: 100%; margin: 0; border-radius: 0; }
@media (max-width: 479px) { .prose__pic { float: none; width: 100%; max-width: none; margin: 0 0 14px; } }
.muted { color: var(--muted); }

/* Продукти и партньори в табовете на профила */
.prods { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.prod { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.prod__img { display: block; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: var(--paper); }
.prod__img img { width: 100%; height: 100%; object-fit: cover; }
.prod h3 { margin: 2px 0 6px; font: 600 17px/1.25 var(--f-head); color: var(--ink); }
.prod__text { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.prod:not(:has(.prod__img)) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fpartners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.fpartner { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.fpartner__img { height: 90px; display: grid; place-items: center; }
.fpartner__img img { max-height: 90px; width: auto; object-fit: contain; }
.fpartner__name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
a.fpartner__name:hover { color: var(--blue); }
.fpartner__name .i { width: 15px; height: 15px; color: var(--faint); }

/* Рекламата отстрани на статичните страници */
.ads--side .ads__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .ads--side .ads__list { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Брандиране на отрасъл/категория (brands): фон зад страницата на широки екрани, кликва се встрани от съдържанието */
.skin { display: none; }
@media (min-width: 1280px) {
  .skin { display: block; position: absolute; left: 0; right: 0; top: calc(36px + var(--hdr-h)); height: 1400px; z-index: 0; background: center top no-repeat; }
  main.has-skin { position: relative; z-index: 1; pointer-events: none; }
  main.has-skin > *, main.has-skin .band { background: none; }
  main.has-skin .wrap { pointer-events: auto; }
  main.has-skin .band > .wrap { background-color: var(--bp); background-image: linear-gradient(rgba(255, 255, 255, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .075) 1px, transparent 1px); background-size: 96px 96px; padding-top: 14px; padding-bottom: 26px; }
  main.has-skin > .wrap { background: var(--paper); }
}

/* Справката за заявките (само за IP адресите от config.php) */
.time_query_load { overflow-x: auto; }

/* ===== По-голямо лого, ефекти и визуални елементи ===== */

/* Логото в горната лента: по-голямо; ивиците на сградите „израстват“ при отваряне */
.hdr .mark { width: 50px; height: 34px; }
.hdr .wm__txt b { font-size: 22px; }
.hdr .wm__txt small { font-size: 12px; }
.mark rect { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.mark rect:nth-of-type(2) { animation-delay: .08s; } .mark rect:nth-of-type(3) { animation-delay: .16s; }
.mark rect:nth-of-type(4) { animation-delay: .24s; } .mark rect:nth-of-type(5) { animation-delay: .32s; }
@keyframes rise { from { transform: scaleY(0); } }
.ftr .mark { width: 58px; height: 40px; }
.ftr .wm__txt b { font-size: 25px; }
@media (min-width: 1024px) {
  :root { --hdr-h: 84px; }
  .hdr .mark { width: 66px; height: 45px; }
  .hdr .wm__txt b { font-size: 29px; }
  .hdr .wm__txt small { font-size: 13px; letter-spacing: .03em; }
}

/* Жълта лента най-горе: колко от страницата е прочетено (запълва предупредителната лента) */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 46; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Чертожната милиметровка се движи бавно; линийка с деления долу */
.hero.bp { animation: grid-pan 90s linear infinite; }
@keyframes grid-pan { to { background-position: 95px 95px, 95px 95px, 95px 95px, 95px 95px; } }
.bp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 60px) left bottom / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .28) 0 1px, transparent 1px 12px) left bottom / 100% 5px no-repeat; }

/* Кранът на чертежа: куката се люлее, светлината на върха мига */
.draw__hook { transform-box: view-box; transform-origin: 250px 46px; animation: swing 3.6s 2.8s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.draw__light { fill: #ff5a3c; animation: blink 1.8s 3s steps(1) infinite; opacity: 0; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: .15; } }

/* Антетката на чертежа (под рисунката, на компютър) */
.stamp { display: none; }
@media (min-width: 1024px) {
  .stamp { display: grid; grid-template-columns: 1.6fr .7fr .5fr .6fr; margin: 6px 0 0 auto; max-width: 440px; border: 1px solid rgba(255, 255, 255, .35); font: 500 11px/1.3 var(--f-mono); color: #c8d5e7; }
  .stamp div { padding: 6px 8px; border-left: 1px solid rgba(255, 255, 255, .25); }
  .stamp div:first-child { border-left: 0; }
  .stamp dt { color: #7f9cc4; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
  .stamp dd { margin: 2px 0 0; color: #fff; }
}

/* Заглавията на разделите: размерна линия, която се „изчертава“ при скрол */
.sec__title { position: relative; padding-bottom: 14px; }
.sec__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(150px, 60%); height: 9px; transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s .25s cubic-bezier(.2, .8, .2, 1);
  background: linear-gradient(var(--yellow-700), var(--yellow-700)) center / 100% 2px no-repeat, linear-gradient(var(--yellow-700), var(--yellow-700)) left / 2px 100% no-repeat, linear-gradient(var(--yellow-700), var(--yellow-700)) right / 2px 100% no-repeat; }
.in .sec__title::after, .sec__head.in .sec__title::after { transform: scaleX(1); }

/* Картите се появяват една след друга */
.rv-i { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; transition-delay: calc(var(--i, 0) * 45ms); }
.rv-i.in { opacity: 1; transform: none; }

/* Отраслите: иконата светва в жълто при посочване */
.plate .cico { transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.plate:hover .cico { background: var(--yellow); border-color: var(--ink); color: var(--ink); transform: rotate(-6deg); }
.plate:hover .plate__no { color: var(--ink); }
.rec:hover .rec__ext, .ad:hover b { color: var(--blue); }

/* Предупредителната лента на поканата и на профила се движи бавно */
.cta::before, .phead::before { animation: hazard 2.4s linear infinite; }
@keyframes hazard { to { background-position: 25.456px 0; } }

/* Силует на град над долната част */
.ftr { position: relative; margin-top: 64px; }
.ftr::before { content: ""; position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 64px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='64' viewBox='0 0 480 64'%3E%3Cg fill='%23141a22'%3E%3Crect x='0' y='34' width='34' height='30'/%3E%3Crect x='38' y='20' width='26' height='44'/%3E%3Crect x='68' y='40' width='40' height='24'/%3E%3Crect x='112' y='10' width='30' height='54'/%3E%3Crect x='146' y='28' width='22' height='36'/%3E%3Crect x='172' y='44' width='44' height='20'/%3E%3Crect x='220' y='24' width='34' height='40'/%3E%3Crect x='258' y='38' width='28' height='26'/%3E%3Crect x='290' y='6' width='24' height='58'/%3E%3Crect x='318' y='32' width='38' height='32'/%3E%3Crect x='360' y='42' width='30' height='22'/%3E%3Crect x='394' y='18' width='32' height='46'/%3E%3Crect x='430' y='34' width='50' height='30'/%3E%3Cpath d='M301 6V0h1v6zM272 1h56v1h-56zM276 1v8h1V1z'/%3E%3C/g%3E%3Cg fill='%23ffc61a'%3E%3Crect x='118' y='18' width='4' height='4'/%3E%3Crect x='130' y='30' width='4' height='4'/%3E%3Crect x='226' y='32' width='4' height='4'/%3E%3Crect x='296' y='14' width='4' height='4'/%3E%3Crect x='304' y='34' width='4' height='4'/%3E%3Crect x='400' y='26' width='4' height='4'/%3E%3Crect x='44' y='28' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E") left bottom / auto 64px repeat-x; }

@media (prefers-reduced-motion: reduce) {
  .rv-i { opacity: 1; transform: none; }
  .sec__title::after { transform: none; }
  .draw__light { opacity: 1; }
}

/* Горната лента: логото не се свива; на по-тесни компютърни екрани търсачката е бутон с лупа */
.hdr .wm { flex: none; }
.hdr .finder--hdr { flex: 1 1 auto; min-width: 0; }
.hdr__search { display: none; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .hdr .finder--hdr { display: none; }
  .hdr__search { display: grid; }
}
