/*
Theme Name: Bilimdonlar
Description: Purpose-built minimal reading-first theme for bilimdonlar.com. Native design system v2 (no Astra, no overrides): hero + search, 16:9 uncropped cover cards, calm article layout, zero theme JS. Uzbek UI baked in.
Version: 1.0.0
Author: Bilimdonlar
Requires PHP: 8.0
Text Domain: bilimdonlar
*/

/* ==========================================================================
   Tokens — single source of truth (ported from design system v2)
   ========================================================================== */
:root {
  --bd-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bd-font-head: 'Manrope', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bd-ink:        #1a2230;
  --bd-ink-soft:   #59626f;
  --bd-ink-faint:  #5f6775;
  --bd-bg:         #ffffff;
  --bd-bg-alt:     #f5f7fa;
  --bd-surface:    #ffffff;
  --bd-border:     #e8ebf1;
  --bd-border-2:   #dbe0e8;
  --bd-accent:     #2563eb;
  --bd-accent-2:   #1d4ed8;
  --bd-accent-ink: #1b3faf;
  --bd-accent-tint:#eef3fe;
  --bd-warn-tint:  #fff6e9;
  --bd-warn-line:  #f0b552;
  --bd-ok-tint:    #edf8f0;
  --bd-ok-line:    #57b37a;

  --bd-s-1: 4px;  --bd-s-2: 8px;  --bd-s-3: 12px; --bd-s-4: 16px;
  --bd-s-5: 24px; --bd-s-6: 32px; --bd-s-7: 48px; --bd-s-8: 64px;

  --bd-radius:    16px;
  --bd-radius-sm: 10px;
  --bd-radius-xs: 8px;
  --bd-shadow:    0 1px 2px rgba(16,24,40,.04), 0 12px 28px -14px rgba(16,24,40,.16);
  --bd-shadow-sm: 0 1px 2px rgba(16,24,40,.05);
}

/* ============================ BASE ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  font-family: var(--bd-font-body);
  font-size: 18px;
  line-height: 1.72;
  color: var(--bd-ink);
  background: var(--bd-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: .003em;
}
h1, h2, h3, h4, h5 {
  font-family: var(--bd-font-head);
  color: var(--bd-ink);
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 0;
}
a { color: var(--bd-accent); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--bd-accent-2); }
img { max-width: 100%; height: auto; }
::selection { background: #dbe6ff; }

.bd-wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.bd-narrow { max-width: 760px; margin-inline: auto; }

.screen-reader-text {
  position: absolute !important; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  clip-path: none; width: auto; height: auto; z-index: 100000;
  left: 8px; top: 8px; background: var(--bd-accent); color: #fff;
  padding: 10px 16px; border-radius: var(--bd-radius-xs); text-decoration: none;
}
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--bd-accent); outline-offset: 2px; border-radius: 4px;
}

/* ============================ HEADER ============================ */
.bd-header {
  background: var(--bd-bg);
  border-bottom: 1px solid var(--bd-border);
  position: relative;
  z-index: 40;
}
.bd-header-in {
  display: flex; align-items: center; gap: var(--bd-s-5);
  min-height: 64px;
}
.bd-logo {
  font-family: var(--bd-font-head); font-weight: 800; font-size: 25px;
  letter-spacing: -0.03em; line-height: 1; color: var(--bd-ink);
  text-decoration: none; flex: none;
}
.bd-logo b { font-weight: 800; color: var(--bd-ink); }
.bd-logo span { color: var(--bd-accent); }
.bd-logo:hover, .bd-logo:focus { color: var(--bd-ink); }

.bd-nav { display: flex; gap: var(--bd-s-2); margin-left: auto; }
.bd-nav a {
  font-weight: 500; font-size: 15px; color: var(--bd-ink-soft);
  text-decoration: none; padding: var(--bd-s-2) var(--bd-s-3); border-radius: 999px;
}
.bd-nav a:hover { color: var(--bd-accent); background: var(--bd-accent-tint); }
.bd-nav a[aria-current="page"] { color: var(--bd-accent-ink); background: var(--bd-accent-tint); font-weight: 600; }

