/* leasings.de – Frontend-Design
   Handgeschrieben, kein Build-Step nötig (Shared-Hosting-freundlich).
   Markenfarbe zentral über --accent anpassbar. */

:root {
    --ink: #0d1526;
    --text: #1d2739;
    --muted: #5b667a;
    --faint: #aab3c2;
    --bg: #ffffff;
    --surface: #f5f7fb;
    --surface-2: #eef2f8;
    --line: #e3e8f0;
    --accent: #1f5eff;
    --accent-ink: #17203a;
    --accent-soft: #e8eeff;
    --success: #12925a;
    --success-soft: #e2f4ec;
    --warning: #b7791f;
    --danger: #d64545;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
    --container: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 2.2rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .3em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .98rem;
    padding: 12px 20px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
    transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
    box-shadow: 0 4px 14px rgba(31, 94, 255, .28);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); box-shadow: 0 6px 20px rgba(31, 94, 255, .36); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); filter: none; box-shadow: none; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-weight: 900; font-size: 1.35rem; color: var(--ink); letter-spacing: -.03em; }
.logo b { color: var(--accent); }
.main-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--text); font-weight: 600; font-size: .96rem; position: relative; padding: 4px 0; }
.main-nav a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
    background: var(--accent); transition: right .2s ease;
}
.main-nav a:hover { text-decoration: none; }
.main-nav a:hover::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(1200px 400px at 80% -10%, var(--accent-soft), transparent 60%),
        linear-gradient(180deg, var(--surface), var(--bg));
    border-bottom: 1px solid var(--line);
    padding: 56px 0 44px;
}
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; margin: 0 0 22px; }
.hero .brand-pills { margin-top: 26px; }
/* 404-Seite: alles zentriert */
.error-404 { text-align: center; }
.error-404__emoji { font-size: 3.6rem; line-height: 1; margin-bottom: 10px; }
.error-404 p.lead { margin-left: auto; margin-right: auto; }
.error-404 .hero-search { margin-left: auto; margin-right: auto; }
.error-404 .brand-pills { justify-content: center; }

/* ---------- Pills / chips ---------- */
.brand-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 16px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
    transition: border-color .15s, transform .08s;
}
.pill:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }

main { padding: 40px 0 64px; }
/* Full-Bleed-Hero bündig an den Header ziehen (kein weißer Streifen über dem Hero). */
main > .hero:first-child { margin-top: -40px; }
/* Mit oberem Banner: Hero-Verlauf entfernen (sonst erzeugt seine Oberkante direkt
   unter dem Banner eine sichtbare Linie) + etwas Abstand. Nur Desktop (Banner nur dort). */
