/* ============================================================
   fezzMoney – Stylesheet
   Clean / seriös / schnell. Mobile-first, system fonts.
   ============================================================ */

:root {
    --c-bg:        #ffffff;
    --c-bg-alt:    #f6f8fa;
    --c-fg:        #0f172a;
    --c-muted:     #64748b;
    --c-border:    #e5e7eb;
    --c-primary:   #0e7c4a;        /* Grün – Finanz-Vertrauen */
    --c-primary-d: #0a5d38;
    --c-accent:    #1e3a8a;        /* Tiefes Blau */
    --c-warn:      #b45309;
    --c-error:     #b91c1c;
    --c-success:   #047857;

    --shadow-sm:   0 1px 2px rgba(15,23,42,.05);
    --shadow:      0 4px 14px rgba(15,23,42,.08);
    --radius:      .5rem;
    --radius-lg:   .75rem;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Charter", "Iowan Old Style", "Apple Garamond", Georgia, serif;

    --maxw:        72rem;
    --maxw-text:   42rem;
    --sidebar-w:   18rem;
    --gap:         2.5rem;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--c-fg);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    margin: 1.5em 0 .6em;
    color: var(--c-fg);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.5em; }

blockquote {
    margin: 1.5em 0;
    padding: .75em 1.25em;
    border-left: 4px solid var(--c-primary);
    background: var(--c-bg-alt);
    color: var(--c-fg);
    font-style: italic;
}

code, kbd, samp {
    font-family: SFMono-Regular, Consolas, Menlo, monospace;
    background: var(--c-bg-alt);
    padding: .1em .35em;
    border-radius: 4px;
    font-size: .92em;
}
pre {
    background: var(--c-bg-alt);
    padding: 1em;
    border-radius: var(--radius);
    overflow-x: auto;
}
pre code { background: transparent; padding: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
th, td { padding: .6em .8em; border-bottom: 1px solid var(--c-border); text-align: left; }
th { background: var(--c-bg-alt); font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--c-border); margin: 2em 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem; }
.container-text { max-width: var(--maxw-text); margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    background: rgba(255,255,255,.92);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .75rem 1rem;
    max-width: var(--maxw);
    margin: 0 auto;
}
.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--c-fg);
    letter-spacing: -.02em;
}
.site-logo:hover { text-decoration: none; }
.site-logo b { color: var(--c-primary); }

.site-nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--c-fg);
    font-weight: 500;
    font-size: .95rem;
    padding: .25rem 0;
}
.site-nav a:hover { color: var(--c-primary); text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: .5em .75em;
    cursor: pointer;
    font-size: 1.2em;
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--c-bg);
        border-bottom: 1px solid var(--c-border);
        padding: 1rem;
        gap: .5rem;
    }
    .site-nav.is-open { display: flex; }
}

/* Hero */
.hero {
    padding: 3rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--c-bg-alt), var(--c-bg));
    border-bottom: 1px solid var(--c-border);
}
.hero h1 { margin: 0 0 .5em; font-size: clamp(1.875rem, 5vw, 3rem); }
.hero p { color: var(--c-muted); max-width: 40rem; margin: 0 auto; font-size: 1.1rem; }

/* Post-Cards (Listings) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.post-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.post-card-image {
    aspect-ratio: 16 / 9;
    background: var(--c-bg-alt) no-repeat center/cover;
    width: 100%;
}
.post-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-cat {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-primary);
    margin-bottom: .4rem;
}
.post-card-title {
    font-size: 1.15rem;
    margin: 0 0 .4em;
    line-height: 1.35;
}
.post-card-title a { color: var(--c-fg); }
.post-card-title a:hover { color: var(--c-primary); text-decoration: none; }
.post-card-meta {
    font-size: .8rem;
    color: var(--c-muted);
    margin-top: auto;
    padding-top: .8rem;
}
.post-card-excerpt {
    font-size: .95rem;
    color: var(--c-muted);
    margin: 0 0 .8em;
}

/* 2-Spalten-Layout für Beitragsseiten */
.with-sidebar {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: minmax(0,1fr) var(--sidebar-w);
    gap: var(--gap);
    align-items: start;
}
@media (max-width: 900px) {
    .with-sidebar {
        grid-template-columns: 1fr;
    }
}
.with-sidebar .article {
    max-width: 100%;
    padding: 2rem 0 3rem;
    margin: 0;
}

/* Einzel-Artikel */
.article {
    max-width: var(--maxw-text);
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}
.article-header { margin-bottom: 1.5rem; }
.article-cat {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-primary);
    padding: .25rem .6rem;
    border: 1px solid var(--c-primary);
    border-radius: 999px;
    margin-bottom: 1rem;
}
.article-meta {
    color: var(--c-muted);
    font-size: .9rem;
    margin: .5em 0 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.article-featured-image {
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--c-bg-alt);
}
.article-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.article-body {
    font-size: 1.075rem;
    line-height: 1.75;
}
.article-body img {
    margin: 1.5rem 0;
    border-radius: var(--radius);
}
.article-body figure { margin: 1.5rem 0; }
.article-body figcaption {
    font-size: .85rem;
    color: var(--c-muted);
    text-align: center;
    margin-top: .4rem;
}
.article-body h2, .article-body h3 { scroll-margin-top: 5rem; }

