/* ==========================================================================
   KFZhub — Review-Magazine theme. Light, Inter, trust-focused.
   ========================================================================== */

/* ---------- Fonts (self-hosted Inter) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #F7F7F7;
  --surface-2: #FbFbFb;
  --border: #E5E5E5;
  --text: #1A1A1A;
  --muted: #666666;
  --primary: #FF9900;       /* Amazon orange — CTA only */
  --primary-d: #e88a00;
  --link: #0066C0;
  --success: #007600;
  --winner: #FFD700;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container: 1140px;
  --reading: 740px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 { font-size: 1.55rem; margin: 2em 0 .6em; padding-top: .6em; border-top: 1px solid var(--border); }
h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .5em 1em; z-index: 200; border-radius: 6px; box-shadow: var(--shadow); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; text-decoration: none; }
.site-logo:hover { text-decoration: none; }
.site-logo__mark { color: var(--text); }
.site-logo__hub { color: var(--primary); }
.site-logo--footer { font-size: 1.25rem; display: inline-block; margin-bottom: .6em; }

.site-nav__list { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { color: var(--text); font-weight: 600; font-size: .95rem; padding: .3em 0; border-bottom: 2px solid transparent; }
.site-nav__list a:hover { color: var(--link); text-decoration: none; }
.site-nav__list a.is-active { border-bottom-color: var(--primary); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ---------- Layout ---------- */
.main { padding: 2rem 0 3rem; min-height: 60vh; }
.article--narrow { max-width: var(--reading); margin: 0 auto; }
.article--wide { max-width: var(--container); }

.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.layout-with-sidebar .article { max-width: var(--reading); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4em; list-style: none; padding: 0; margin: 0 0 1.2em; font-size: .82rem; color: var(--muted); }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .4em; color: var(--border); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Article ---------- */
.article__title { margin-bottom: .3em; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; font-size: .88rem; color: var(--muted); margin-bottom: 1.5em; padding-bottom: 1.2em; border-bottom: 1px solid var(--border); }
.article-meta strong { color: var(--text); }
.article-meta__sep { color: var(--border); }
.article-meta__rating { display: inline-flex; align-items: center; gap: .35em; }

.content > :first-child { margin-top: 0; }
.content img { border-radius: var(--radius); }
.content a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
/* CTA buttons inside article content must never look like text links */
.content a.kfz-btn, .content a.kfz-btn:hover { text-decoration: none; }
.content blockquote { margin: 1.5em 0; padding: .8em 1.2em; border-left: 4px solid var(--primary); background: var(--surface); border-radius: 0 8px 8px 0; }
.content code { background: var(--surface); padding: .15em .4em; border-radius: 4px; font-size: .9em; }

/* Markdown tables */
.content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.content th, .content td { padding: .7em .8em; border-bottom: 1px solid var(--border); text-align: left; }
.content thead th { background: var(--surface); font-weight: 700; }

/* ---------- Author box ---------- */
.article__foot { margin-top: 2.5em; }
.author-box { display: flex; gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.author-box__avatar { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--text); color: #fff; font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.author-box__text strong { display: block; }
.author-box__text p { margin: .2em 0 0; font-size: .9rem; color: var(--muted); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar__sticky { position: sticky; top: 84px; }
.sidebar-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; background: #fff; }
.sidebar-card--rec { border-color: var(--primary); background: #fffdf7; text-align: center; }
.sidebar-card__label { font-weight: 800; color: var(--primary-d); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6em; }
.sidebar-card__img { max-height: 160px; width: auto; margin: 0 auto .6em; }
.sidebar-card__title { font-size: 1.05rem; margin: .2em 0 .4em; }
.sidebar-card h3 { margin: 0 0 .6em; font-size: 1.05rem; }
.sidebar-trust { list-style: none; padding: 0; margin: 0; }
.sidebar-trust li { padding-left: 1.5em; position: relative; font-size: .92rem; margin: .4em 0; }
.sidebar-trust li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* ---------- Card grid (category) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__link { display: block; color: inherit; text-decoration: none; }
.card__link:hover { text-decoration: none; }
.card__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--surface); }
.card__body { padding: 1rem 1.1rem 1.2rem; }
.card__title { font-size: 1.15rem; margin: 0 0 .4em; }
.card__excerpt { font-size: .9rem; color: var(--muted); margin: 0 0 .6em; }
.card__meta { font-size: .78rem; color: var(--muted); }
.card__kicker { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-d); margin-bottom: .3em; }

/* ---------- Home: hero ---------- */
.hero { background: linear-gradient(180deg, var(--surface) 0%, #fff 100%); border-bottom: 1px solid var(--border); padding: 3.5rem 0 3rem; text-align: center; }
.hero__title { font-size: 2.6rem; margin: 0 0 .4em; max-width: 16ch; margin-inline: auto; }
.hero__sub { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin: 0 auto 1.5em; }
.hero__trust { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: center; }
.hero__trust span { position: relative; padding-left: 1.5em; font-weight: 600; font-size: .92rem; }
.hero__trust span::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* ---------- Home: sections ---------- */
.home-intro { margin-top: 2rem; }
.home-section { margin-top: 2.5rem; }
.home-section__title { font-size: 1.5rem; border-top: 0; padding-top: 0; margin: 0 0 1rem; }

/* ---------- Home: category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.cat-card { display: flex; flex-direction: column; gap: .2em; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; background: #fff; color: var(--text); text-decoration: none; position: relative; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.cat-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card__title { font-weight: 700; font-size: 1.15rem; }
.cat-card__sub { color: var(--muted); font-size: .88rem; }
.cat-card__arrow { position: absolute; top: 1.1rem; right: 1.1rem; color: var(--primary); font-weight: 700; }

@media (max-width: 760px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero__title { font-size: 1.9rem; }
  .hero__sub { font-size: 1.05rem; }
}

/* ---------- Affiliate notice ---------- */
.affiliate-notice { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9em 1.1em; font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3rem; padding: 2.5rem 0 1.5rem; }
.site-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.site-footer__about { font-size: .9rem; color: var(--muted); max-width: 38ch; }
.site-footer__col h3 { font-size: .95rem; margin: 0 0 .8em; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col li { margin: .4em 0; }
.site-footer__col a { color: var(--muted); font-size: .9rem; }
.site-footer__col a:hover { color: var(--link); }
.site-footer__bottom { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.site-footer__bottom p { margin: .2em 0; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 3rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .sidebar__sticky { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
  .nav-toggle { display: flex; }
  .site-nav { position: fixed; inset: 64px 0 auto 0; background: #fff; border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav__list { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; }
  .site-nav__list li { border-bottom: 1px solid var(--border); }
  .site-nav__list a { display: block; padding: .8em 0; }
  .site-footer__cols { grid-template-columns: 1fr; gap: 1.5rem; }
}
