/* ── Shared styles for Buildly SEO content pages ──
   Used by /kss, /akt-12, /akt-19, /vnos-kitay
   Aligned with the design tokens in index.html (colors, type, spacing).
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:#1a3a6b;
  --blue-2:#1e4d8c;
  --blue-3:#2563b8;
  --blue-4:#3b82f6;
  --light:#f6f9ff;
  --light-2:#e8f0fc;
  --light-3:#f0f5ff;
  --ink:#0f1d35;
  --ink-2:#2e3f5c;
  --muted:#5a6e8a;
  --soft:#8a9bb5;
  --border:#dde6f4;
  --white:#fff;
  --orange:#e05a14;
  --orange-2:#f07230;
  --radius:8px;
}

html { scroll-behavior: smooth; }
body { font-family: "Plus Jakarta Sans", sans-serif; background: var(--white); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: var(--blue-3); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button { font: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.reading { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  color: var(--blue-3); background: var(--light-2);
  border: 1px solid rgba(37,99,184,.25);
}

/* ── Nav (mirrors index.html) ── */
nav.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: 0 1px 20px rgba(26,58,107,.06); }
.nav-inner { max-width: 1200px; height: 68px; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; }
.logo { font-family: "Syne", sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -.03em; margin-right: 48px; flex-shrink: 0; color: var(--ink); }
.logo .build { color: var(--blue); }
.logo .ly { color: var(--blue-3); }
.logo .dot { display: inline-flex; width: 8px; height: 8px; background: var(--orange); border-radius: 2px; margin-left: 3px; margin-bottom: 2px; }
.logo-dark .build { color: #fff; }
.logo-dark .ly { color: var(--blue-4); }
.nav-links { display: flex; align-items: center; gap: 32px; flex: 1; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: color .15s, background .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--light-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-ghost { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--blue); font-size: 13px; font-weight: 600; padding: 9px 22px; border-radius: var(--radius); border: 1.5px solid var(--border); transition: .2s; }
.nav-ghost:hover { background: var(--light-2); border-color: var(--blue-3); text-decoration: none; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--white); font-size: 13px; font-weight: 700; padding: 9px 22px; border-radius: var(--radius); transition: .2s; text-decoration: none; }
.nav-cta:hover { background: var(--blue-2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(26,58,107,.2); text-decoration: none; }

/* Nav dropdown */
.nav-dropdown { position: relative; align-self: stretch; display: flex; align-items: center; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-caret { font-size: 9px; opacity: .55; transition: transform .15s; }
.nav-dropdown:hover .nav-dropdown-caret { transform: rotate(180deg); opacity: .9; }
.nav-dropdown-menu { position: absolute; top: 100%; left: -10px; margin-top: 6px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(26,58,107,.12); padding: 8px; min-width: 240px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 200; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a { display: block; padding: 10px 14px; border-radius: 6px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.nav-dropdown-menu a:hover { background: var(--light-2); color: var(--blue); text-decoration: none; }
.nav-dropdown-menu a .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
/* Mega-menu · grouped 3-column dropdown with section separators (replaces the tall single column) */
.nav-dropdown-menu.nav-mega { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; min-width: 0; width: 620px; max-width: calc(100vw - 24px); padding: 14px 6px; }
.nav-mega-col { display: flex; flex-direction: column; min-width: 0; padding: 0 8px; }
.nav-mega-col + .nav-mega-col { border-left: 1px solid var(--border); }
.nav-mega-head { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); padding: 4px 12px 8px; }
.nav-mega a[role="menuitem"] { padding: 8px 12px; white-space: normal; }

/* ── Article page layout ── */
.article-hero { padding: 124px 0 56px; background: linear-gradient(180deg, var(--light-3) 0%, var(--white) 100%); border-bottom: 1px solid var(--border); }
.breadcrumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-3); }
.breadcrumbs .sep { color: var(--soft); }
.article-hero h1 { font-family: "Syne", sans-serif; font-weight: 800; font-size: 44px; line-height: 1.12; letter-spacing: -.02em; color: var(--ink); margin-bottom: 18px; }
.article-hero .lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 680px; }

.tldr { max-width: 760px; margin: 32px auto 0; padding: 22px 26px; background: var(--light-2); border-left: 4px solid var(--blue-3); border-radius: 8px; }
.tldr-label { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-3); margin-bottom: 10px; }
.tldr p { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin: 0; }

.article-body { padding: 64px 0; }
.article-body h2 { font-family: "Syne", sans-serif; font-weight: 800; font-size: 30px; line-height: 1.18; letter-spacing: -.02em; color: var(--ink); margin: 56px 0 18px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-family: "Syne", sans-serif; font-weight: 700; font-size: 21px; color: var(--blue); margin: 32px 0 12px; }
.article-body p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin-bottom: 18px; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 22px; }
.article-body li { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin-bottom: 8px; }
.article-body strong { color: var(--ink); font-weight: 600; }

