
/* ============================================
   Engineering Helper Platform — industrial CSS
   Cross-browser tested: Chrome, Firefox, Safari, Edge
   ============================================ */

/* Reset + defaults */
*, *::before, *::after { box-sizing: border-box; }

/* Skip link — accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: top .15s;
}
.skip-link:focus {
  top: 8px;
  color: #fff;
  text-decoration: none;
}
address { font-style: normal; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: #1e40af; text-decoration: none; transition: color .12s ease; }
a:hover { color: #1d4ed8; text-decoration: underline; }
a:focus-visible { outline: 2px solid #1e40af; outline-offset: 2px; border-radius: 2px; }

/* Color tokens */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #475569;
  --muted-2: #64748b;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;
  --accent: #1e40af;
  --accent-soft: #dbeafe;
  --signal: #b91c1c;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 3px solid #1e40af;
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 28px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 24px;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}
.site-brand {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}
.site-brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 7px 10px;
  border: 1.5px solid #60a5fa;
  color: #93c5fd;
  line-height: 1;
  background: rgba(30, 64, 175, .15);
}
.brand-text { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; gap: 1px; }
.brand-title { font-size: 16px; font-weight: 600; color: #fff; line-height: 1.2; letter-spacing: .01em; }
.brand-tag { font-size: 11px; color: #94a3b8; letter-spacing: .05em; text-transform: uppercase; font-weight: 500; }

.lang-switcher {
  display: -webkit-box; display: -ms-flexbox; display: inline-flex;
  gap: 0;
  border: 1px solid rgba(148,163,184,.3);
  background: rgba(255,255,255,.04);
  padding: 2px;
}
.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 6px 10px;
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
  display: inline-block;
}
.lang-btn:hover { color: #fff; background: rgba(30,64,175,.2); text-decoration: none; }
.lang-btn[aria-pressed="true"] { background: #1e40af; color: #fff; }
.translation-notice {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  margin: 0 0 18px 0;
  font-size: 13px;
  color: #78350f;
}

/* Header inline search */
.header-search {
  flex: 1 1 320px;
  max-width: 420px;
  margin: 0 16px;
  position: relative;
}
.header-search #pagefind-ui {
  --pagefind-ui-scale: .9;
  min-height: 38px;
  position: relative;
}
.pagefind-ui { font-family: "IBM Plex Sans", system-ui, sans-serif !important; }
.pagefind-ui__form { position: relative; margin: 0 !important; }
.pagefind-ui__search-input,
.pf-placeholder {
  width: 100% !important;
  /* 16px prevents iOS Safari auto-zoom-on-focus (mobile jump fix) */
  font-size: 16px !important;
  padding: 9px 36px 9px 14px !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(148,163,184,.3) !important;
  color: #f1f5f9 !important;
  height: 38px !important;
  outline: none !important;
  transition: border-color .12s, background .12s;
  box-sizing: border-box;
  font-family: inherit;
  margin: 0 !important;
  display: block;
}
@media (min-width: 961px) {
  /* Desktop can use smaller font (no auto-zoom risk) */
  .pagefind-ui__search-input,
  .pf-placeholder { font-size: 14px !important; }
}
.pf-placeholder::placeholder { color: #94a3b8; }
.pf-placeholder:focus {
  border-color: #60a5fa !important;
  background: rgba(255,255,255,.12) !important;
}
/* Once pagefind takes over, hide the placeholder */
.pagefind-ui .pf-placeholder { display: none; }
.pagefind-ui__search-input::placeholder { color: #94a3b8 !important; }
.pagefind-ui__search-input:focus {
  border-color: #60a5fa !important;
  background: rgba(255,255,255,.12) !important;
}
.pagefind-ui__search-clear {
  position: absolute !important;
  right: 6px; top: 50% !important;
  transform: translateY(-50%);
  background: transparent !important;
  color: #cbd5e1 !important;
  border: 0 !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  cursor: pointer;
}
.pagefind-ui__search-clear:hover { color: #fff !important; }
/* Results drawer — floating under the input */
.pagefind-ui__drawer {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px rgba(15,23,42,.25);
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px 14px;
  z-index: 500;
}
.pagefind-ui__drawer:empty,
.pagefind-ui__drawer.pagefind-ui__hidden { display: none; }
.pagefind-ui__message {
  color: var(--muted);
  font-size: 13px;
  padding: 4px 0 8px;
}
.pagefind-ui__results { list-style: none; padding: 0; margin: 0; }
.pagefind-ui__result { padding: 10px 0; border-top: 1px solid var(--border); }
.pagefind-ui__result:first-child { border-top: 0; }
.pagefind-ui__result-link {
  color: var(--accent) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  text-decoration: none !important;
}
.pagefind-ui__result-link:hover { text-decoration: underline !important; }
.pagefind-ui__result-excerpt {
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  margin-top: 4px;
}
.pagefind-ui__result-excerpt mark {
  background: #fef3c7 !important;
  color: var(--ink) !important;
  padding: 0 2px;
}
.pagefind-ui__button {
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  cursor: pointer;
  margin-top: 10px;
}
@media (max-width: 900px) {
  .header-search { flex-basis: 100%; margin: 10px 0 0; max-width: none; order: 99; }
}

.contacts {
  margin-left: auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  font-size: 13px;
}
.contacts .phone, .contacts .msg {
  display: -webkit-box; display: -ms-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 7px;
  padding: 6px 10px;
  color: #e2e8f0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(148,163,184,.25);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  transition: all .12s ease;
}
.contacts .phone { font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em; }
.contacts .phone:hover, .contacts .msg:hover { border-color: #60a5fa; color: #fff; background: rgba(30,64,175,.25); text-decoration: none; }
.contacts .ico {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #60a5fa;
  letter-spacing: .05em;
  padding: 2px 4px;
  background: rgba(30,64,175,.25);
  line-height: 1;
}

/* ============================================
   LAYOUT
   ============================================ */
.layout {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 28px;
  -webkit-box-align: start; -ms-flex-align: start; align-items: start;
}

/* ============================================
   SIDEBAR NAV
   ============================================ */
.sidebar {
  position: -webkit-sticky; position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  font-size: 15px;
  padding-right: 4px;
  border-right: 1px solid var(--border);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.sidebar a {
  display: block;
  padding: 7px 12px;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: all .1s ease;
}
.sidebar a:hover { background: var(--bg-3); color: var(--ink); text-decoration: none; }
.sidebar a.active,
.sidebar a.nav-top.active,
.sidebar a.nav-sub.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
.nav-top { font-weight: 600; color: var(--ink); margin-top: 2px; }
.nav-section { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.nav-section:last-child { border-bottom: none; }

/* Service top-level links (Home, Catalogs, Contacts) — distinct icon-prefixed style */
.sidebar a.nav-service {
  position: relative;
  padding-left: 36px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sidebar a.nav-service::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .65;
  transition: opacity .12s;
}
.sidebar a.nav-service:hover::before { opacity: 1; }
.sidebar a.nav-service.active::before { opacity: 1; }
/* Per-service icons via inline SVG data-URIs (no extra HTTP requests) */
.sidebar a.nav-service[href="/"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/><polyline points='9 22 9 12 15 12 15 22'/></svg>");
}
.sidebar a.nav-service[href="/katalog"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/><path d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/></svg>");
}
.sidebar a.nav-service[href="/kontakty"]::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>");
}
.sidebar a.nav-service.active::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'/></svg>") !important;
}
/* Active service overrides only color, not icon — re-add specific icon */
.sidebar a.nav-service[href="/"].active::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/><polyline points='9 22 9 12 15 12 15 22'/></svg>");
}
.sidebar a.nav-service[href="/katalog"].active::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/><path d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/></svg>");
}
.sidebar a.nav-service[href="/kontakty"].active::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>");
}
.nav-group { margin: 4px 0 4px 6px; }
.nav-group summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted-2);
  font-family: var(--mono);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::marker { display: none; content: ""; }
.nav-group summary::before {
  content: "+";
  color: var(--faint);
  font-family: var(--mono);
  font-weight: 700;
  width: 10px;
  text-align: center;
}
.nav-group[open] summary::before { content: "−"; color: var(--accent); }
.nav-group summary a { display: inline; padding: 0; border: none; color: inherit; }
.nav-group summary a:hover { background: transparent; }
.nav-group ul {
  list-style: none;
  margin: 2px 0 4px 14px;
  padding: 0;
  border-left: 1px solid var(--border);
}
.nav-group li { margin: 0; }
.nav-group li a { padding-left: 14px; font-size: 14px; }

/* ============================================
   CONTENT
   ============================================ */
.content { min-width: 0; }
.content::after { content: ""; display: block; clear: both; }
/* Cap text-readable elements (paragraphs, lists, headings) for line length;
   tables and embeds use full content width. */
.content > p, .content > h1, .content > h2, .content > h3, .content > h4,
.content > ul, .content > ol, .content > blockquote { max-width: 920px; }
.content > .breadcrumbs { max-width: none; }

.breadcrumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); text-decoration: none; }
.breadcrumbs .bc-sep { margin: 0 8px; color: var(--faint); }
.breadcrumbs .bc-current { color: var(--ink); font-weight: 600; }