/* header search (desktop dropdown, CSS-only via <details>) */
.bd-hsearch { position: relative; flex: none; }
.bd-hsearch > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; color: var(--bd-ink-soft);
}
.bd-hsearch > summary::-webkit-details-marker { display: none; }
.bd-hsearch > summary:hover { background: var(--bd-bg-alt); color: var(--bd-ink); }
.bd-hsearch-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(420px, 86vw);
  background: var(--bd-surface); border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius); box-shadow: var(--bd-shadow); padding: var(--bd-s-3); z-index: 60;
}

/* mobile menu (CSS-only via <details>) */
.bd-burger { display: none; position: static; margin-left: auto; }
.bd-burger > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--bd-radius-xs); color: var(--bd-ink);
}
.bd-burger > summary::-webkit-details-marker { display: none; }
.bd-burger > summary:hover { background: var(--bd-bg-alt); }
.bd-burger .bd-ic-close { display: none; }
.bd-burger[open] .bd-ic-close { display: block; }
.bd-burger[open] .bd-ic-menu { display: none; }
.bd-mnav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bd-bg); border-bottom: 1px solid var(--bd-border);
  box-shadow: var(--bd-shadow); padding: var(--bd-s-4) clamp(16px, 4vw, 32px) var(--bd-s-5); z-index: 50;
}
.bd-mnav .bd-search { margin: 0 0 var(--bd-s-4); }
.bd-mnav-links { display: flex; flex-direction: column; }
.bd-mnav-links a {
  padding: var(--bd-s-3) var(--bd-s-1); text-decoration: none; color: var(--bd-ink);
  font-weight: 600; font-size: 16.5px; border-bottom: 1px solid var(--bd-border);
}
.bd-mnav-links a:last-child { border-bottom: 0; }
.bd-mnav-links a[aria-current="page"] { color: var(--bd-accent-ink); }
.bd-mnav-sub { margin-top: var(--bd-s-3); display: flex; flex-wrap: wrap; gap: var(--bd-s-2) var(--bd-s-4); }
.bd-mnav-sub a { color: var(--bd-ink-soft); font-size: 14px; text-decoration: none; }

@media (max-width: 921px) {
  .bd-nav, .bd-hsearch { display: none; }
  .bd-burger { display: block; }
  .bd-logo { font-size: 22px; }
  .bd-header-in { min-height: 58px; }
}

/* ============================ HOME HERO ============================ */
.bd-home-hero { padding: var(--bd-s-6) 0 var(--bd-s-2); }
.bd-home-hero h1 {
  font-weight: 800; font-size: clamp(28px, 5vw, 40px);
  line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 var(--bd-s-3);
}
.bd-home-hero .bd-sub { font-size: 17px; color: var(--bd-ink-soft); margin: 0 0 var(--bd-s-4); max-width: 640px; }
.bd-topics { display: flex; flex-wrap: wrap; gap: var(--bd-s-2); }
.bd-topics a {
  display: inline-flex; align-items: center; gap: var(--bd-s-1);
  background: var(--bd-surface); border: 1px solid var(--bd-border);
  border-radius: 999px; padding: var(--bd-s-2) var(--bd-s-4);
  font-weight: 600; font-size: 14.5px; color: var(--bd-ink);
  text-decoration: none; box-shadow: var(--bd-shadow-sm);
  transition: border-color .16s, color .16s, transform .16s;
}
.bd-topics a:hover { border-color: var(--bd-accent); color: var(--bd-accent); transform: translateY(-1px); }

/* ---- Search form ---- */
.bd-search {
  display: flex; align-items: center; gap: var(--bd-s-2);
  background: var(--bd-surface); border: 1px solid var(--bd-border-2);
  border-radius: 999px; padding: var(--bd-s-1) var(--bd-s-1) var(--bd-s-1) var(--bd-s-4);
  max-width: 620px; margin: 0 0 var(--bd-s-4); box-shadow: var(--bd-shadow-sm);
  transition: border-color .16s, box-shadow .16s;
}
.bd-search:focus-within { border-color: var(--bd-accent); box-shadow: 0 0 0 3px var(--bd-accent-tint); }
.bd-search-ic { display: inline-flex; color: var(--bd-ink-faint); flex: none; }
.bd-search input[type=search] {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: var(--bd-font-body); font-size: 16px; color: var(--bd-ink); padding: var(--bd-s-3) 0;
}
.bd-search input[type=search]::placeholder { color: var(--bd-ink-faint); }
.bd-search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.bd-search button {
  flex: none; border: 0; cursor: pointer; background: var(--bd-accent); color: #fff;
  font-family: var(--bd-font-head); font-weight: 700; font-size: 15px;
  border-radius: 999px; padding: var(--bd-s-3) var(--bd-s-5); transition: background .16s;
}
.bd-search button:hover { background: var(--bd-accent-2); }

