/*
 * Design "Warm & Vertrauensvoll" (Phase 3), abgestimmt anhand des Layout-Canvas vom 13.09.
 * Siehe planung/03 - technisches-konzept.md für den konzeptionellen Hintergrund.
 */

/*
 * Lora & Nunito Sans lokal gehostet statt via Google-Fonts-CDN nachgeladen
 * (siehe planung/06 - roadmap-und-offene-punkte.md: vermeidet IP-Übertragung an Google).
 * Beide sind Variable Fonts - je Subset (latin/latin-ext) genügt eine Datei für alle
 * benötigten Schriftschnitte, daher font-weight als Bereich.
 */
@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('./fonts/lora-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('./fonts/lora-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('./fonts/nunito-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('./fonts/nunito-sans-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --color-bg: oklch(97% 0.015 75);
    --color-surface: oklch(99% 0.008 75);
    --color-border: oklch(90% 0.02 70);
    --color-text: oklch(28% 0.02 50);
    --color-muted: oklch(50% 0.02 50);
    --color-accent: oklch(60% 0.13 40);
    --color-accent-dark: oklch(52% 0.13 40);
    --color-soon-bg: oklch(94% 0.02 150);
    --color-soon-text: oklch(40% 0.06 150);
    --radius: 20px;
    --radius-sm: 14px;
    --shadow-card: 0 8px 24px oklch(40% 0.05 40 / 0.10);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Lora', Georgia, serif;
    margin: 0;
}

a {
    color: var(--color-accent-dark);
}

/* ---------- Header ---------- */

.site-header {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 2rem;
    border-bottom: 1px solid var(--color-border);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text);
}

.site-logo svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
}

.main-nav a,
.main-nav span {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.main-nav a.is-active {
    color: var(--color-accent);
    font-weight: 700;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--color-accent);
}

.main-nav .badge {
    margin-left: 0.3rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--color-soon-bg);
    color: var(--color-soon-text);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Partner-Shops: keine Nische, deshalb als farbiger Pill-Link ganz rechts abgesetzt */
.main-nav a.nav-partner {
    margin-left: 0.5rem;
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    border-bottom: 0;
}

.main-nav a.nav-partner:hover,
.main-nav a.nav-partner.is-active {
    background: var(--color-accent-dark);
    color: white;
    padding-bottom: 0.35rem;
    border-bottom: 0;
}

/* ---------- Main / layout ---------- */

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

main.main-wide {
    max-width: 1180px;
}

/* ---------- Homepage ---------- */

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    max-width: 720px;
    margin: 0 auto 1rem;
}

.hero h1 .accent {
    color: var(--color-accent);
}

.hero p {
    max-width: 520px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--color-muted);
}

.niches-heading {
    font-size: 1.3rem;
    margin-bottom: 1.1rem;
}

.niche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.1rem;
}

.niche-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1.3rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
}

a.niche-card {
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.niche-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px oklch(40% 0.05 40 / 0.14);
}

.niche-card.is-coming-soon {
    opacity: 0.78;
}

.niche-card h2 {
    font-size: 1.05rem;
    line-height: 1.3;
}

.niche-card p {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0;
}

.niche-card .badge {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--color-soon-bg);
    color: var(--color-soon-text);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Ratgeber-Block über den Themenwelten (planung/08) */
.guide-block {
    margin-bottom: 3rem;
}

.guide-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.7rem;
}

.guide-list a,
.related a {
    display: block;
    height: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.4;
    transition: border-color 0.15s ease;
}

.guide-list a:hover,
.related a:hover {
    border-color: var(--color-accent);
}

.guide-more {
    margin: 0.9rem 0 0;
    font-weight: 700;
}

/* Kurzvorstellung des Autors, verlinkt auf /ueber-mich */
.about-teaser {
    max-width: 720px;
    margin: 3.5rem auto 0;
    padding: 1.5rem 1.6rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.about-teaser h2 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.about-teaser p {
    margin: 0 0 0.6rem;
}

.about-teaser p:last-child {
    margin: 0;
    font-weight: 700;
}

/* ---------- Article ---------- */

.breadcrumb {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--color-muted);
    font-weight: 700;
    text-decoration: none;
}

.breadcrumb .current {
    color: var(--color-text);
    font-weight: 700;
}

.article h1 {
    max-width: 800px;
    margin: 0 auto 0.75rem;
    font-size: 2.1rem;
    line-height: 1.25;
    text-align: center;
}

.excerpt {
    max-width: 620px;
    margin: 0 auto 1.5rem;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
    text-align: center;
    color: var(--color-accent-dark);
}

/* Zwei-Spalten-Layout: Hauptinhalt + Sidebar mit weiterführenden Artikeln.
   Auf schmalen Screens erscheint die Sidebar VOR dem Fließtext (grid-template-areas),
   damit sie nicht erst nach langem Scrollen sichtbar wird. */