/* Datentabellen im Beitrag (statt SVG-Charts) */
.article-body figure {
    margin: 2rem 0;
}
.article-body .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
}
.article-body .data-table caption {
    text-align: left;
    padding: .75rem 1rem;
    font-size: .85rem;
    color: var(--c-muted);
    background: var(--c-bg-alt);
    caption-side: bottom;
    border-top: 1px solid var(--c-border);
}
.article-body .data-table thead th {
    background: var(--c-fg);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: .6rem .8rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.article-body .data-table tbody td {
    padding: .65rem .8rem;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
}
.article-body .data-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Globaler Rechts-Hinweis am Beitragsende */
.post-disclaimer {
    margin: 2.5rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--c-bg-alt);
    border-left: 4px solid var(--c-muted);
    border-radius: var(--radius);
    font-size: .85rem;
    line-height: 1.6;
    color: var(--c-muted);
}
.post-disclaimer p {
    margin: 0 0 .8em;
}
.post-disclaimer p:last-child {
    margin-bottom: 0;
}
.post-disclaimer strong {
    color: var(--c-fg);
}

.article-share {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
    padding-top: 2rem;
    position: sticky;
    top: 5rem;
    align-self: start;
}
@media (max-width: 900px) {
    .sidebar { position: static; padding-top: 0; }
}
.sidebar-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--c-border);
}
.sidebar-block:last-child { border-bottom: 0; }
.sidebar-heading {
    margin: 0 0 .8rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-muted);
    font-weight: 700;
}
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-list li {
    margin: 0 0 .8rem;
}
.sidebar-list a {
    display: flex;
    gap: .75rem;
    color: var(--c-fg);
    line-height: 1.35;
    align-items: flex-start;
}
.sidebar-list a:hover {
    text-decoration: none;
    color: var(--c-primary);
}
.sidebar-thumb {
    flex: 0 0 4rem;
    height: 3rem;
    background: var(--c-bg-alt) no-repeat center/cover;
    border-radius: 4px;
}
.sidebar-text {
    flex: 1 1 auto;
    min-width: 0;
}
.sidebar-cat {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-primary);
    margin-bottom: .15rem;
}
.sidebar-title {
    display: block;
    font-size: .9rem;
    font-weight: 500;
}
.sidebar-date {
    display: block;
    font-size: .75rem;
    color: var(--c-muted);
    margin-top: .15rem;
}
.sidebar-list-tags li {
    display: inline-block;
    margin: 0 .25rem .25rem 0;
}
.sidebar-list-tags a {
    display: inline-block;
    padding: .25rem .6rem;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    font-size: .85rem;
}
.sidebar-count {
    color: var(--c-muted);
    font-size: .8em;
}

/* Related */
.related {
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
}
.related h2 { margin-bottom: 1rem; font-size: 1.4rem; }

/* AdSense-Slots: reservierter Platz gegen CLS */
.ad-slot {
    margin: 2.5rem auto;
    text-align: center;
    background: var(--c-bg-alt);
    border-radius: var(--radius);
    overflow: hidden;
}
/* Zwei aufeinanderfolgende Ads bekommen mehr Abstand,
   damit sie nicht wie ein "Werbeblock" wirken. */
.ad-slot + .ad-slot {
    margin-top: 4rem;
    border-top: 1px dashed var(--c-border);
    padding-top: 1rem;
}
.ad-slot::before {
    content: "Anzeige";
    display: block;
    font-size: .7rem;
    color: var(--c-muted);
    text-align: center;
    padding: .25rem 0 0;
}
.ad-slot-header { max-width: 728px; min-height: 90px; }
.ad-slot-in_article { max-width: var(--maxw-text); }
.ad-slot-after_intro { max-width: var(--maxw-text); }
.ad-slot-sidebar { max-width: 300px; min-height: 250px; }
.ad-slot-footer { max-width: var(--maxw); min-height: 90px; }

/* Pagination */
.pagination {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: .5rem .8rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-fg);
    background: var(--c-bg);
    font-size: .9rem;
}
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); text-decoration: none; }
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Suche */
.search-form {
    display: flex;
    gap: .5rem;
    max-width: 30rem;
    margin: 1rem auto;
}
.search-form input[type="search"] {
    flex: 1;
    padding: .6em .9em;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--c-bg);
}
.search-form button {
    padding: .6em 1.2em;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
}

/* Footer */
.site-footer {
    background: var(--c-bg-alt);
    border-top: 1px solid var(--c-border);
    margin-top: 3rem;
    padding: 2rem 1rem;
    color: var(--c-muted);
    font-size: .9rem;
}
.site-footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 2rem;
}
.site-footer h4 {
    margin: 0 0 .8em;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-fg);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .25em 0; }
.site-footer a { color: var(--c-muted); }
.site-footer a:hover { color: var(--c-primary); }
.site-footer-bottom {
    max-width: var(--maxw);
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .85rem;
}

/* Diverse Hilfsklassen */
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }
.btn {
    display: inline-block;
    padding: .6em 1.2em;
    background: var(--c-primary);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    border: 0;
    cursor: pointer;
    font-size: 1rem;
}
.btn:hover { background: var(--c-primary-d); text-decoration: none; color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--c-primary);
    border: 1px solid var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary); color: #fff; }

/* Skip-to-Content für Screen Reader */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--c-primary);
    color: #fff;
    padding: .5em 1em;
    z-index: 100;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0s !important; transition: none !important; }
}