/* Only direct children of .content — never reach inside embeds (.ehp-embed) */
.content > h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 22px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.content > h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 14px;
  padding: 0 0 8px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  line-height: 1.3;
}
.content > h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 10px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-family: var(--mono);
}
.content > p { margin: 12px 0; color: var(--ink-2); }
.content > ul, .content > ol { padding-left: 22px; }
.content > ul > li, .content > ol > li { margin: 4px 0; }
.content > img { margin: 14px 0; border: 1px solid var(--border); }
.content > blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding: 10px 16px;
  color: var(--muted);
  background: var(--bg-2);
  font-style: normal;
}
.content > p strong, .content > h1 strong, .content > h2 strong, .content > h3 strong { color: var(--ink); font-weight: 600; }

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13.5px;
  border: 1px solid var(--border-strong);
  background: #fff;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--mono);
}
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
}
.data-table th:last-child, .data-table td:last-child { border-right: none; }
.data-table tr:last-child td { border-bottom: none; }
.data-table thead th {
  background: #0f172a;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 2px solid var(--accent);
  border-right-color: #1e293b;
}
.data-table tbody tr:nth-child(even) { background: var(--bg-2); }
.data-table tbody tr:hover { background: var(--accent-soft); }
.data-table td:first-child { font-weight: 600; color: var(--ink); }
/* Monospace for numeric columns */
.data-table td { font-variant-numeric: tabular-nums; }
.data-table td:not(:first-child) { font-family: var(--mono); font-size: 13px; }