@media (min-width: 1024px) {
    main.lz-hastop > .hero:first-child { margin-top: -24px; padding-top: 8px; background: none; }
}
section { margin-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--offers { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Offer card ---------- */
.offer {
    position: relative; display: flex; flex-direction: column;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.offer:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d3dbe8; }
.offer__media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.offer__media img { width: 100%; height: 100%; object-fit: cover; }
.offer__body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.offer__top { display: flex; gap: 8px; flex-wrap: wrap; align-content: flex-start; min-height: 23px; margin-bottom: 10px; }
.tag { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--accent-ink); }
.tag--brand { background: var(--accent-soft); color: var(--accent); }
.tag--new { background: var(--success-soft); color: var(--success); }
.tag--used { background: var(--surface-2); color: var(--muted); }
.ribbon {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    background: #1f5eff; color: #fff; font-size: .72rem; font-weight: 800;
    padding: 5px 11px; border-radius: 999px; letter-spacing: .02em;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.offer h3 { margin: 0 0 2px; }
.offer__provider { color: var(--muted); font-size: .9rem; }
.offer__price { margin: 14px 0 4px; }
.offer__price .rate { font-size: 1.9rem; font-weight: 900; color: var(--ink); letter-spacing: -.02em; }
.offer__price .per { color: var(--muted); font-weight: 600; }
.offer__lf { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 14px; font-size: .86rem; font-weight: 700; }
.lf-badge { padding: 2px 9px; border-radius: 999px; }
.lf-badge--good { background: var(--success-soft); color: var(--success); }
.lf-badge--mid { background: #fdf0dd; color: var(--warning); }
.lf-badge--high { background: #fbe4e4; color: var(--danger); }
.offer__specs { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: .88rem; }
.offer__specs li { display: flex; flex-direction: column; gap: 1px; min-width: 0; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.offer__specs .k { color: var(--muted); font-size: .78rem; }
.offer__specs .v { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
/* Verbrauch/CO₂ (Pflichtangabe): winzig & hellgrau, tuckt sich unter die Fahrzeugdaten. */
.offer__consumption { margin: -6px 0 0; font-size: .68rem; line-height: 1.4; color: var(--faint); font-weight: 400; }
.offer .btn { margin-top: auto; }
.offer__consumption + .btn { margin-top: 14px; }

/* ---------- Post card ---------- */
.post-card {
    display: flex; flex-direction: column; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card__media { aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 18px; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
.post-card time { color: var(--muted); font-size: .84rem; }

/* ---------- Article / prose ---------- */
.article-head { margin-bottom: 24px; }
.article-head .meta { color: var(--muted); font-size: .92rem; margin-top: 8px; }
.article-cover { width: 100%; border-radius: var(--radius); margin: 8px 0 24px; box-shadow: var(--shadow); }
.prose { max-width: 720px; font-size: 1.06rem; line-height: 1.75; color: var(--text); }
.prose--wide { max-width: none; }
/* Lange Redaktionstexte (Startseite/Marken): volle Breite, ab Desktop 2 Spalten
   für augenfreundliche Zeilenlänge trotz voller Breite. */
.prose--cols { max-width: none; }
@media (min-width: 900px) {
    .prose--cols .prose__content { column-count: 2; column-gap: 44px; }
    .prose--cols .prose__content > :first-child { margin-top: 0; }
    .prose--cols :is(h2, h3, li, blockquote, table, img) { break-inside: avoid; }
}
.prose--cols.prose--collapsible:not(.is-open) .prose__content { max-height: 180px; }
.prose--collapsible { position: relative; }
.prose--collapsible .prose__content { position: relative; overflow: hidden; }
.prose__content > *:first-child { margin-top: 0; }
.prose--collapsible:not(.is-open) .prose__content { max-height: 120px; }
.prose--collapsible:not(.is-open) .prose__content::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
    background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none;
}
.prose__toggle {
    margin-top: 16px; display: inline-block; background: none; cursor: pointer;
    border: 1px solid var(--line); border-radius: 999px; padding: 8px 20px;
    font-family: inherit; font-size: .92rem; font-weight: 700; color: var(--accent);
    transition: border-color .15s ease, background .15s ease;
}
.prose__toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-size: 1.5rem; line-height: 1.25; margin: 1.9em 0 .5em; }
.prose h3 { font-size: 1.2rem; line-height: 1.3; margin: 1.6em 0 .4em; }
.prose strong, .prose b { color: var(--ink); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.2em 0; padding: .4em 1.1em; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 6px; color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface); }

/* ---------- Pagination ---------- */
.pagination-nav { margin-top: 8px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 24px 0 0; }
.pagination a, .pagination span { display: inline-block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-weight: 600; }
.pagination a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.pagination .is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .is-disabled { color: var(--muted); opacity: .5; }
.pagination .is-dots { border-color: transparent; color: var(--muted); }
.pagination-info { color: var(--muted); font-size: .9rem; margin: 12px 0 0; }
.pagination-info strong { color: var(--text); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 56px; padding: 40px 0 28px; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer .logo { display: inline-block; margin-bottom: 8px; }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--text); }
.site-footer .legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .site-header .container { height: 58px; gap: 14px; }
    .main-nav { gap: 14px; }
    .site-footer .cols { grid-template-columns: 1fr; gap: 20px; }
    .offer__specs { gap: 9px 12px; }
}

/* ---------- Dark mode ---------- */
/* Gilt automatisch bei System-Dunkelmodus (außer manuell auf Hell gestellt)
   UND wenn per Umschalter data-theme="dark" gesetzt ist. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #f1f4fa; --text: #cdd5e2; --muted: #8a94a6; --faint: #5c6675;
        --bg: #0e131c; --surface: #151b26; --surface-2: #1b2330; --line: #262f3d;
        --accent: #5b8bff; --accent-ink: #cdd9ff; --accent-soft: #1a2740;
        --success: #34d399; --success-soft: #10231c; --warning: #d9a441; --danger: #f07171;
        --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
        --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
    }
    :root:not([data-theme="light"]) .site-header { background: rgba(14, 19, 28, .82); }
    :root:not([data-theme="light"]) .lf-badge--mid { background: #2a2110; }
    :root:not([data-theme="light"]) .lf-badge--high { background: #2e1616; }
}
:root[data-theme="dark"] {
    --ink: #f1f4fa; --text: #cdd5e2; --muted: #8a94a6; --faint: #5c6675;
    --bg: #0e131c; --surface: #151b26; --surface-2: #1b2330; --line: #262f3d;
    --accent: #5b8bff; --accent-ink: #cdd9ff; --accent-soft: #1a2740;
    --success: #34d399; --success-soft: #10231c; --warning: #d9a441; --danger: #f07171;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}
:root[data-theme="dark"] .site-header { background: rgba(14, 19, 28, .82); }
:root[data-theme="dark"] .lf-badge--mid { background: #2a2110; }
:root[data-theme="dark"] .lf-badge--high { background: #2e1616; }

/* ---------- Theme-Umschalter (Hell/Dunkel) ---------- */
.theme-toggle {
    display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
    color: var(--ink); cursor: pointer; padding: 0;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { display: block; }

/* ---------- Hamburger / Mobile-Navigation ---------- */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Formularfelder (Frontend) ---------- */
.search-page input[type="search"],
.search-page select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); font-size: .95rem; font-family: inherit;
}
.search-page select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.search-page input:focus, .search-page select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* ---------- Wunsch-Chips ---------- */
.wishes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 22px; }
.wishes__label { font-weight: 700; color: var(--muted); font-size: .9rem; }

/* ---------- Such-Layout ---------- */
.filter-btn { display: none; }
.search-layout { display: grid; grid-template-columns: 262px 1fr; gap: 26px; align-items: start; }
.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg); box-shadow: var(--shadow); position: sticky; top: 80px; }
.filters__group { margin-bottom: 16px; }
.filters__label { display: block; font-weight: 700; font-size: .85rem; color: var(--ink); margin-bottom: 6px; }
.filters__checks { display: flex; flex-direction: column; gap: 7px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .93rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.filters .btn { margin-top: 4px; }
.filters__reset { display: block; text-align: center; margin-top: 12px; font-size: .9rem; color: var(--muted); }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.results-head strong { font-size: 1.15rem; color: var(--ink); }
.results-sort { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.results-sort select { width: auto; }
.empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 0 0 14px; }
.pagination-wrap { margin-top: 28px; }

/* ---------- Marken-Übersicht (/marken) ---------- */
.az-index {
    position: sticky; top: 65px; z-index: 40;
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 12px 0; margin-top: 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
}
.az-index a, .az-index span {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    font-weight: 800; font-size: .92rem;
}
.az-index a { color: var(--accent); background: var(--accent-soft); }
.az-index a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.az-index span { color: var(--muted); opacity: .3; cursor: default; }
.brand-section { scroll-margin-top: 120px; margin-top: 34px; }
.brand-letter {
    font-size: 1.6rem; font-weight: 900; color: var(--ink); letter-spacing: -.01em;
    margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line);
}
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; margin-top: 8px; }
.brand-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    text-align: center; padding: 26px 18px; min-height: 150px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); text-decoration: none; }
.brand-card__logo { height: 54px; display: grid; place-items: center; }
.brand-card__logo img { max-height: 54px; max-width: 130px; object-fit: contain; }
.brand-card__initial { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 1.4rem; }
.brand-card__name { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.brand-card__count { font-size: .82rem; color: var(--muted); }

/* ---------- Werbung / Ads ---------- */
/* "Anzeige"-Kennzeichnung über jedem Slot (Werbekennzeichnung). */
.lz-top__in, .lz-side, .lz-feat, .lz-inline { position: relative; }
.lz-top__in::before, .lz-side::before, .lz-feat::before, .lz-inline::before {
    content: "Anzeige"; display: block; font-size: .62rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
/* Leerer Slot (Ad-Netzwerk hat nicht gefüllt) -> kein einsames „Anzeige"-Label. */
.lz-is-empty::before { content: none !important; }
/* Alle Ad-Slots standardmäßig aus (Mobile) – Ads laden nur auf Desktop */
.lz-top, .lz-side, .lz-feat, .lz-inline { display: none; }
@media (min-width: 1024px) {
    .lz-top { display: block; }
    .lz-top__in { max-width: var(--container); margin: 0 auto; padding: 14px 20px 4px; text-align: center; }
    .lz-feat, .lz-inline { display: block; margin: 26px 0; text-align: center; overflow-x: auto; }
    .lz-feat--top { margin: 0 0 28px; }
}
@media (min-width: 1500px) {
    .lz-side {
        display: block; position: fixed; top: 50%; transform: translateY(-50%);
        width: 160px; z-index: 30; text-align: center;
    }
    /* Direkt an die zentrierte Content-Box andocken (12px Abstand), unabhängig von der Bildschirmbreite. */
    .lz-side--left { right: calc(50% + var(--container) / 2 + 12px); left: auto; }
    .lz-side--right { left: calc(50% + var(--container) / 2 + 12px); right: auto; }
}
/* Sponsored Deal – native Karte im Angebots-Grid (alle Geräte) */
.offer--pick { display: flex; flex-direction: column; }
/* Kein Innen-Padding: eine native Vorlage (offer__media + offer__body) sitzt bündig
   wie eine echte Deal-Karte. Der Rahmen streckt sich im Grid automatisch auf gleiche Höhe. */
.offer--pick__in { display: flex; flex-direction: column; flex: 1; }
/* Ein roher Banner (direktes <img>/<iframe> ohne Vorlagen-Struktur) wird mittig zentriert. */
.offer--pick__in > img { display: block; max-width: 100%; height: auto; margin: auto; }
.offer--pick__in > iframe { display: block; max-width: 100%; margin: auto; }
.ribbon--soft { background: var(--surface-2); color: var(--muted); box-shadow: none; }

/* Optionale Hervorhebung der Sponsored-Karte. Farben kommen als Inline-Variablen
   (--pick-hl hell, --pick-hl-dark dunkel). Bewusst dezent: 1px-Ring + weiches Leuchten,
   im Dunkelmodus stärker. */
.offer.offer--pick--hl { border-color: var(--pick-hl, #dc2626); }
.offer--pick--hl { box-shadow: 0 0 0 1px var(--pick-hl, #dc2626), 0 0 14px -3px var(--pick-hl, #dc2626); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .offer.offer--pick--hl { border-color: var(--pick-hl-dark, #facc15); }
    :root:not([data-theme="light"]) .offer--pick--hl { box-shadow: 0 0 0 1px var(--pick-hl-dark, #facc15), 0 0 22px -1px var(--pick-hl-dark, #facc15); }
}
:root[data-theme="dark"] .offer.offer--pick--hl { border-color: var(--pick-hl-dark, #facc15); }
:root[data-theme="dark"] .offer--pick--hl { box-shadow: 0 0 0 1px var(--pick-hl-dark, #facc15), 0 0 22px -1px var(--pick-hl-dark, #facc15); }

/* Slide-in-Popup (Desktop & Mobil, per JS gesteuert) */
.lz-corner {
    position: fixed; bottom: 20px; z-index: 70; width: 320px; max-width: calc(100vw - 32px);
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 12px;
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.lz-corner.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.lz-corner--right { right: 20px; }
.lz-corner--left { left: 20px; }
.lz-corner__tag { display: block; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.lz-corner__in { overflow: hidden; }
.lz-corner__in img { max-width: 100%; height: auto; }
.lz-corner__x {
    position: absolute; top: -12px; right: -12px; width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
    font-size: 18px; line-height: 1; box-shadow: var(--shadow);
}
.lz-corner__x:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 500px) {
    .lz-corner, .lz-corner--left, .lz-corner--right { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

/* ---------- Nach-oben-Button ---------- */
.to-top {
    position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; color: #fff; background: var(--accent);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s, background .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-2px); filter: brightness(1.06); }
.to-top:active { transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .nav-toggle { display: flex; }
    .theme-toggle { margin-left: auto; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; gap: 0; background: var(--bg);
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 8px 0;
    }
    .main-nav--open { display: flex; }
    .main-nav a { padding: 12px 20px; border-top: 1px solid var(--line); }
    .main-nav a::after { display: none; }

    .search-layout { grid-template-columns: 1fr; }
    .filter-btn { display: inline-flex; margin-bottom: 16px; }
    .filters { display: none; position: static; }
    .filters--open { display: block; }
}

/* ---------- Hero-Suchleiste ---------- */
.hero-search { display: flex; gap: 10px; max-width: 560px; margin: 6px 0; }
.hero-search input { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: 1rem; font-family: inherit; }
.hero-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.hero-search .btn { white-space: nowrap; }
@media (max-width: 560px) {
    .hero-search { flex-direction: column; }
    .hero-search .btn { width: 100%; }
}

/* ---------- Newsletter ---------- */
/* Honeypot: für Menschen unsichtbar (nicht display:none, damit Bots es „sehen"). */
.nl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.nl-form { margin: 0; }
.nl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-input {
    flex: 1; min-width: 0; padding: 13px 16px; font-size: 1rem; font-family: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
}
.nl-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nl-input--err { border-color: var(--danger); }
.nl-submit { white-space: nowrap; }
.nl-err { margin: 8px 0 0; color: var(--danger); font-size: .86rem; font-weight: 600; }
.nl-consent { margin: 10px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }

/* Mobile Inline-Karte in den Deal-Listen (nur 1-Spalten-Ansicht). */
.nl-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--accent-soft), var(--bg));
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow);
}
.nl-card__badge {
    display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
    color: var(--accent); background: var(--bg); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.nl-card__title { margin: 0 0 6px; font-size: 1.2rem; }
.nl-card__text { margin: 0 0 14px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.nl-card .nl-row { flex-direction: column; }
.nl-card .nl-submit { width: 100%; }
/* Ab Tablet/Desktop ausblenden – die Karte ist nur für die mobile Ansicht gedacht. */
@media (min-width: 640px) { .nl-card { display: none; } }

/* Newsletter-Anmeldung im Slide-in-Popup */
.nl-pop__badge { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.nl-pop__title { margin: 0 0 6px; font-size: 1.05rem; }
.nl-pop__text { margin: 0 0 12px; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.nl-pop .nl-row { flex-direction: column; }
.nl-pop .nl-submit { width: 100%; }
.nl-pop .nl-consent { font-size: .68rem; }

/* ---------- Inhaltsverzeichnis (News) ---------- */
.toc { max-width: 720px; margin: 0 0 26px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc__title { margin: 0 0 8px; font-weight: 800; font-size: .95rem; color: var(--ink); }
.toc__list { margin: 0; padding: 0; list-style: none; }
.toc__item { margin: 5px 0; }
.toc__item a { color: var(--accent); text-decoration: none; font-size: .95rem; }
.toc__item a:hover { text-decoration: underline; }
.toc__item--sub { padding-left: 16px; }
.toc__item--sub a { color: var(--muted); font-size: .9rem; }
/* Anker nicht unter dem Sticky-Header verstecken. */
.prose h2, .prose h3 { scroll-margin-top: 84px; }

/* ---------- Feiertags-Logo (nur Schriftzug im Header) ---------- */
.logo__deco { margin-left: 5px; font-size: .82em; vertical-align: baseline; }
.logo--xmas b { color: #c1121f; }
.logo--newyear b { color: #d4af37; }

/* ---------- Eingebettete Marken-Deals in News ---------- */
.news-deals { margin: 30px 0; }
.news-deals__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.news-deals__title { margin: 0; font-size: 1.2rem; }
.news-deals__all { color: var(--accent); font-size: .9rem; white-space: nowrap; }
