/*
Theme Name: Cashflow Theme
Theme URI: https://example.com/cashflow-theme
Description: Schlankes, schnelles Affiliate-/Ratgeber-Theme fuer das Cashflow-System. Mobile-first, SEO-optimiert (semantisches HTML5, Schema.org, schnelle Core Web Vitals), Markenfarben ueber den Customizer. Arbeitet mit Gutenberg, Kadence Blocks und dem Plugin "Cashflow Produktboxen".
Version: 1.2.2
Requires at least: 6.0
Requires PHP: 7.4
Author: Cashflow-System
Text Domain: cashflow-theme
Tags: blog, affiliate, one-column, custom-colors, custom-menu, featured-images, threaded-comments, block-styles, wide-blocks
*/

/* ---- Marken-Variablen (werden aus dem Customizer ueberschrieben) ---------- */
:root{
  /* Palette vom Design-Agenten entschieden: aus Konkurrenz-Analyse der Nische
     (Spy-Gewinnerfarben Gruen) + Farbpsychologie, WCAG-AA-geprueft (4.9:1). */
  --brand:#228142;        /* Primaer = Detox-Gruen (Natur/Gesundheit/Vertrauen) */
  --accent:#29c7ad;       /* Akzent = Teal (Analog-Harmonie) */
  --ink:#313131;          /* Text = wie Divi-Text */
  --muted:#5a5a68;        /* Sekundaertext */
  --line:#e4ece7;         /* Linien */
  --bg:#ffffff;           /* Hintergrund */
  --soft:#f2f8f4;         /* leichte Flaeche (leicht gruenlich) */
  --dark:#15321f;         /* dunkles Gruen (Ueberschriften/Fusszeile) */
  --maxw:46rem;           /* Lesebreite */
  --radius:12px;
}