.article-layout {
    display: grid;
    grid-template-areas: "sidebar" "content";
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

.article-layout .article-main {
    grid-area: content;
    min-width: 0;
}

.article-layout .article-sidebar {
    grid-area: sidebar;
}

@media (min-width: 860px) {
    .article-layout {
        grid-template-areas: "content sidebar";
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 2.75rem;
        align-items: start;
    }

    .article-sidebar {
        position: sticky;
        top: 1.5rem;
    }
}

.content {
    font-size: 1.03rem;
    line-height: 1.75;
}

.content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

.content p {
    margin: 0 0 1rem;
}

.content ul,
.content ol {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content ul li,
.content ol li {
    position: relative;
    margin: 0;
    padding: 0.65rem 1.1rem 0.65rem 2.4rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.content ul li::before {
    content: "";
    position: absolute;
    left: 1.05rem;
    top: 1.05rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--color-accent);
}

.content ol {
    counter-reset: content-ol;
}

.content ol li {
    counter-increment: content-ol;
    padding-left: 2.7rem;
}

.content ol li::before {
    content: counter(content-ol);
    position: absolute;
    left: 0.65rem;
    top: 0.5rem;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content table {
    width: 100%;
    margin: 0.5rem 0 1.75rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    font-size: 0.92rem;
}

.content thead th {
    background: var(--color-accent);
    color: white;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1.1rem;
}

.content tbody td {
    padding: 0.7rem 1.1rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text);
}

.content tbody tr:nth-child(even) td {
    background: var(--color-surface);
}

.content tbody tr:hover td {
    background: oklch(93% 0.03 60);
}

@media (max-width: 480px) {
    .content table {
        font-size: 0.82rem;
    }

    .content thead th,
    .content tbody td {
        padding: 0.5rem 0.6rem;
    }
}

.draft-hint {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: oklch(94% 0.04 60);
    color: var(--color-accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.products {
    margin: 1.5rem 0 2rem;
}

.products h2,
.faq h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.product-list {
    display: grid;
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.3rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.product-body {
    flex: 1 1 280px;
}

.product-card .role {
    display: inline-block;
    margin: 0 0 0.4rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.product-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.product-card .pros {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0;
}

.product-card .cons {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin: 0.5rem 0 0;
    font-style: italic;
}

.cta {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.affiliate-disclosure {
    margin: 0.9rem 0 0;
    font-size: 0.78rem;
    color: var(--color-muted);
}

.faq {
    margin-top: 2.5rem;
}

.faq details {
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.faq summary {
    font-weight: 700;
    cursor: pointer;
}

.faq p {
    margin: 0.6rem 0 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* „Passend dazu“: Querverweise zwischen Ratgeber und Nischen (src/Related.php) */
.related {
    margin-top: 2.5rem;
}

.related h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.related ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.author-box {
    margin-top: 2.5rem;
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 0.92rem;
}

.author-box p {
    margin: 0;
    color: var(--color-muted);
}

.author-box .author-name {
    margin-bottom: 0.35rem;
    color: var(--color-text);
    font-weight: 800;
}

.author-box a {
    font-weight: 700;
}

/* Futterrechner (templates/_futterrechner.php) */
.calculator {
    margin: 1.5rem 0 2rem;
    padding: 1.4rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.calculator .calculator-title {
    margin: 0 0 1rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.calculator-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.calculator label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.calculator input,
.calculator select {
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font: inherit;
    font-weight: 400;
    color: var(--color-text);
}

.calculator .calculator-result {
    margin: 1.2rem 0 0.6rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-accent-dark);
}

.calculator .calculator-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-muted);
}

.article-sidebar {
    padding: 1.4rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.article-sidebar h2 {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.article-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.article-sidebar a {
    display: block;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.4;
    transition: border-color 0.15s ease;
}

.article-sidebar a:hover {
    border-color: var(--color-accent);
}

/* ---------- 404 ---------- */

.not-found {
    text-align: center;
    padding: 3rem 0;
}

.not-found h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

/* ---------- Static pages (Impressum/Datenschutz) ---------- */

.static-page h1 {
    font-size: 1.9rem;
    margin-bottom: 1.25rem;
}

.static-page h2 {
    font-size: 1.2rem;
    margin: 1.75rem 0 0.5rem;
}

.static-page p {
    margin: 0 0 0.9rem;
}

.static-page .about-lead {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-accent-dark);
}

.placeholder-hint {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: oklch(94% 0.04 60);
    color: var(--color-accent-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---------- Partner-Shops ---------- */

.partner-kicker {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.partner-intro {
    color: var(--color-muted);
    margin-bottom: 1.75rem;
}

.partner-card {
    border-left: 5px solid var(--color-accent);
}

.partner-card h2 {
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}

.partner-niches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0.8rem 0 0;
    font-size: 0.82rem;
}

.partner-niches-label {
    color: var(--color-muted);
    font-weight: 600;
}

.partner-niche {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.partner-niche:hover {
    border-color: var(--color-accent);
}

.partner-role {
    color: var(--color-muted);
    font-weight: 500;
}

.partner-role::before {
    content: "·";
    margin-right: 0.4rem;
}

.partner-empty {
    color: var(--color-muted);
}

/* ---------- Footer (sticky) ---------- */

.site-footer {
    flex-shrink: 0;
    margin-top: 3rem;
    border-top: 1px solid var(--color-border);
    padding: 1.6rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-muted);
    text-decoration: none;
}

/* ---------- Cookie-/Consent-Banner ---------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(calc(100% - 2rem), 900px);
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px oklch(30% 0.04 50 / 18%);
    animation: cookieSlideUp 0.3s ease-out;
}

@keyframes cookieSlideUp {
    from { transform: translate(-50%, 1rem); opacity: 0; }
    to   { transform: translate(-50%, 0);    opacity: 1; }
}

.cookie-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem 1.5rem;
}

.cookie-text {
    flex: 1 1 320px;
    font-size: 0.9rem;
}

.cookie-text strong {
    display: block;
    margin-bottom: 0.25rem;
}

.cookie-text p {
    margin: 0;
    color: var(--color-muted);
}

.cookie-buttons {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.cookie-buttons button {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-accept {
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: white;
}

.btn-accept:hover {
    background: var(--color-accent-dark);
}

.btn-reject {
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-muted);
}
