/* ==========================================================================
   1. VARIABLEN & RESET
   ========================================================================== */
:root {
    --primary-color: #7FBA25;
    --primary-dark: #6a9b1e;
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-radius: 12px;
    --transition: all 0.25s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }

/* Barrierefreiheit: Skip-Link (nur bei Tastaturfokus sichtbar) */
.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--primary-color);
    color: white; padding: 12px 20px; z-index: 2000; border-radius: 0 0 8px 0;
    text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Sichtbarer Fokus-Ring für Tastaturnutzer (statt komplett zu entfernen) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 2px;
}
.text-center { text-align: center; }
.divider { height: 4px; width: 50px; background: var(--primary-color); margin: 20px 0; border-radius: 2px; }
.divider.center { margin: 20px auto; }

/* ==========================================================================
   2. HEADER & NAVIGATION (INKL. DROPDOWN)
   ========================================================================== */
.main-header {
    background: var(--bg-white);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo a { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 48px; width: auto; display: block; }
@media (max-width: 600px) {
    .logo-img { height: 38px; }
}

.nav-toggle { display: none; }
.main-nav > ul { display: flex; list-style: none; gap: 5px; align-items: center; }
.main-nav a { text-decoration: none; color: var(--text-main); font-weight: 500; padding: 10px 15px; display: block; transition: var(--transition); }
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }

/* Dropdown: Vertikal & versteckt bis Hover */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0; background: var(--bg-white); min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); list-style: none; display: none; padding: 10px 0;
    border-radius: 0 0 8px 8px; border-top: 3px solid var(--primary-color); z-index: 100;
    flex-direction: column;
}
.dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu li { width: 100%; }
.dropdown-menu li a { padding: 10px 20px !important; color: var(--text-light) !important; width: 100%; }
.dropdown-menu li a:hover { background-color: var(--bg-light); color: var(--primary-color) !important; padding-left: 25px; }

/* ==========================================================================
   3. BUTTONS (UNIFIZIERT)
   ========================================================================== */
.read-more, .btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none !important;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    text-align: center;
}

.read-more, .btn-primary {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(127, 186, 37, 0.2);
}
.read-more:hover, .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(127, 186, 37, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
    padding: 10px 28px; /* Leicht angepasst wegen Border */
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: white !important;
}

/* ==========================================================================
   4. LAYOUT-MODULE (HERO, ABOUT & GRIDS)
   ========================================================================== */
.module-hero { background: linear-gradient(135deg, var(--bg-light) 0%, #eef2f5 100%); padding: 100px 0; text-align: center; }
.subpage-hero { padding: 60px 0; text-align: center; background: var(--bg-light); } /* Neue Klasse für Unterseiten */
.badge { background: rgba(127, 186, 37, 0.15); color: var(--primary-dark); padding: 5px 15px; border-radius: 20px; font-weight: bold; margin-bottom: 15px; display: inline-block; }

.module-about { padding: 80px 0; }
.about-text-full { max-width: 900px; margin: 0 auto; }

/* Das verbesserte Grid für Side-by-Side (Ohne RTL-Hack!) */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: start; }
.about-grid.reverse { grid-template-columns: 1fr 1.2fr; } /* Box links, Text rechts */

/* Feature Boxen auf den Unterseiten */
.feature-box {
    background: var(--bg-white); padding: 30px; border-radius: var(--border-radius);
    border-top: 5px solid var(--primary-color); box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.feature-box ul { list-style: none; }
.feature-box li { display: flex; align-items: flex-start; margin-bottom: 20px; gap: 15px; }
.feature-box .icon { font-size: 1.5rem; flex-shrink: 0; width: 30px; text-align: center; }
.feature-box .text-content { flex: 1; color: var(--text-light); }
.feature-box strong { display: block; color: var(--text-main); margin-bottom: 4px; font-weight: 700; }

/* ==========================================================================
   5. SERVICE-KARTEN & REFERENZEN
   ========================================================================== */
.module-services { background-color: var(--bg-light); padding: 80px 0; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }

.service-card {
    background: var(--bg-white); padding: 40px 30px; border-radius: var(--border-radius);
    text-align: center; border: 1px solid #eaeaea; transition: var(--transition);
    display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.card-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.partner-logo {
    height: 70px; max-width: 180px; width: auto; object-fit: contain;
    margin-bottom: 20px; display: block;
}
.partner-photo {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px;
    margin-bottom: 20px; display: block; background: var(--bg-light);
}
.service-desc { font-size: 0.95rem; color: var(--text-light); margin-bottom: 20px; }
.service-card .read-more { align-self: center; margin-top: auto; }

/* Spezifisch für die Bilder in referenzen.php */
.ref-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.service-card:hover .ref-image-container img {
    transform: scale(1.05);
}

/* ==========================================================================
   6. CTA SEKTION & FOOTER
   ========================================================================== */
.module-cta { padding: 80px 0; text-align: center; background: var(--bg-light); }
.module-cta h2 { margin-bottom: 15px; font-size: 2.2rem; color: var(--text-main); }
.module-cta p { margin-bottom: 30px; font-size: 1.1rem; color: var(--text-light); }

.main-footer { background: #222; color: #999; padding: 40px 0; text-align: center; }
.footer-links a { color: #ccc; text-decoration: none; margin: 0 15px; transition: var(--transition); }
.footer-links a:hover { color: var(--primary-color); }

/* ==========================================================================
   7. MOBILE ANPASSUNGEN (BURGER MENÜ & GRID FIXES)
   ========================================================================== */
.nav-toggle-label { display: none; cursor: pointer; padding: 10px; z-index: 1001; }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    display: block; background: var(--text-main); height: 2px; width: 25px; position: relative; transition: var(--transition);
}
.nav-toggle-label span::before, .nav-toggle-label span::after { content: ''; position: absolute; }
.nav-toggle-label span::before { bottom: 8px; }
.nav-toggle-label span::after { top: 8px; }

@media (max-width: 850px) {
    /* Burger Menü */
    .nav-toggle-label { display: block; }
    .main-nav { 
        position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-white); 
        max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out; 
    }
    .nav-toggle:checked ~ .main-nav { max-height: 100vh; overflow-y: auto; }
    .main-nav > ul { flex-direction: column; padding: 20px 0; }
    .dropdown:hover .dropdown-menu { position: static; display: flex; box-shadow: none; border: none; padding-left: 20px; background: var(--bg-light); }
    
    /* Grid Mobile Fixes */
    .about-grid, .about-grid.reverse { grid-template-columns: 1fr; }
    
    /* Sorgt dafür, dass auf dem Handy IMMER erst der Text und DANN die Box kommt */
    .about-grid .about-text, .about-grid.reverse .about-text { order: 1; }
    .about-grid .about-features, .about-grid.reverse .about-features { order: 2; }
}