/* ---- Reset / Basis (mobile-first) ---------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:1.0625rem;line-height:1.7;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none}
a:hover,a:focus{text-decoration:underline}
h1,h2,h3,h4{line-height:1.25;font-weight:800;margin:1.8em 0 .5em}
h1{font-size:1.9rem}h2{font-size:1.45rem}h3{font-size:1.2rem}
p,ul,ol,table{margin:0 0 1.1em}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* ---- Layout -------------------------------------------------------------- */
.container{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 1.1rem}
.site-header{border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg);z-index:10}
.site-header .container{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:64px}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:800;font-size:1.15rem;color:var(--ink)}
.brand:hover{text-decoration:none}
.brand .mark{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--brand);color:#fff;font-weight:900}
.main-nav ul{display:flex;gap:1.1rem;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.main-nav a{color:var(--ink);font-weight:600;font-size:.98rem}

/* ---- Inhalt -------------------------------------------------------------- */
.site-main{padding:1.6rem 0 2.5rem}
.entry-title{margin-top:.2em}
.entry-meta{color:var(--muted);font-size:.9rem;margin-bottom:1.2rem}
.entry-content>*{max-width:100%}
.entry-content img{border-radius:var(--radius);margin:1.2rem auto}
.entry-content figure{margin:1.2rem 0}
blockquote{border-left:4px solid var(--brand);margin:1.2rem 0;padding:.4rem 1rem;background:var(--soft);border-radius:0 var(--radius) var(--radius) 0}
table{width:100%;border-collapse:collapse;display:block;overflow-x:auto}
th,td{border:1px solid var(--line);padding:.6rem .7rem;text-align:left}
th{background:var(--soft)}

/* ---- Breadcrumbs (SEO) --------------------------------------------------- */
.breadcrumbs{font-size:.85rem;color:var(--muted);margin:.4rem 0 1rem}
.breadcrumbs a{color:var(--muted)}
.breadcrumbs span[aria-current]{color:var(--ink)}

/* ---- Buttons / CTA ------------------------------------------------------- */
.btn,.wp-block-button__link{display:inline-block;background:var(--brand);color:#fff !important;
  font-weight:700;padding:.7rem 1.2rem;border-radius:var(--radius);text-decoration:none}
.btn:hover,.wp-block-button__link:hover{filter:brightness(1.07);text-decoration:none}

/* ---- Autor-Box (aus Branding 2.4) ---------------------------------------- */
.autor-box{background:var(--soft);border:1px solid var(--line);border-radius:var(--radius);
  padding:1.1rem 1.2rem;margin:2rem 0}
.autor-box h3{margin-top:0}

/* ---- Karten / Listen (Startseite) ---------------------------------------- */
.card-list{display:grid;gap:1rem;grid-template-columns:1fr;padding:0;list-style:none}
.card{border:1px solid var(--line);border-radius:var(--radius);padding:1rem 1.1rem;background:var(--bg)}
.card h2{margin:.1em 0 .3em;font-size:1.15rem}
.card p{color:var(--muted);margin:0}

/* ---- Footer -------------------------------------------------------------- */
.site-footer{border-top:1px solid var(--line);padding:1.6rem 0;color:var(--muted);font-size:.9rem}
.site-footer a{color:var(--muted)}

/* ---- Groessere Screens --------------------------------------------------- */
@media (min-width:600px){
  h1{font-size:2.3rem}h2{font-size:1.7rem}
  .card-list{grid-template-columns:1fr 1fr}
}
@media (min-width:900px){
  :root{--maxw:46rem}
}

/* ---- Barrierefreiheit / Reduced Motion ----------------------------------- */
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
.skip-link{position:absolute;left:-999px}
.skip-link:focus{left:1rem;top:.5rem;background:#fff;padding:.5rem 1rem;border-radius:8px;z-index:100}

/* ---- Plugin-Ersatz: aehnliche Beitraege + Teilen-Buttons ----------------- */
.cashflow-related{margin:2.5rem 0 1rem;padding-top:1.25rem;border-top:1px solid var(--line,#e5e7eb)}
.cashflow-related h2{font-size:1.25rem;margin:0 0 .6rem}
.cashflow-related ul{list-style:none;margin:0;padding:0;display:grid;gap:.4rem}
.cashflow-related a{text-decoration:none;font-weight:600;color:var(--brand,#1f6d4a)}
.cashflow-related a:hover{text-decoration:underline}
.cashflow-share{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:1.25rem 0}
.cashflow-share span{font-weight:600}
.cashflow-share a{text-decoration:none;font-size:.9rem;padding:.35rem .8rem;border:1px solid var(--line,#e5e7eb);border-radius:999px;color:inherit}
.cashflow-share a:hover{border-color:var(--brand,#1f6d4a);color:var(--brand,#1f6d4a)}

/* ---- Amazon-Produktbox + Vergleichstabelle (Theme-eigen) ----------------- */
.cashflow-produkt{position:relative;display:flex;gap:1rem;border:1px solid var(--line,#e5e7eb);border-radius:12px;padding:1rem 1.2rem;margin:1.5rem 0;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.cashflow-produkt .cf-bild{width:120px;height:120px;object-fit:contain;flex:none}
.cashflow-produkt .cf-body{flex:1;min-width:0}
.cashflow-produkt h3{margin:0 0 .4rem;font-size:1.15rem}
.cashflow-produkt ul{margin:.2rem 0 .6rem;padding-left:1.1rem;font-size:.95rem}
.cashflow-produkt .cf-preis{font-weight:700;margin:.3rem 0}
.cashflow-produkt .cf-badge{position:absolute;top:-10px;left:16px;background:var(--accent,#b9852b);color:#fff;font-size:.75rem;font-weight:700;padding:2px 10px;border-radius:999px}
.cf-btn{display:inline-block;background:var(--brand,#1f6d4a);color:#fff;text-decoration:none;font-weight:700;padding:.6rem 1.3rem;border-radius:8px}
.cf-btn:hover{filter:brightness(1.08)}
.cashflow-vergleich table{width:100%;border-collapse:collapse}
.cashflow-vergleich th,.cashflow-vergleich td{border:1px solid var(--line,#e5e7eb);padding:.6rem .8rem;text-align:left}
.cashflow-vergleich thead th{background:var(--brand,#1f6d4a);color:#fff}
.cashflow-vergleich a{background:var(--brand,#1f6d4a);color:#fff;padding:.35rem .8rem;border-radius:7px;text-decoration:none;font-size:.9rem;font-weight:600}
@media(max-width:560px){.cashflow-produkt{flex-direction:column}.cashflow-produkt .cf-bild{width:100%;height:auto}}