/* ============================================
   EMBEDS (calculators) — inline, scoped per-embed
   ============================================ */
.ehp-embed { margin: 20px 0; }
.embed-inline-block { width: 100%; }
.embed-inline-float {
  float: right;
  clear: right;
  width: 50%;
  min-width: 380px;
  margin: 4px 0 20px 28px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  margin-top: 60px;
  padding: 24px 28px;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted-2);
  font-family: var(--mono);
  letter-spacing: .02em;
}
.footer-right a { color: var(--muted); margin: 0 4px; }
.footer-right a:hover { color: var(--accent); }

/* ============================================
   EMBED CARD FIXES (override scoped source CSS)
   ============================================ */
/* Home hero banner: rounded top corners (round both parent .hero and image
   — parent has dark background that would otherwise show as rectangle behind) */
[class*="ehp-embed-"] .hero {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  overflow: hidden;
}
[class*="ehp-embed-"] .hero-banner-img {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Home cat-cards: fix image overflow + responsive sizing */
[class*="ehp-embed-"] .cat-img-wrap {
  width: 100% !important;
  max-width: 115px;
  height: auto !important;
  aspect-ratio: 115 / 104;
}
[class*="ehp-embed-"] .cat-img-wrap img,
[class*="ehp-embed-"] .cat-card img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  /* Knock out white/light product photo backgrounds so images blend with card */
  mix-blend-mode: multiply;
  filter: contrast(1.03);
}
[class*="ehp-embed-"] .cat-card {
  padding: 10px 8px;
  overflow: hidden;
  min-width: 0;
}
@media (max-width: 780px) {
  [class*="ehp-embed-"] .cat-card {
    -webkit-box-flex: 0; -ms-flex: 0 0 calc(50% - 12px); flex: 0 0 calc(50% - 12px) !important;
  }
  [class*="ehp-embed-"] .cat-img-wrap { max-width: 140px; }
  [class*="ehp-embed-"] .cat-name { font-size: 12px; }
}
@media (max-width: 420px) {
  [class*="ehp-embed-"] .cat-grid { margin: 0 -4px 10px; }
  [class*="ehp-embed-"] .cat-card {
    margin: 0 4px 10px;
    -webkit-box-flex: 0; -ms-flex: 0 0 calc(50% - 8px); flex: 0 0 calc(50% - 8px) !important;
  }
}