/* ---- "Ko'p o'qilayotgan" — wrap grid, nothing ever clipped ---- */
.bd-popular { margin: var(--bd-s-5) 0 0; }
.bd-popular h2 {
  font-weight: 800; font-size: 13.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--bd-ink-faint); margin: 0 0 var(--bd-s-3);
}
.bd-popular-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--bd-s-2); }
.bd-pop-card {
  display: flex; align-items: center; gap: var(--bd-s-2);
  background: var(--bd-bg-alt); border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius-sm); padding: var(--bd-s-3) var(--bd-s-4);
  text-decoration: none; color: var(--bd-ink); min-width: 0;
  transition: border-color .16s, background .16s, transform .16s;
}
.bd-pop-card:hover { border-color: var(--bd-accent); background: var(--bd-accent-tint); transform: translateY(-1px); }
.bd-pop-tt {
  font-weight: 600; font-size: 14px; line-height: 1.35; color: var(--bd-ink); min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bd-pop-card:hover .bd-pop-tt { color: var(--bd-accent-ink); }
.bd-pop-go { color: var(--bd-accent); font-weight: 700; flex: none; margin-left: auto; }
@media (max-width: 999px) { .bd-popular-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .bd-popular-grid { grid-template-columns: 1fr 1fr; } .bd-pop-go { display: none; } }

/* ============================ FEED / GRID ============================ */
.bd-main { padding: var(--bd-s-5) 0 var(--bd-s-7); }
.bd-feedhead {
  display: flex; align-items: baseline; gap: var(--bd-s-3);
  margin: var(--bd-s-6) 0 var(--bd-s-4);
}
.bd-feedhead > * {
  font-family: var(--bd-font-head); font-weight: 800; font-size: 13.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--bd-ink-faint); margin: 0;
}
.bd-archhead { margin: var(--bd-s-4) 0 var(--bd-s-5); }
.bd-archhead h1 { font-weight: 800; font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.025em; margin: 0 0 var(--bd-s-2); }
.bd-archhead .bd-archdesc { color: var(--bd-ink-soft); font-size: 16.5px; margin: 0; max-width: 680px; }

.bd-grid { display: grid; grid-template-columns: 1fr; gap: var(--bd-s-4); }
@media (min-width: 641px)  { .bd-grid { grid-template-columns: repeat(2, 1fr); gap: var(--bd-s-5) var(--bd-s-4); } }
@media (min-width: 1000px) { .bd-grid { grid-template-columns: repeat(3, 1fr); } }

