/* ═══════════════════════════════════════════════════
   Schluttenbacher Blog – Styles
   Nutzt CSS-Variablen der Hauptseite
   ═══════════════════════════════════════════════════ */

:root {
    --orange:       #e05a1e;
    --orange-light: #f07030;
    --gold:         #c8952a;
    --dark:         #0a0a0a;
    --dark-2:       #111111;
    --dark-3:       #1c1c1c;
    --cream:        #f5f0e8;
    --text-dim:     #888880;
    --border:       rgba(255,255,255,0.07);
    --font-serif:   'Playfair Display', Georgia, serif;
    --font-sans:    'Inter', system-ui, sans-serif;
    --blog-max:     760px;
    --container:    1200px;
    --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Base ──────────────────────────────────────────── */
.blog-post-page,
.blog-list-page {
    background: transparent;
    color: var(--cream);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
}
html {
    background: var(--dark);
}

.blog-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── NAV (wie Hauptseite) ─────────────────────────── */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    padding: 1.4rem 0;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
nav.scrolled {
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: var(--font-serif);
    font-size: 1.9rem; font-weight: 700;
    color: #fff; text-decoration: none; letter-spacing: -0.02em;
}
.logo span { color: var(--orange); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a {
    color: rgba(255,255,255,0.65); text-decoration: none;
    font-size: 0.88rem; font-weight: 500; letter-spacing: 0.02em;
    transition: color 0.25s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-cta {
    background: var(--orange) !important;
    color: #fff !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 4px;
    font-weight: 600 !important;
    transition: background 0.25s !important;
}
.nav-cta:hover { background: var(--orange-light) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.hamburger span { width: 22px; height: 2px; background: white; border-radius: 2px; display: block; transition: 0.3s; }

/* ── Affiliate Notice ──────────────────────────────── */
.affiliate-notice {
    background: rgba(200,149,42,0.06);
    border-top: 1px solid rgba(200,149,42,0.15);
    border-bottom: 1px solid rgba(200,149,42,0.15);
    padding: 8px 0;
}
.affiliate-notice--bottom { margin-top: 8px; }
.affiliate-notice p {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.affiliate-notice strong { color: var(--gold); }

/* ── Post Header ───────────────────────────────────── */
.post-header {
    padding: 120px 0 52px;
    position: relative; z-index: 2;
}
.btn-back {
    display: inline-block;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 36px;
    transition: color 0.2s;
}
.btn-back:hover { color: var(--orange); }

.post-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.post-eyebrow-sep {
    color: rgba(255,255,255,0.2);
    font-size: 0.9rem;
}
.post-type-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
}
.type-blog        { background: rgba(224,90,30,0.18); color: var(--orange); }
.type-review      { background: rgba(200,149,42,0.18); color: var(--gold); }
.type-produkttest { background: rgba(80,160,80,0.18); color: #7dc97d; }

.post-date {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.post-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--cream);
    margin: 0;
}

/* ── Article Content ───────────────────────────────── */
.post-article {
    padding: 56px 0 48px;
    position: relative; z-index: 2;
}
.post-content {
    max-width: var(--container);
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(245,240,232,0.9);
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.post-content * { max-width: 100%; }
.post-content h1 { display: none; } /* Titel steht schon im Header */
.post-content h2 {
    font-family: var(--font-serif);
    font-size: 1.65rem;
    color: var(--cream);
    margin: 2.5em 0 0.8em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.post-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--cream);
    margin: 2em 0 0.6em;
}
.post-content p  { margin: 0 0 1.4em; }
.post-content ul,
.post-content ol { margin: 0 0 1.4em 1.5em; }
.post-content li { margin-bottom: 0.4em; }
.post-content strong { color: var(--cream); }
.post-content em { color: var(--text-dim); font-style: italic; }
.post-content a {
    color: var(--orange);
    text-decoration: underline;
    text-decoration-color: rgba(224,90,30,0.4);
    transition: color 0.2s, text-decoration-color 0.2s;
}
.post-content a:hover {
    color: var(--orange-light);
    text-decoration-color: var(--orange-light);
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
}
.post-content th {
    background: var(--dark-3);
    color: var(--cream);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--orange);
}
.post-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: rgba(245,240,232,0.85);
}
.post-content tr:hover td { background: rgba(255,255,255,0.02); }

/* Figures / Images */
.post-content figure,
.post-content .blog-image {
    margin: 2em auto;
    text-align: center;
    max-width: 680px;
}
.post-content img {
    max-width: 100%;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}
.post-content figcaption {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 8px;
}

/* Product Cards (Produkttest) */
.post-content .product-card {
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--orange);
    border-radius: 8px;
    padding: 24px;
    margin: 2em 0;
}
.post-content .product-card h3 {
    margin-top: 0;
    color: var(--cream);
    font-size: 1.1rem;
}
.post-content .pros li { color: #7dc97d; }
.post-content .cons li { color: #e07070; }
.post-content .cta-btn {
    display: inline-block;
    background: var(--orange);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 12px;
    transition: background 0.2s;
}
.post-content .cta-btn:hover { background: var(--orange-light) !important; }

/* ── Tags ──────────────────────────────────────────── */
.post-tags-wrap {
    padding: 24px 0;
    position: relative; z-index: 2;
}
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    background: var(--dark-3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ── Back Button ───────────────────────────────────── */
.post-back { padding: 32px 0 48px; position: relative; z-index: 2; }
.btn-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.btn-back:hover { color: var(--orange); }

/* ── Tile Grid Background ────────────────────────────── */
#blogTileGrid {
    position: fixed; inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-template-rows: repeat(20, 1fr);
    opacity: 0.35;
    pointer-events: none;
}
.blog-tile {
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.blog-tile.lit      { background: var(--orange); }
.blog-tile.lit-gold { background: #c9a84c; }

/* Gradient-Overlay: Mitte abdunkeln, Ränder frei */
.tile-vignette {
    position: fixed; inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to right,
        transparent 0%,
        rgba(10,10,10,0.75) 20%,
        rgba(10,10,10,0.75) 80%,
        transparent 100%
    );
}

/* ── Blog List Page ────────────────────────────────── */
.blog-list-header {
    padding: 120px 0 48px;
    text-align: center;
    position: relative; z-index: 2;
}
.blog-list-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--cream);
    margin: 0 0 12px;
}
.blog-list-header p {
    color: var(--text-dim);
    font-size: 1.05rem;
    margin: 0;
}

.blog-grid-section { padding: 56px 0 72px; position: relative; z-index: 2; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.blog-card {
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s, transform 0.2s;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.blog-card:hover {
    border-color: rgba(224,90,30,0.4);
    transform: translateY(-2px);
}
.blog-card-body { padding: 24px; }
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}
.blog-card-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0 0 10px;
}
.blog-card-title a {
    color: var(--cream);
    text-decoration: none;
    transition: color 0.2s;
}
/* Stretched link: der Titel-Link überspannt die gesamte Karte */
.blog-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
}
.blog-card-title a:hover { color: var(--orange); }
.blog-card-teaser {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 16px;
}
.blog-card-link {
    font-size: 0.85rem;
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}
.blog-card-link:hover { color: var(--orange-light); }

.blog-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-dim);
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.page-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--cream);
    text-decoration: none;
    font-size: 0.88rem;
    transition: border-color 0.2s, color 0.2s;
}
.page-btn:hover { border-color: var(--orange); color: var(--orange); }
.page-info { font-size: 0.85rem; color: var(--text-dim); }

/* ── FOOTER (wie Hauptseite) ───────────────────────── */
footer {
    background: #040404; padding: 2rem 0;
    border-top: 1px solid var(--border);
    position: relative; z-index: 2;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
    font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700;
    color: white; text-decoration: none;
}
.footer-logo span { color: var(--orange); }
.footer-links { display: flex; gap: 2rem; list-style: none; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.35); text-decoration: none; font-size: 0.85rem; transition: color 0.25s; }
.footer-links a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { color: rgba(255,255,255,0.22); font-size: 0.78rem; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
    nav { padding: 1.1rem 0; }
    .nav-inner { padding: 0 1.5rem; }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .blog-grid { grid-template-columns: 1fr; }
    .post-header { padding: 100px 0 36px; }
    .post-article { padding: 36px 0 32px; }
    footer { padding: 2rem 1.5rem; }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* Mobile Nav Open */
.nav-open .nav-links {
    display: flex; flex-direction: column; gap: 1.5rem;
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.98);
    padding: 3rem 2rem; align-items: center; justify-content: center;
    z-index: 150;
}
.nav-open .nav-links a { font-size: 1.3rem; }
