/* ================================================================
   Ad Plus Polska – Baza wiedzy
   Design: clean minimal, wzorowany na semly.ai
   ================================================================ */

:root {
  --bg:          #ffffff;
  --bg-subtle:   #f7f7f7;
  --text:        #111111;
  --text-muted:  #555555;
  --text-meta:   #999999;
  --border:      #e5e5e5;
  --border-mid:  #d0d0d0;
  --gold:        #f5a623;
  --gold-dark:   #d48d0c;
  --gold-bg:     #fffbf0;
  --max-w:       740px;
  --ff:          'Inter', system-ui, -apple-system, sans-serif;
  --ff-display:  'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff);
  background: #f3f3f3;
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ──────────────────────────────────────────────── */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .12s, background .12s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-cta {
  background: var(--text) !important;
  color: var(--bg) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 7px 16px !important;
}
.nav-cta:hover { background: #333 !important; }

/* ── BREADCRUMB ──────────────────────────────────────────── */

.breadcrumb {
  font-size: 13px;
  color: var(--text-meta);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb .sep { margin: 0 5px; color: var(--border-mid); }

/* ── MAIN CONTENT WRAPPER ────────────────────────────────── */

.main-content {
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  padding: 48px 24px 100px;
}

/* Article pages: white card wrapper */
body.article-page .main-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  margin: 28px auto;
  padding: 48px 48px 80px;
}

/* ── INDEX: PAGE HEADER ──────────────────────────────────── */

.page-header { margin-bottom: 8px; }

.page-subtitle {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  background: #ebebeb;
  border-radius: 20px;
  padding: 4px 12px;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
  text-transform: none;
}
.page-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}
.page-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 8px;
}
.page-updated {
  font-size: 13px;
  color: var(--text-meta);
}

/* ── INDEX: ARTICLE LIST ─────────────────────────────────── */

.article-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Hide legacy HR separators */
.article-list hr { display: none; }

.article-item {
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, border-color .15s;
}
.article-item:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  border-color: #c8c8c8;
}

/* Date moved to top via flex order */
.article-footer {
  order: -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.article-item h2 {
  font-family: var(--ff);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  order: 0;
}
.article-item h2 a {
  color: var(--text);
  text-decoration: none;
}
.article-item h2 a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
  order: 1;
}
.article-date {
  font-size: 12px;
  color: var(--text-meta);
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-date::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='1' y='2' width='14' height='13' rx='2' stroke='%23aaa' stroke-width='1.2'/%3E%3Cpath d='M1 6h14' stroke='%23aaa' stroke-width='1.2'/%3E%3Cpath d='M5 1v2M11 1v2' stroke='%23aaa' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-meta);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f5f5f5;
  letter-spacing: 0.1px;
}

/* ── ARTICLE: HEADER ─────────────────────────────────────── */

.article-header { margin-bottom: 4px; }

.article-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 16px;
}
.article-meta-row {
  font-size: 13px;
  color: var(--text-meta);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── ARTICLE: TL;DR ─────────────────────────────────────── */

.tldr-block {
  border-left: 4px solid var(--gold);
  background: #fafaf8;
  padding: 16px 20px;
  margin: 0 0 32px;
  border-radius: 0 6px 6px 0;
}
.tldr-block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
}
.tldr-block strong {
  font-style: normal;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: 6px;
}

/* ── ARTICLE: BODY ───────────────────────────────────────── */

.article-body { margin-top: 4px; }

.article-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 20px;
}
.article-body h2 {
  font-family: var(--ff-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 14px;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
  line-height: 1.4;
}
.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
  font-size: 16px;
  line-height: 1.75;
}
.article-body li { margin-bottom: 7px; color: var(--text-muted); }
.article-body li strong { color: var(--text); }
.article-body strong { color: var(--text); }
.article-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--border-mid);
}
.article-body a:hover {
  text-decoration-color: var(--text);
}

/* Callout box */
.callout {
  background: var(--gold-bg);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

/* Params table */
.params-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.params-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.params-table tr:last-child td { border-bottom: none; }
.params-table tr:nth-child(even) td { background: var(--bg-subtle); }
.params-table td:first-child {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-meta);
  width: 42%;
}
.params-table td:last-child {
  font-weight: 500;
  color: var(--text);
}

/* ── ARTICLE: FAQ ────────────────────────────────────────── */

.faq-section { margin-top: 44px; }
.faq-section > h2 {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.faq-item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-a {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── RELATED ARTICLES ────────────────────────────────────── */

.related-section {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.related-section h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-meta);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 16px;
}
.related-list { list-style: none; }
.related-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.related-list li:last-child { border-bottom: none; }
.related-list a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.related-list a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--gold-dark);
}

/* ── CTA BLOCK ───────────────────────────────────────────── */

.cta-block {
  background: var(--text);
  border-radius: 8px;
  padding: 48px 40px;
  text-align: center;
  margin-top: 64px;
}
.cta-block h2 {
  font-family: var(--ff-display);
  font-size: 26px;
  color: var(--bg);
  margin-bottom: 10px;
  line-height: 1.25;
  font-weight: 700;
}
.cta-block h2 span { color: var(--gold); }
.cta-block p {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  line-height: 1.65;
}
.cta-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  font-size: 14px;
  font-weight: 700;
  background: var(--gold);
  color: var(--text);
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, transform .12s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); }
.btn-outline {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.2);
  padding: 12px 24px;
  border-radius: 50px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
  display: inline-block;
}
.btn-outline:hover { border-color: rgba(255,255,255,.55); color: #fff; }

/* ── FOOTER ──────────────────────────────────────────────── */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px 24px;
}
.footer-inner {
  max-width: calc(var(--max-w) + 48px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-text {
  font-size: 13px;
  color: var(--text-meta);
}
.footer-text a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.footer-text a:hover { text-decoration: underline; }

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 600px) {
  .main-content { padding: 32px 16px 64px; }
  body.article-page .main-content { padding: 28px 18px 60px; margin: 12px auto; border-radius: 8px; }
  .page-header h1 { font-size: 24px; }
  .article-header h1 { font-size: 22px; }
  .article-item h2 { font-size: 16px; }
  .header-inner { height: 54px; }
  .nav-link:not(.nav-cta) { display: none; }
  .cta-block { padding: 32px 20px; }
  .cta-block h2 { font-size: 22px; }
  .logo-name { display: none; }
}