/* card: cover shown at its native 16:9 — never cropped, never letterboxed */
.bd-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bd-surface); border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius); overflow: hidden; box-shadow: var(--bd-shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.bd-card:hover { box-shadow: var(--bd-shadow); border-color: var(--bd-border-2); transform: translateY(-2px); }
.bd-card-media { display: block; aspect-ratio: 16 / 9; background: var(--bd-accent-tint); }
.bd-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.bd-card:hover .bd-card-media img { transform: scale(1.03); }
.bd-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--bd-s-2); padding: var(--bd-s-4) var(--bd-s-4) var(--bd-s-5); }
.bd-chip {
  position: relative; z-index: 2;
  display: inline-block; background: var(--bd-accent-tint); color: var(--bd-accent-ink);
  font-weight: 600; font-size: 12.5px; letter-spacing: .01em;
  padding: var(--bd-s-1) 11px; border-radius: 999px; text-decoration: none;
}
a.bd-chip:hover { background: #e2ebfe; color: var(--bd-accent-2); }
.bd-card-tt { font-weight: 700; font-size: 19px; line-height: 1.32; margin: 0; }
.bd-card-tt a { color: var(--bd-ink); text-decoration: none; }
.bd-card-tt a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card clickable, zero JS */
.bd-card:hover .bd-card-tt a { color: var(--bd-accent); }
.bd-card-ex {
  color: var(--bd-ink-soft); font-size: 15px; line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================ PAGINATION ============================ */
.bd-pagination { margin-top: var(--bd-s-6); }
.bd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--bd-s-2); align-items: center; justify-content: center; }
.bd-pagination .page-numbers {
  min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 var(--bd-s-3); border: 1px solid var(--bd-border); border-radius: var(--bd-radius-xs);
  color: var(--bd-ink-soft); text-decoration: none; font-weight: 600; font-size: 15px; background: var(--bd-surface);
}
.bd-pagination a.page-numbers:hover { border-color: var(--bd-accent); color: var(--bd-accent); }
.bd-pagination .page-numbers.current { background: var(--bd-accent); border-color: var(--bd-accent); color: #fff; }
.bd-pagination .page-numbers.dots { border: 0; background: none; }

/* ============================ SINGLE ARTICLE ============================ */
.bd-crumbs { font-size: 13.5px; color: var(--bd-ink-faint); margin: var(--bd-s-2) 0 var(--bd-s-4); }
.bd-crumbs p { margin: 0; }
.bd-crumbs a { color: var(--bd-ink-soft); text-decoration: none; }
.bd-crumbs a:hover { color: var(--bd-accent); }
.bd-crumbs .separator { margin: 0 var(--bd-s-1); }

.bd-article-head h1 {
  font-weight: 800; font-size: clamp(28px, 4.6vw, 38px);
  line-height: 1.16; letter-spacing: -0.025em; margin: 0 0 var(--bd-s-3);
}
.bd-artmeta {
  display: flex; flex-wrap: wrap; gap: var(--bd-s-2); align-items: center;
  color: var(--bd-ink-faint); font-size: 14px; margin: 0 0 var(--bd-s-5);
}

.bd-article { font-size: 18px; line-height: 1.75; color: var(--bd-ink); overflow-wrap: break-word; }
.bd-article p { margin: 0 0 1.15em; }
.bd-article h2 { font-weight: 800; font-size: 25px; line-height: 1.24; margin: 1.45em 0 .5em; }
.bd-article h3 { font-weight: 700; font-size: 20px; margin: 1.5em 0 .5em; }
.bd-article a { font-weight: 500; text-decoration: underline; text-decoration-color: #b9ccf7; }
.bd-article a:hover { text-decoration-color: var(--bd-accent); }
.bd-article strong { color: #10192a; font-weight: 700; }
.bd-article img { border-radius: var(--bd-radius-sm); }
.bd-article iframe { max-width: 100%; }

/* Lead paragraph = "Qisqa javob" answer box */
.bd-article > p:first-of-type {
  font-size: 18.5px; line-height: 1.7; color: #253046;
  background: var(--bd-accent-tint);
  border-left: 3px solid var(--bd-accent);
  border-radius: 0 var(--bd-radius-sm) var(--bd-radius-sm) 0;
  padding: var(--bd-s-4) var(--bd-s-5); margin: 0 0 1.4em;
}
.bd-article > p em:only-child { color: var(--bd-ink-faint); font-size: 15px; }

/* Numbered steps with round counters */
.bd-article ol { counter-reset: bd; padding-left: 0; list-style: none; margin: 0 0 1.15em; }
.bd-article ol > li { counter-increment: bd; position: relative; padding-left: 44px; margin-bottom: .9em; }
.bd-article ol > li::before {
  content: counter(bd); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bd-accent-tint); color: var(--bd-accent-ink);
  font-family: var(--bd-font-head); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.bd-article ul { padding-left: 1.2em; margin: 0 0 1.15em; }
.bd-article ul li { margin-bottom: .5em; }

/* LuckyWP TOC — reskin to match the system */
.bd-article .lwptoc {
  background: var(--bd-bg-alt) !important; border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius-sm); padding: var(--bd-s-3) var(--bd-s-4); margin: 0 0 1.4em;
}
.bd-article .lwptoc .lwptoc_i { background: transparent !important; padding: 0; }
.bd-article .lwptoc_header { margin-bottom: var(--bd-s-1); }
.bd-article .lwptoc_title { font-family: var(--bd-font-head); font-weight: 800 !important; color: var(--bd-ink); font-size: 15px; }
.bd-article .lwptoc_toggle a { color: var(--bd-ink-faint) !important; font-size: 13px; border: 0 !important; }
.bd-article .lwptoc_items { font-size: 15px; }
.bd-article .lwptoc_item a { color: var(--bd-ink-soft) !important; text-decoration: none; font-weight: 500; }
.bd-article .lwptoc_item a:hover { color: var(--bd-accent) !important; }
.bd-article .lwptoc_item_number { color: var(--bd-accent-ink) !important; font-weight: 700; }

/* keep plain numbering inside the TOC (no round counters there) */
.bd-article .lwptoc ol > li::before { content: none; }
.bd-article .lwptoc ol > li { padding-left: 0; margin-bottom: .25em; }
.bd-article .lwptoc ol { list-style: none; }

/* Callouts */
.bd-article blockquote {
  border-left: 3px solid var(--bd-warn-line); background: var(--bd-warn-tint);
  border-radius: 0 var(--bd-radius-sm) var(--bd-radius-sm) 0;
  padding: var(--bd-s-4) var(--bd-s-5); margin: 0 0 1.4em; color: #5a4a2a; font-style: normal;
}
.bd-article blockquote p:last-child { margin-bottom: 0; }
.bd-article h2 + p, .bd-article h3 + p { margin-top: .2em; }

/* Tables (mobile-safe) */
.bd-article table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
.bd-article th, .bd-article td { border: 1px solid var(--bd-border-2); padding: var(--bd-s-2) var(--bd-s-3); }
.bd-article th { background: var(--bd-bg-alt); font-family: var(--bd-font-head); }
.bd-article figure.wp-block-table, .bd-article .wp-block-table { overflow-x: auto; margin: 0 0 1.15em; }

/* Buttons in content */
.bd-btn, .bd-article .wp-block-button__link {
  display: inline-block; background: var(--bd-accent); color: #fff !important;
  border-radius: var(--bd-radius-xs); font-family: var(--bd-font-head);
  font-weight: 700; padding: var(--bd-s-3) var(--bd-s-5); border: 0; text-decoration: none;
}
.bd-btn:hover, .bd-article .wp-block-button__link:hover { background: var(--bd-accent-2); }

/* ============================ TG CTA + RELATED ============================ */
.bd-tg-cta {
  display: flex; align-items: center; gap: var(--bd-s-4); flex-wrap: wrap;
  background: linear-gradient(180deg, #f2f7ff, #eef3fe);
  border: 1px solid #dce7fd; border-radius: var(--bd-radius);
  padding: var(--bd-s-4) var(--bd-s-5); margin: var(--bd-s-6) 0 0;
}
.bd-tg-cta .bd-tg-t { font-family: var(--bd-font-head); font-weight: 800; color: var(--bd-ink); }
.bd-tg-cta .bd-tg-s { color: var(--bd-ink-soft); font-size: 14.5px; }
.bd-tg-cta a.bd-btn { margin-left: auto; }
@media (max-width: 520px) { .bd-tg-cta a.bd-btn { margin-left: 0; } }

.bd-related { margin-top: var(--bd-s-6); }
.bd-related h2 { font-weight: 800; font-size: 20px; margin: 0 0 var(--bd-s-4); }
.bd-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--bd-s-4); }
@media (max-width: 560px) { .bd-related-grid { grid-template-columns: 1fr; } }
.bd-rel-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--bd-surface); border: 1px solid var(--bd-border);
  border-radius: var(--bd-radius-sm); overflow: hidden; box-shadow: var(--bd-shadow-sm);
  text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.bd-rel-card:hover { box-shadow: var(--bd-shadow); border-color: var(--bd-border-2); transform: translateY(-2px); }
