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

ul {
    list-style-position: inside;
}

/* 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(--primary);
    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;
    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(--primary);
    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 Overlay Trigger (Referenzstruktur) */
.cd-text-replace {
    color: transparent;
    text-indent: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.cd-nav-trigger {
    display: none;
}

/* 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) {
    .cd-nav-trigger {
        display: block;
        position: fixed;
        z-index: 1202;
        top: 15px;
        right: 20px;
        height: 52px;
        width: 52px;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
        background-color: var(--primary);
        transition: background 0.2s;
    }

    .cd-nav-trigger .cd-icon {
        position: absolute;
        display: inline-block;
        width: 18px;
        height: 2px;
        left: 50%;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
        background-color: #ffffff;
        border-radius: 2px;
        transition: background-color 0.3s, transform 0.3s;
    }

    .cd-nav-trigger .cd-icon::before,
    .cd-nav-trigger .cd-icon::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 2px;
        background-color: #ffffff;
        transition: transform 0.3s;
    }

    .cd-nav-trigger .cd-icon::before {
        transform: translateY(-6px);
    }

    .cd-nav-trigger .cd-icon::after {
        transform: translateY(6px);
    }

    .cd-nav-trigger.project-open {
        background-color: #fff;
    }

    .cd-nav-trigger.project-open .cd-icon {
        background-color: transparent;
    }

    .cd-nav-trigger.project-open .cd-icon::before,
    .cd-nav-trigger.project-open .cd-icon::after {
        background-color: #005a4b;
    }

    .cd-nav-trigger.project-open .cd-icon::before {
        transform: translateY(0) rotate(45deg);
    }

    .cd-nav-trigger.project-open .cd-icon::after {
        transform: translateY(0) rotate(-45deg);
    }

    #main-nav {
        display: none;
    }

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

    .footer-links ul {
        margin-top: 0.9rem;
    }

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

    .footer-links a {
        display: block;
        width: 100%;
        max-width: 380px;
        padding: 0.85rem 1rem;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background-color: rgba(8, 54, 7, 0.09);
    }

    .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: clamp(1.5rem, 4vw + 1rem, 3rem) !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;
    }
}

/* Overlay style */
.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--primary);
}

.overlay nav {
    text-align: center;
    position: relative;
    top: 50%;
    height: 60%;
    transform: translateY(-50%);
}

.overlay ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: inline-block;
    height: 100%;
    position: relative;
}

.overlay ul li {
    display: block;
    height: 33.3333%;
    min-height: 54px;
}

.overlay ul li a {
    font-size: 2em;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    color: #fff;
    transition: color 0.2s;
    font-family: 'Outfit', sans-serif;
}

.overlay-genie {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s 0.2s, visibility 0s 0.6s;
    z-index: 1201;
}

.overlay-genie.open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s;
}

.overlay-genie.close {
    opacity: 0;
    visibility: hidden;
}

.overlay-genie nav {
    opacity: 0;
    transform: scale(0.8) translateY(-48%);
    transition: opacity 0.3s 0.3s, transform 0.3s 0.3s;
}

.overlay-genie.open nav {
    opacity: 1;
    transform: scale(1) translateY(-50%);
}

.overlay-mobile-logo {
    position: fixed;
    z-index: 1202;
    top: 15px;
    left: 30px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-mobile-logo img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: brightness(80%);
}

body.overflow-hidden,
html.overflow-hidden {
    overflow: hidden !important;
}

@media (min-width: 769px) {
    .overlay,
    .cd-nav-trigger {
        display: none !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);
    }
}

/* Mobile landscape: force 2 tiles side-by-side like iPhone simulation */
@media (max-width: 1024px) and (orientation: landscape) {
    .services-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    h1 {
        line-height: 3.5rem;
    }
}

@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(--primary);
    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;
    box-shadow: rgb(255, 255, 255) 0px 0px 0px 2px inset !important;
}

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

/* 404 Page */
.error-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('/assets/images/ref-gartengestaltung.jpg') center/cover;
    color: #fff;
    text-align: center;
    padding: 7rem 0;
}

.error-hero-inner {
    max-width: 850px;
    margin: 0 auto;
}

.error-hero .about-label {
    color: #c6eb9f;
}

.error-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.15;
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
}

.error-text {
    font-size: 1.15rem;
    max-width: 760px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.error-hero .btn-outline {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.error-links {
    padding-top: 4rem;
}

.error-link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.error-link-card {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid rgba(45, 90, 39, 0.12);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.error-link-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.error-link-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.4rem;
}

.error-link-card p {
    color: #58615a;
}

@media (max-width: 960px) {
    .error-link-grid {
        grid-template-columns: 1fr;
    }

    .error-title {
        line-height: 1.2;
    }
}
