/*
Theme Name: sfv-barenburg.de
Author: AI
Description: Informationsportal, Wettanalysen, Guides, Bewertungen
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;700&family=Rubik:wght@400;500;700;800&display=swap');

:root {
    --primary: #1e3a5f;
    --secondary: #c62828;
    --accent: #2a4f7a;
    --bg-main: #f4f6f8;
    --white: #ffffff;
    --text-main: #1a1a2e;
    --text-muted: #4a5568;
    --border: #c62828;
    
    --container-width: 1280px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 8px; /* Softer radius */

    --section-pad: clamp(4rem, 8vw, 8rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'IBM Plex Sans', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, .logo, .btn-arc, .info-number {
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
    font-family: 'Rubik', sans-serif;
}

h1 { font-size: clamp(1.8rem, 8vw, 4.5rem); margin-bottom: 2rem; word-break: break-word; }
h2 { font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 3rem; text-align: center; word-break: break-word; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

a { text-decoration: none; color: inherit; transition: var(--transition); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Axis 7: V-A Soft shadows */
.soft-shadows {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
    border-radius: var(--radius);
}

/* Axis 8: D-B Horizontal lines */
.hline-decor {
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--border), var(--border) 10px, transparent 10px, transparent 20px);
    margin: 2rem 0;
    opacity: 0.5;
}

/* Axis 1: N-E Minimal top-bar <= 50px */
.site-header {
    height: 50px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--white);
    border-bottom: 1px solid rgba(198, 40, 40, 0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex !important;
    align-items: center;
    font-size: 1.4rem !important;
    color: var(--primary) !important;
    text-transform: uppercase;
}
.logo span { color: var(--secondary); font-weight: 400; }

.main-nav ul { display: flex; list-style: none; gap: 2.5rem; }
.main-nav a { font-size: 0.85rem; font-weight: 500; text-transform: uppercase; color: var(--text-main); }
.main-nav a:hover { color: var(--secondary); }

.nav-toggle { display: none; background: none; border: none; }

/* Axis 2: H-A Full Bleed Overlay */
.hero-arc {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 95, 0.75); /* var(--primary) with opacity */
}

.hero-content { max-width: 900px; z-index: 1; color: var(--white); }
.hero-content h1 { color: var(--white); }
.hero-content p { color: rgba(255, 255, 255, 0.9); }

.btn-arc {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-top: 2rem;
}
.btn-arc:hover { background: var(--primary); color: var(--white); }

/* Axis 3: F-A Horizontal stripes */
.features-section { padding: var(--section-pad) 0; }
.features-grid { display: flex; flex-direction: column; gap: 0; }
.feature-item { 
    display: flex; 
    align-items: center; 
    gap: 3rem; 
    padding: 3rem 0; 
    border-bottom: 1px solid rgba(198, 40, 40, 0.2); 
    text-align: left;
}
.feature-item:first-child { border-top: 1px solid rgba(198, 40, 40, 0.2); }
.feature-icon { 
    width: 60px; height: 60px; background: var(--primary); color: var(--white); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-size: 1.5rem; flex-shrink: 0;
}
.feature-content h3 { margin-bottom: 0.5rem; color: var(--primary); }

/* Axis 5: U-E Number infographic */
.infographic-arc { padding: var(--section-pad) 0; background: var(--white); }
.infographic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.info-item { padding: 2rem; }
.info-number { font-size: 4.5rem; color: var(--secondary); margin-bottom: 1rem; }
.info-label { font-weight: 500; color: var(--text-main); font-size: 1.1rem; text-transform: uppercase; }

/* Axis 4: C-D Minimal without image - text list */
.posts-section { padding: var(--section-pad) 0; background: var(--bg-main); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.post-card-arc { 
    padding: 2.5rem;
    background: var(--white);
    border-top: 3px solid var(--secondary);
    transition: var(--transition);
}
.post-card-arc:hover { box-shadow: 0 10px 30px rgba(30, 58, 95, 0.08); transform: translateY(-5px); }
.post-card-arc .thumb { display: none; } /* NO IMAGE */

.post-card-content { padding: 0; }
.post-card-content h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 1rem; }
.post-card-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }

.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 4rem 0; }
.pagination .page-numbers { 
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); background: var(--white); 
    font-weight: 500; color: var(--text-main); border: 1px solid var(--border);
}
.pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Axis 6: FT-A Minimalist */
.site-footer { background: var(--white); color: var(--text-main); padding: 4rem 0 2rem; border-top: 1px solid rgba(198, 40, 40, 0.2); text-align: center; }
.footer-grid { display: flex; flex-direction: column; align-items: center; gap: 2rem; }

.footer-logo { 
    display: inline-flex !important;
    align-items: center;
    font-size: 1.8rem; 
    color: var(--primary); 
    text-transform: uppercase;
}
.footer-logo span { color: var(--secondary); font-weight: 400; }

.footer-nav ul { list-style: none; display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.footer-nav a { color: var(--text-main); font-weight: 500; text-transform: uppercase; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--secondary); }

.footer-bottom { margin-top: 3rem; font-size: 0.85rem; color: var(--text-muted); }

/* Other fixes */
.archive-label { display: block; color: var(--secondary); font-weight: 700; text-transform: uppercase; margin-bottom: 1rem; }
.post-card-fox { padding: 2rem; background: var(--white); border-top: 3px solid var(--secondary); margin-bottom: 1.5rem; }
.post-card-fox .thumb { display: none; }
.post-card-fox h3 { color: var(--primary); margin-bottom: 1rem; }
.btn-read { color: var(--secondary); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; }

@media (max-width: 1024px) {
    .infographic-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .nav-toggle { 
        display: flex; flex-direction: column; gap: 4px; cursor: pointer; z-index: 10001; 
    }
    .nav-toggle span { width: 22px; height: 2px; background: var(--primary); transition: 0.3s; }
    
    body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.menu-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    body.menu-open .main-nav { 
        display: flex; position: fixed; inset: 0; background: var(--white); 
        z-index: 10000; align-items: center; justify-content: center;
    }
    body.menu-open .main-nav ul { flex-direction: column; text-align: center; gap: 2rem; }
    body.menu-open .main-nav a { font-size: 1.5rem; }

    .posts-grid { grid-template-columns: 1fr; }
    .infographic-grid { grid-template-columns: 1fr; }
    
    .feature-item { flex-direction: column; text-align: center; gap: 1.5rem; }
}

/* RULE 21 FIX */
.post-card-arc {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.post-card-arc .thumb {
    display: block !important;
    height: clamp(180px, 25vw, 300px) !important;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.post-card-arc .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.post-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
.post-card-content h3 {
    flex-grow: 1 !important;
}
.btn-read, .read-more-link {
    margin-top: auto !important;
}

.logo, .footer-logo { flex-wrap: wrap !important; }

/* FIX HERO OVERLAP RULE 16 */
.site-main > section:first-child {
    padding-top: clamp(140px, 15vh, 180px) !important;
}
.hero-split {
    padding-top: 0 !important;
}
.hero-split .hero-text {
    padding-top: clamp(140px, 15vh, 180px) !important;
}


.hero-arc {
    height: auto !important;
    min-height: max(400px, 50vh) !important;
}


/* FIX BACKGROUND VISIBILITY BUG (STACKING CONTEXT) */
section, .hero-arc, .hero-split, .site-main > section {
    isolation: isolate;
}
.hero-content, .hero-text {
    position: relative;
    z-index: 1;
}

