/* ============================================================================
   DokiForFarm Tudásbázis — statikus webes felület
   Arculat: a DokiForFarm alkalmazásból (Poppins, kék #3f80ea, navy #293042).
   ============================================================================ */
:root {
  --navy:   #293042;
  --navy-2: #1f2632;
  --blue:   #3f80ea;
  --blue-d: #2f6bd0;
  --logo:   #3fa9f5;
  --green:  #4bbf73;
  --orange: #e5a54b;
  --red:    #d9534f;
  --info:   #1f9bcf;
  --bg:     #f6f8fb;
  --card:   #ffffff;
  --text:   #2b3445;
  --muted:  #6b7686;
  --border: #e6ebf2;
  --shadow: 0 1px 3px rgba(41,48,66,.06), 0 6px 24px rgba(41,48,66,.06);
  --shadow-lift: 0 6px 14px rgba(41,48,66,.10), 0 14px 40px rgba(41,48,66,.10);
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-d); text-decoration: underline; }
img { max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand img { width: 34px; height: 34px; }
.brand .name { font-weight: 600; font-size: 1.12rem; color: var(--navy); letter-spacing: -.2px; }
.brand .name span { color: var(--blue); font-weight: 500; }
.header-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.header-search input {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px 0 38px; font: inherit; font-size: .95rem; background: var(--bg) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%236b7686" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 12px center;
  transition: border-color .15s, box-shadow .15s;
}
.header-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63,128,234,.15); background-color: #fff; }
.header-link { color: var(--muted); font-size: .92rem; font-weight: 500; white-space: nowrap; }
.header-link:hover { color: var(--blue); text-decoration: none; }