/* ============================================
   MOBILE NAV TOGGLE + DRAWER + BOTTOM CTA
   ============================================ */
.nav-toggle {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgba(148,163,184,.35);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #e2e8f0;
  transition: transform .18s ease, opacity .18s ease;
}
body.sidebar-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sidebar-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.sidebar-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 40;
  opacity: 0;
  transition: opacity .2s ease;
}
body.sidebar-open .sidebar-backdrop { opacity: 1; }

.mobile-cta { display: none; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  .layout { grid-template-columns: 1fr; gap: 20px; padding: 20px; padding-bottom: 80px; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 84%;
    max-width: 320px;
    max-height: none;
    background: var(--bg);
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 16px 4px 16px 12px;
    overflow-y: auto;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .22s ease;
    -webkit-overflow-scrolling: touch;
    box-shadow: 2px 0 16px rgba(0,0,0,.15);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }

  /* Bigger tap-targets on mobile */
  .sidebar a { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }

  .contacts { margin-left: 0; width: 100%; }
  .header-inner { padding: 10px 14px; gap: 12px; }
  .contacts .phone, .contacts .msg { padding: 10px 12px; min-height: 40px; }

  /* Sticky mobile CTA bar */
  .mobile-cta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    background: #0f172a;
    border-top: 1px solid rgba(148,163,184,.25);
    box-shadow: 0 -4px 16px rgba(0,0,0,.18);
    padding: 0;
  }
  .mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .01em;
    text-decoration: none;
    border-right: 1px solid rgba(148,163,184,.18);
  }
  .mobile-cta-btn:last-child { border-right: none; }
  .mobile-cta-btn:hover, .mobile-cta-btn:active { text-decoration: none; color: #fff; }
  .mobile-cta-call { background: #1e40af; }
  .mobile-cta-call:hover, .mobile-cta-call:active { background: #1d4ed8; }
  .mobile-cta-viber { background: #7360f2; }
  .mobile-cta-viber:hover, .mobile-cta-viber:active { background: #8a7cf4; }
  .mobile-cta-tg { background: #229ED9; }
  .mobile-cta-tg:hover, .mobile-cta-tg:active { background: #1fb2ee; }
  .mobile-cta-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,.18);
    border-radius: 2px;
  }
  .mobile-cta-call .mobile-cta-ico { font-size: 14px; }

  /* Lift SalesDrive chat widget above sticky CTA bar */
  [id^="salesDriveChat"],
  [class*="salesDriveChat"],
  iframe[src*="salesdrive"] {
    bottom: 72px !important;
  }
}
@media (max-width: 780px) {
  .embed-float { float: none; width: 100%; min-width: 0; margin: 20px 0; }
  .content h1 { font-size: 24px; }
  .content h2 { font-size: 18px; }
  .data-table { font-size: 12.5px; }
  .data-table th, .data-table td { padding: 7px 9px; }
  .footer-inner { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; }
  .brand-tag { display: none; }
  .brand-title { font-size: 14px; }
  .mobile-cta-lbl { font-size: 13px; }
}
@media (max-width: 420px) {
  .mobile-cta { grid-template-columns: 1.6fr 1fr 1fr; }
  .mobile-cta-viber .mobile-cta-lbl,
  .mobile-cta-tg .mobile-cta-lbl { display: none; }
  .mobile-cta-viber .mobile-cta-ico,
  .mobile-cta-tg .mobile-cta-ico { width: 28px; height: 28px; font-size: 14px; }
}

/* Print */
@media print {
  .site-header, .sidebar, .site-footer, .mobile-cta, .sidebar-backdrop, .nav-toggle { display: none; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .embed-wrap { border: 1px solid #999; page-break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}