.bd-rel-tt { font-family: var(--bd-font-head); font-weight: 700; font-size: 15.5px; line-height: 1.35; color: var(--bd-ink); padding: var(--bd-s-3) var(--bd-s-4) var(--bd-s-4); }
.bd-rel-card:hover .bd-rel-tt { color: var(--bd-accent); }

/* ============================ STATIC PAGE / SEARCH / 404 ============================ */
.bd-pagehead h1 { font-weight: 800; font-size: clamp(26px, 4.4vw, 36px); letter-spacing: -0.025em; margin: var(--bd-s-2) 0 var(--bd-s-5); }
.bd-empty {
  background: var(--bd-bg-alt); border: 1px solid var(--bd-border); border-radius: var(--bd-radius);
  padding: var(--bd-s-6) var(--bd-s-5); margin: 0 0 var(--bd-s-5);
}
.bd-empty p { margin: 0 0 var(--bd-s-4); color: var(--bd-ink-soft); }
.bd-empty .bd-search { margin-bottom: 0; }

/* ============================ CONTACT FORM (plugin shortcode) ============================ */
.bd-contact { max-width: 560px; display: flex; flex-direction: column; gap: var(--bd-s-4); margin: var(--bd-s-2) 0 var(--bd-s-1); }
.bd-contact .bd-fl { display: flex; flex-direction: column; gap: var(--bd-s-1); font-family: var(--bd-font-head); font-weight: 700; color: var(--bd-ink); font-size: 15px; }
.bd-contact input[type=text], .bd-contact textarea {
  font-family: var(--bd-font-body); font-size: 16px; color: var(--bd-ink);
  background: var(--bd-surface); border: 1px solid var(--bd-border-2); border-radius: var(--bd-radius-xs);
  padding: var(--bd-s-3) var(--bd-s-4); width: 100%; font-weight: 400;
}
.bd-contact textarea { resize: vertical; min-height: 120px; }
.bd-contact input:focus, .bd-contact textarea:focus { outline: 2px solid var(--bd-accent); outline-offset: 1px; border-color: var(--bd-accent); }
.bd-contact .bd-btn { align-self: flex-start; cursor: pointer; }
.bd-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.bd-form-note { border-radius: var(--bd-radius-sm); padding: var(--bd-s-3) var(--bd-s-4); margin: 0 0 var(--bd-s-4); font-size: 15.5px; }
.bd-form-note.bd-ok { background: var(--bd-ok-tint); border: 1px solid var(--bd-ok-line); color: #1f6b3e; }
.bd-form-note.bd-err { background: var(--bd-warn-tint); border: 1px solid var(--bd-warn-line); color: #7a5518; }

/* ============================ FOOTER ============================ */
.bd-footer {
  background: var(--bd-bg-alt); border-top: 1px solid var(--bd-border);
  margin-top: var(--bd-s-7); padding: var(--bd-s-5) 0;
}
.bd-footer-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--bd-s-3) var(--bd-s-5);
}
.bd-footer-brand { font-family: var(--bd-font-head); font-weight: 700; color: var(--bd-ink); font-size: 14.5px; }
.bd-footer-brand .bd-muted { color: var(--bd-ink-faint); font-family: var(--bd-font-body); font-weight: 400; }
.bd-footer-links { display: flex; flex-wrap: wrap; gap: var(--bd-s-2) var(--bd-s-5); }
.bd-footer-links a { color: var(--bd-ink-soft); font-size: 14px; text-decoration: none; }
.bd-footer-links a:hover { color: var(--bd-accent); }
@media (max-width: 640px) { .bd-footer-in { flex-direction: column; align-items: flex-start; gap: var(--bd-s-3); } }

/* ============================ RESPONSIVE TYPE ============================ */
@media (max-width: 921px) {
  body { font-size: 17px; }
  .bd-article { font-size: 17px; }
  .bd-article h2 { font-size: 22px; }
  .bd-article-head h1 { font-size: 26px; }
}
@media (max-width: 430px) {
  .bd-article > p:first-of-type { padding: var(--bd-s-3) var(--bd-s-4); font-size: 17px; }
  .bd-card-tt { font-size: 17.5px; }
}