/* ---------- Search results dropdown ---------- */
.search-results {
  position: absolute; top: 48px; left: 0; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lift);
  max-height: 60vh; overflow-y: auto; padding: 6px; display: none;
}
.search-results.open { display: block; }
.sr-item { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.sr-item:hover, .sr-item.active { background: var(--bg); text-decoration: none; }
.sr-item .t { font-weight: 500; font-size: .95rem; }
.sr-item .c { font-size: .78rem; color: var(--muted); }
.sr-empty { padding: 14px 12px; color: var(--muted); font-size: .9rem; }

/* ---------- Generic ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 22px 0 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { margin: 0 7px; opacity: .6; }

/* ---------- Home hero ---------- */
.hero {
  background: linear-gradient(160deg, #2b3447 0%, #34507f 55%, #3f80ea 130%);
  color: #fff; text-align: center; padding: 56px 20px 64px;
}
.hero img { width: 64px; height: 64px; margin-bottom: 14px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero h1 { margin: 0 0 8px; font-size: 2.1rem; font-weight: 600; letter-spacing: -.5px; }
.hero p { margin: 0 auto 26px; max-width: 540px; color: #d8e4f7; font-weight: 300; }
.hero-search { max-width: 560px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%; height: 54px; border: none; border-radius: 14px; padding: 0 18px 0 50px;
  font: inherit; font-size: 1.02rem; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7686" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 16px center;
}
.hero-search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 10px 30px rgba(0,0,0,.18); }
.hero-search .search-results { top: 60px; text-align: left; }

/* ---------- Collection cards ---------- */
.section-title { font-size: 1.2rem; font-weight: 600; color: var(--navy); margin: 36px 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 10px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s;
  display: flex; gap: 16px; align-items: flex-start; cursor: pointer; color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #d4dd;  text-decoration: none; }
.card .badge {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.5rem; background: rgba(63,128,234,.10);
}
.card .ct { font-weight: 600; color: var(--navy); font-size: 1.05rem; margin: 2px 0 4px; }
.card .cd { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.card .cn { color: var(--blue); font-size: .8rem; font-weight: 500; margin-top: 8px; }

/* ---------- Collection page (article list) ---------- */
.coll-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px; }
.coll-head .badge { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 1.8rem; background: rgba(63,128,234,.10); }
.coll-head h1 { margin: 0; font-size: 1.7rem; color: var(--navy); font-weight: 600; }
.coll-head p { margin: 3px 0 0; color: var(--muted); }
.article-list { display: grid; gap: 12px; padding-bottom: 40px; }
.al-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; cursor: pointer; color: inherit;
  display: flex; align-items: center; gap: 14px;
}
.al-item:hover { transform: translateX(3px); box-shadow: var(--shadow-lift); text-decoration: none; }
.al-item .ai-ico { color: var(--blue); flex: 0 0 auto; opacity: .8; }
.al-item .ai-t { font-weight: 500; color: var(--navy); }
.al-item .ai-d { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.al-item .ai-arrow { margin-left: auto; color: var(--muted); }

/* ---------- Article layout ---------- */
.article-wrap { display: grid; grid-template-columns: 264px 1fr; gap: 40px; align-items: start; padding-bottom: 60px; }
.side {
  position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto;
  border-right: 1px solid var(--border); padding-right: 18px;
}
.side .back { font-size: .85rem; color: var(--muted); display: inline-block; margin-bottom: 14px; }
.side .side-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a {
  display: block; padding: 7px 12px; border-radius: 8px; color: var(--text); font-size: .9rem; line-height: 1.4;
}
.side li a:hover { background: var(--bg); text-decoration: none; }
.side li a.active { background: rgba(63,128,234,.10); color: var(--blue); font-weight: 500; }

.article { min-width: 0; max-width: 800px; }
.article h1 { font-size: 2rem; font-weight: 600; color: var(--navy); letter-spacing: -.5px; margin: 6px 0 22px; line-height: 1.2; }
.article h2 { font-size: 1.4rem; font-weight: 600; color: var(--navy); margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.article h3 { font-size: 1.12rem; font-weight: 600; color: var(--navy); margin: 26px 0 8px; }
.article p { margin: 12px 0; }
.article ul, .article ol { margin: 12px 0; padding-left: 24px; }
.article li { margin: 5px 0; }
.article strong { font-weight: 600; color: #1f2836; }
.article code {
  background: #eef1f6; color: #b8326b; padding: 2px 6px; border-radius: 6px; font-size: .88em;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
}
.article img {
  display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); margin: 18px 0;
}
.article hr { border: none; border-top: 1px solid var(--border); margin: 30px 0; }

/* tables */
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; box-shadow: var(--shadow); border-radius: 10px; overflow: hidden; }
.article th { background: var(--navy); color: #fff; text-align: left; padding: 10px 14px; font-weight: 500; }
.article td { padding: 10px 14px; border-top: 1px solid var(--border); }
.article tbody tr:nth-child(even) { background: #fafbfd; }

/* callouts (blockquotes) */
.article blockquote {
  margin: 18px 0; padding: 14px 16px 14px 16px; border-radius: 10px;
  background: #eef4ff; border-left: 4px solid var(--blue); color: #2b3445;
}
.article blockquote p { margin: 6px 0; }
.article blockquote p:first-child { margin-top: 0; }
.article blockquote p:last-child { margin-bottom: 0; }
.article blockquote.cl-warn { background: #fdf5e7; border-left-color: var(--orange); }
.article blockquote.cl-tip  { background: #edf9f1; border-left-color: var(--green); }

/* related + pager */
.related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related h3 { font-size: 1rem; color: var(--navy); margin: 0 0 12px; }
.related a { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px; margin: 0 8px 8px 0; font-size: .88rem; color: var(--text); box-shadow: var(--shadow); }
.related a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; }
.pager a { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); color: var(--text); }
.pager a:hover { border-color: var(--blue); text-decoration: none; box-shadow: var(--shadow-lift); }
.pager .pl { font-size: .76rem; color: var(--muted); }
.pager .pt { font-weight: 500; color: var(--navy); }
.pager a.next { text-align: right; }

/* loading / status */
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.statuschip { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: var(--muted); margin-left: 8px; vertical-align: middle; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aeb8c8; margin-top: 50px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .85rem; }
.footer-inner .fbrand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 500; }
.footer-inner .fbrand img { width: 24px; height: 24px; }
.footer-inner .spacer { flex: 1; }
.site-footer a { color: #c7d2e2; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 16px; margin-bottom: 8px; }
  .header-link { display: none; }
}
@media (max-width: 580px) {
  .cards { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .hero h1 { font-size: 1.6rem; }
}