.steps-list { list-style: none; padding: 0; counter-reset: step; }
.steps-list li { position: relative; padding: 24px 24px 24px 76px; margin-bottom: 14px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; counter-increment: step; }
.steps-list li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 22px; top: 22px; font-family: "IBM Plex Mono", monospace; font-size: 14px; font-weight: 500; color: var(--blue-3); background: var(--light-2); border-radius: 6px; padding: 4px 10px; }
.steps-list li h3 { margin-top: 0 !important; margin-bottom: 6px !important; }
.steps-list li p { margin-bottom: 0; }

.faq-block { margin-top: 56px; }
.faq-item { border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-item summary { padding: 17px 20px; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: .2s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--blue-3); transition: transform .2s; }
.faq-item[open] summary { background: var(--blue); color: var(--white); }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--white); }
.faq-item .faq-body { padding: 18px 20px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

.cta-strip { padding: 48px 0; background: var(--blue); color: var(--white); text-align: center; }
.cta-strip h2, .cta-strip .cta-strip-heading { font-family: "Syne", sans-serif; font-weight: 800; font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; color: var(--white); }
.cta-strip p { color: var(--white); font-size: 17px; opacity: .9; margin-bottom: 28px; }
.cta-strip .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--white); color: var(--blue); font-size: 14px; font-weight: 700; padding: 14px 28px; border-radius: var(--radius); transition: .2s; text-decoration: none; }
.cta-strip .btn:hover { background: var(--light-2); transform: translateY(-1px); text-decoration: none; }

/* Hero + inline CTAs for SEO landings on a light background.
   Used by obshtestveni-porachki-stroitelstvo.html; reusable on sibling pages. */
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-ctas .btn-primary, .cta-inline .btn-primary { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--white); font-size: 15px; font-weight: 700; padding: 14px 26px; border-radius: var(--radius); transition: .2s; text-decoration: none; }
.hero-ctas .btn-primary:hover, .cta-inline .btn-primary:hover { background: var(--blue-2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(26,58,107,.2); text-decoration: none; }
.hero-ctas .btn-ghost { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--blue); font-size: 15px; font-weight: 600; padding: 14px 22px; border-radius: var(--radius); border: 1.5px solid var(--border); transition: .2s; text-decoration: none; }
.hero-ctas .btn-ghost:hover { background: var(--light-2); border-color: var(--blue-3); text-decoration: none; }
.cta-inline { text-align: center; margin: 32px 0 8px; }

/* ── Footer (mirrors index.html) ── */
footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-about { font-size: 14px; line-height: 1.6; margin: 16px 0 18px; max-width: 320px; color: rgba(255,255,255,.6); }
.footer-contact { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.55); }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); color: rgba(255,255,255,.55); transition: background .2s, color .2s, border-color .2s, transform .2s; }
.footer-social a:hover { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); transform: translateY(-1px); }
.footer-title { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.45); }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.45); text-decoration: none; }
.footer-legal a:hover { color: var(--white); }

/* ── Documentation page extras ── */
.docs-toc { background: var(--light-2); border: 1px solid var(--border); border-radius: 12px; padding: 24px 28px; margin: 32px auto 0; max-width: 760px; }
.docs-toc-title { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-3); margin-bottom: 14px; }
.docs-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.docs-toc li { counter-increment: toc; margin-bottom: 8px; }
.docs-toc li::before { content: counter(toc) "."; display: inline-block; width: 24px; font-family: "IBM Plex Mono", monospace; color: var(--blue-3); font-size: 14px; }
.docs-toc a { color: var(--ink); text-decoration: none; font-size: 15px; transition: color .2s; }
.docs-toc a:hover { color: var(--blue-3); text-decoration: underline; }

