/* Fonts */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #2d5a27;
    --primary-light: #4caf50;
    --secondary: #2d5a27;
    --text: #444444;
    --bg-light: #f9fbf9;
    --white: #ffffff;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 2.5rem;
}

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

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

/* Header */
#main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

#main-nav ul {
    display: flex;
    list-style: none;
}

#main-nav li {
    margin-left: 2rem;
}

#main-nav a {
    font-weight: 600;
    color: var(--secondary);
    position: relative;
}

#main-nav a:hover,
#main-nav a.active {
    color: var(--primary);
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

#main-nav a:hover::after,
#main-nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/assets/images/hero-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    margin: .5rem 0;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
}

/* Footer */
#main-footer {
    background-color: var(--secondary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-grid h3,
.footer-grid h4 {
    color: var(--white);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary);
    margin: 2px 0;
    transition: var(--transition);
}

/* Referenzen Gallery - Unified Sizes */
.referenzen-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.ref-item {
    height: 350px;
    /* Fixed height for all gallery items */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ref-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This ensures all images fill the space perfectly */
    transition: var(--transition);
}

.ref-item:hover img {
    transform: scale(1.05);
}

/* Responsive Adjustments for Mobile */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    #main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    #main-nav.active {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        padding: 2rem;
    }

    #main-nav li {
        margin: 1rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        padding: 0 1rem;
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 1rem;
        margin: 0;
    }

    .hero-btns {
        margin-top: 1.5rem !important;
    }

    .page-header h1 {
        font-size: 2.5rem !important;
    }

    .services-grid-container {
        grid-template-columns: 1fr !important;
        margin-top: -2rem !important;
        padding: 0 1rem 4rem !important;
    }

    .service-card {
        padding: 2rem !important;
    }

    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .contact-form-wrapper {
        margin-top: 2rem !important;
        padding: 2.5rem 1.5rem !important;
    }
}

/* Page Header Banner */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff !important;
    padding: 8rem 0;
    text-align: center;
    margin-bottom: 0;
}

.page-header h1 {
    color: #fff !important;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header p {
    font-size: 1.5rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Services Grid - 4 columns */
.services-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: -4rem;
    /* Overlay effect */
    padding-bottom: 4rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 1200px) {
    .services-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .services-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid-container {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: #fff;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 700;
    overflow-wrap: break-word;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    flex-grow: 1;
    margin-bottom: 2rem;
}

/* Contact Form Adjustment */
.contact-form-wrapper {
    background: #fff;
    padding: 4rem 3.5rem;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    margin-top: -8rem;
    /* Increased overlap for dramatic effect, or decrease if user prefers */
    position: relative;
    z-index: 20;
}

/* Content Layout */
.content-text {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
}

.content-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.content-text h3 {
    margin-top: 2.5rem;
    font-size: 1.5rem;
}

.content-text ul {
    margin-top: 1.2rem;
    padding-left: 1.5rem;
    list-style-type: none;
}

.content-text li {
    margin-bottom: 1rem;
    position: relative;
}

.content-text li::before {
    content: '✓';
    position: absolute;
    left: -1.5rem;
    color: var(--primary);
    font-weight: bold;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 3rem;
}

/* About Section Specifics */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-label {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item h3 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0;
}

.stat-item p {
    font-weight: 600;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.about-badge {
    position: absolute;
    bottom: -2rem;
    left: -2rem;
    background: var(--primary);
    color: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.about-badge p:first-child {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-badge p:last-child {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Hero Button Variation */
.hero-btns {
    margin-top: 2.5rem;
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid #fff !important;
    margin-left: 1rem;
}

/* CTA Refinement */
.cta-title {
    font-size: 3rem;
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.btn-large {
    font-size: 1.1rem;
    padding: 1.2rem 3rem;
}

/* Contact Specifics */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.info-item {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: .8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin-right: 10px;
}

.btn-full {
    width: 100%;
    border: none;
    cursor: pointer;
}

/* Utilities */
.section-subtitle {
    max-width: 600px;
    margin: 0 auto;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.text-left {
    text-align: left;
}

/* Fehlermeldungen / Hinweise */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Spamschutz */
.hp-field {
    display: none;
}