/*
Theme Name: training-fuer-reiter.de
Author: AI
Description: Informationsportal, Wettanalysen, Guides, Bewertungen
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary: #5d3a1a;
    --secondary: #2e7d32;
    --accent: #7a4e2a;
    --bg-main: #faf7f2;
    --white: #ffffff;
    --text-main: #2c2416;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.7);
    --border: #2e7d32;
    
    --container-width: 1280px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 16px;

    --section-pad: clamp(5rem, 12vw, 10rem);
}

* { 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: 'Roboto', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, .logo, .btn-arc {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(1.8rem, 8vw, 5rem); margin-bottom: 2rem; word-break: break-word; }
h2 { font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 4rem; 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-C Glassmorphism */
.glass-effect {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Axis 1: N-C Hamburger Always */
.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    transition: var(--transition);
}
.site-header.scrolled { height: 70px; }

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    margin-top: 1rem;
    gap: 3rem;
}

.logo {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 1.8rem !important;
    color: var(--primary) !important;
    text-transform: lowercase;
    min-width: 180px;
    flex-shrink: 0;
}
.logo span { color: var(--secondary); font-weight: 400; }

.main-nav { display: none; }

.nav-toggle { 
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 10001; 
    background: none; border: none; padding: 10px;
}
.nav-toggle span { width: 25px; height: 2px; background: var(--text-main); transition: 0.3s; }

body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

body.menu-open .main-nav { 
    display: flex; position: fixed; inset: 0; background: var(--bg-main); 
    z-index: 10000; align-items: center; justify-content: center;
}
body.menu-open .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; list-style: none; }
body.menu-open .main-nav a { font-size: 1.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-main); }
body.menu-open .main-nav a:hover { color: var(--primary); }

/* Axis 2: H-E Compact Overlay Hero */
.hero-arc {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 2rem;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.9); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.95) 100%);
}

.hero-content { max-width: 900px; z-index: 1; }

.btn-arc {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(93, 58, 26, 0.2);
    margin-top: 2rem;
}
.btn-arc:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(93, 58, 26, 0.3); background: var(--secondary); }

/* F-C Accordion */
.features-section { padding: var(--section-pad) 0; }
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item summary { outline: none; }
.accordion-item summary::-webkit-details-marker { display: none; }

/* C-F Timeline Cards */
.posts-section { padding: var(--section-pad) 0; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }

.timeline-grid {
    display: grid; grid-template-columns: 1fr; gap: 3rem;
}
@media (min-width: 768px) {
    .timeline-grid {
        grid-template-columns: repeat(3, 1fr);
        border-left: none !important;
        padding-left: 0 !important;
    }
    .timeline-grid .post-card-arc > div:first-child { display: none; } /* Hide timeline dots on desktop */
}

.post-card-arc { 
    border-radius: var(--radius); overflow: hidden; transition: var(--transition);
}
.post-card-arc:hover { transform: translateY(-10px); }
.post-card-arc .thumb { height: 280px; position: relative; }
.post-card-arc .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card-arc .meta-tag { 
    position: absolute; top: 20px; left: 20px; background: var(--primary); 
    color: var(--white); padding: 5px 15px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}

.post-card-content { padding: 2.5rem; }
.post-card-content h3 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 1.5rem; }
.post-card-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 1rem; margin: 6rem 0; }
.pagination .page-numbers { 
    width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid var(--border); background: var(--white); 
    font-weight: 700; color: var(--text-main);
}
.pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* FT-D Footer */
.site-footer { background: #0f172a; color: #f1f5f9; padding: 10rem 0 5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6rem; }

.footer-logo { 
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    font-size: 2.2rem; 
    margin-bottom: 2rem; 
    color: var(--primary); 
}
.footer-logo span { color: var(--secondary); font-weight: 300; }
.footer-desc { color: #94a3b8; line-height: 1.8; }

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1.2rem; }
.footer-nav a { color: #cbd5e1; font-weight: 500; }
.footer-nav a:hover { color: var(--primary); padding-left: 5px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 6rem; padding-top: 3rem; display: flex; justify-content: space-between; font-size: 0.85rem; color: #64748b; }

/* D-D SVG Pattern */
.dot-grid {
    position: absolute;
    width: 200px; height: 200px;
    background-image: radial-gradient(var(--primary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.04;
    z-index: -1;
}

@media (max-width: 1200px) {
    .posts-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-header { height: 80px; }
    .header-inner { border-radius: 0; margin-top: 0; padding: 1rem 2rem; }
    
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
}

/* 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;
}