.callout { border-radius: 10px; padding: 16px 20px; margin: 18px 0; font-size: 15px; line-height: 1.6; }
.callout strong { display: block; font-size: 13px; font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.callout-tip { background: #eaf4ff; border-left: 4px solid var(--blue-3); color: var(--ink-2); }
.callout-tip strong { color: var(--blue-3); }
.callout-warn { background: #fff7eb; border-left: 4px solid var(--orange); color: var(--ink-2); }
.callout-warn strong { color: var(--orange); }
.callout-info { background: #ecfdf3; border-left: 4px solid #15803d; color: var(--ink-2); }
.callout-info strong { color: #15803d; }

.section-number { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--blue); color: var(--white); font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 14px; margin-right: 14px; vertical-align: middle; }
.article-body h2.with-num { display: flex; align-items: center; }
.article-body h2.with-num .h2-text { flex: 1; }

@media (max-width: 768px) {
  .docs-toc { padding: 18px 22px; margin: 24px auto 0; }
  .callout { padding: 14px 16px; font-size: 14px; }
  .section-number { width: 30px; height: 30px; font-size: 12px; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
  .nav-links { display: none; }
  .article-hero { padding: 100px 0 40px; }
  .article-hero h1 { font-size: 32px; }
  .article-hero .lede { font-size: 16px; }
  .article-body h2 { font-size: 24px; margin: 40px 0 14px; }
  .article-body h3 { font-size: 18px; }
  .article-body p, .article-body li { font-size: 16px; }
  .tldr { padding: 18px 20px; }
  .cta-strip h2, .cta-strip .cta-strip-heading { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}

/* Nav dropdown divider (was missing · needed by index.html + all sister-page dropdowns) */
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* Burger 44×44 touch-target floor + open state */
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 8px; border-radius: var(--radius); transition: background .2s; }
.nav-burger:hover { background: var(--light-2); }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu container (opens on burger click) */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 99; background: var(--white); flex-direction: column; padding: calc(68px + env(safe-area-inset-top, 0px) + 16px) 22px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-menu.open { display: flex; }
.mobile-menu a { -webkit-tap-highlight-color: transparent; text-decoration: none; }
.mobile-menu a:active { background: var(--light-2); }
.mobile-menu-register { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: var(--white); font-size: 15px; font-weight: 700; padding: 14px 22px; border-radius: var(--radius); width: 100%; box-shadow: 0 8px 20px rgba(26,58,107,.18); margin-bottom: 10px; }
.mobile-menu-register:hover { background: var(--blue-2); text-decoration: none; }
.mobile-menu-login { display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: var(--blue); font-size: 15px; font-weight: 600; padding: 14px 22px; border-radius: var(--radius); border: 1.5px solid var(--border); margin-bottom: 12px; width: 100%; }
.mobile-menu-login:hover { background: var(--light-2); border-color: var(--blue-3); text-decoration: none; }

/* Mobile menu links · primary anchors always visible, groups collapse via <details> */
.mobile-menu-links { display: flex; flex-direction: column; flex: 1; margin: 8px 0 16px; text-align: center; }
.mobile-menu-links .mobile-menu-primary { font-size: 18px; font-weight: 700; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--border); display: block; }
.mobile-menu-links .mobile-menu-primary:hover { color: var(--blue); text-decoration: none; }

/* Collapsible group (JS-free · uses <details>/<summary>) */
.mobile-menu-group { border-bottom: 1px solid var(--border); }
.mobile-menu-group > summary { list-style: none; padding: 16px 0; font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); cursor: pointer; text-align: center; user-select: none; }
.mobile-menu-group > summary::-webkit-details-marker { display: none; }
.mobile-menu-group > summary::after { content: " ▾"; font-size: 10px; opacity: .7; transition: transform .2s; display: inline-block; margin-left: 6px; }
.mobile-menu-group[open] > summary::after { transform: rotate(180deg); }
.mobile-menu-group[open] > summary { color: var(--blue); }
.mobile-menu-group a { display: block; padding: 12px 8px; font-size: 16px; font-weight: 600; color: var(--ink); border-top: 1px dashed var(--border); text-align: center; }
.mobile-menu-group a:hover { color: var(--blue); text-decoration: none; }
.mobile-menu-group a strong { display: block; color: var(--ink); }
.mobile-menu-group a .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 3px; }

/* Responsive · below 900px hide desktop nav, show burger */
@media (max-width: 900px) {
  .site-nav .nav-links { display: none; }
  .nav-burger { display: flex; margin-left: auto; }
  .nav-actions { margin-left: auto; gap: 6px; }
  .nav-actions .nav-ghost { border: none; padding: 6px 10px; font-size: 13px; background: transparent; }
  .nav-actions .nav-cta { padding: 9px 16px; font-size: 12.5px; }
}
@media (max-width: 500px) {
  .nav-actions .nav-ghost { display: none; }
  .nav-actions .nav-cta { padding: 8px 12px; font-size: 12px; }
  .nav-burger { margin-left: 6px; }
}

/* ── Blog · related-posts widget (shared, per-post) ── */
.blog-related-widget { max-width: 960px; margin: 48px auto; padding: 0 24px; }
.blog-related-widget h3 { font-family: "Syne", sans-serif; font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 20px; }
.blog-related-widget > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.blog-related-card { display: block; padding: 18px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--ink); transition: .15s; }
.blog-related-card:hover { border-color: var(--blue-3); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26, 58, 107, .08); text-decoration: none; }
.blog-related-cat { font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-3); }
.blog-related-card h4 { font-family: "Syne", sans-serif; font-size: 15px; font-weight: 600; line-height: 1.3; margin: 8px 0; }
.blog-related-card p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
