/* Modern CSS Reset & Variable Setup */
:root {
    --primary: #2e7d32;
    --primary-hover: #1b5e20;
    --accent: #4caf50;
    --dark: #212529;
    --light: #f4f7f4;
    --white: #ffffff;
    --gray: #6c757d;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 10px 16px;
    background: #f2f2f2;
    border-radius: 6px;
    display: inline-block;
    transition: var(--transition);
}

nav a:hover {
    color: var(--white);
    background-color: var(--primary);
}

/* Dropdown Styling für Rollover */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 6px;
    overflow: hidden;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--dark);
    border-radius: 0;
    padding: 10px 16px;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background-color: var(--light);
    color: var(--primary);
}

/* Show Dropdown on Hover */
nav li.has-dropdown:hover .dropdown-menu {
    display: flex;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 80px 20px;
    text-align: left;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 15px;
    color: #424242;
}

.hero ul {
    list-style-position: inside;
    margin-bottom: 30px;
}

/* Detail Section styling */
.detail-view {
    display: none;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 60px 20px;
}

.detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.detail-container h1 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 36px;
}

.detail-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    background-color: var(--gray);
    color: var(--white);
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.back-btn:hover {
    background-color: var(--dark);
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-hover);
}

/* Main Content Container */
.section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-bg {
    background-color: var(--light);
}

.section h2 {
    text-align: center;
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 50px;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
    margin: 10px auto 0;
}

/* Services Cards Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Card Bild-Container Styling */
.card-media-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 20px;
    cursor: pointer;
}

.card-media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-media-wrapper:hover img {
    transform: scale(1.05);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark);
}

.card ul {
    list-style: none;
}

.card li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Contact Form */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Footer & Legal Links */
footer {
    background-color: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #b0bec5;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Legal Modal (Popup) Styling */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--white);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--gray);
    cursor: pointer;
    border: none;
    background: none;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.modal-body h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.modal-body p, .modal-body ul {
    margin-bottom: 15px;
    font-size: 15px;
}

/* Standardmäßig Burger-Button auf dem Desktop ausblenden */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Responsive Mobile Layout mit Burger-Menü */
@media (max-width: 768px) {
    .nav-container {
        position: relative;
        padding: 15px 20px;
    }

    /* Logo auf Mobilgeräten kompakt halten */
    .logo img {
        height: 60px !important;
        width: auto;
    }

    /* Burger-Button auf Mobile anzeigen */
    .burger-menu {
        display: flex;
    }

    /* Navigation standardmäßig auf Mobile ausblenden */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    /* Wenn die Klasse 'active' gesetzt ist, öffnet sich das Menü */
    nav.active {
        max-height: 500px; 
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 20px 20px 20px;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    nav li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        padding: 12px 10px;
        background: transparent;
        border-radius: 0;
        text-align: left;
    }

    nav a:hover {
        background-color: var(--light);
        color: var(--primary);
    }

    /* Dropdown im Mobile-Menü integrieren */
    .dropdown-menu {
        display: none; /* Kann bei Bedarf standardmäßig gezeigt oder über Klick geregelt werden */
        position: static;
        box-shadow: none;
        background-color: #f9fbf9;
        padding-left: 15px;
    }

    /* Zeige Dropdown unter dem Punkt an, wenn man darauf klickt oder standardmäßig eingerückt */
    nav li.has-dropdown:hover .dropdown-menu,
    nav li.has-dropdown.open .dropdown-menu {
        display: flex;
    }

    .dropdown-menu a {
        font-size: 14px;
        padding: 8px 10px;
        color: var(--gray);
    }

    /* Animation des Burger-Buttons zu einem 'X' wenn aktiv */
    .burger-menu.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
	
	/* Sprunganker nicht unter dem sticky Header verstecken */
	section[id] {
    scroll-margin-top: 110px;
}
}