/* Allgemeine Einstellungen */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Farbvariablen für konsistentes Design */
    --primary-color: #27ae60; /* Grün */
    --secondary-color: #2c3e50; /* Dunkelblau */
    --background-color: #f9f9f9; /* Hellgrau */
    --text-color: #333333; /* Dunkelgrau */
    --light-gray: #ececec; /* Hellgrau für Hover */
    --dark-gray: #34495e; /* Dunkelgrau für Text */
    --white: #ffffff; /* Weiß */
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.15);
    --error-color: #e74c3c; /* Rot für Fehler */
    --success-color: #2ecc71; /* Grün für Erfolg */
}

/* Body und allgemeines Layout */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header, Main und Footer */
header {
    flex-shrink: 0;
}

main {
    flex-grow: 1;
    padding: 20px;
}

/* Sticky Header Einstellungen */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px var(--shadow-light);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.sticky-header.scrolled {
    background: var(--light-gray);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    max-width: 150px;
    height: auto;
    margin-right: 20px;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: var(--light-gray);
    transform: scale(1.05);
    color: #000;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 20px;
    background: linear-gradient(135deg, #e9f5f2, var(--white));
    border-radius: 12px;
    margin: 20px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.hero-text h1 {
    font-size: 2.3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--dark-gray);
    max-width: 600px;
}

/* Nicht klickbarer "Unsere Dienstleistungen"-Knopf */
.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer; /* Kann zu 'pointer' geändert werden, um bei Submit sichtbar zu sein */
}

.cta-button:hover,
.cta-button:focus {
    background-color: darken(var(--primary-color), 10%);
    transform: translateY(-2px);
}

/* Services Section */
.services-section {
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    margin: 40px 0;
}

.services-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* Service Card */
.service-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px var(--shadow-dark);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.6rem;
}

.service-card p {
    color: var(--dark-gray);
    margin-top: 10px;
    line-height: 1.6;
    flex-grow: 1;
}

.service-card p.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 5px;
}

.service-card ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.service-card ul li {
    margin-bottom: 8px;
    color: var(--dark-gray);
}

/* Vergleichsbilder */
.comparison {
    position: relative;
    width: 100%;
    height: 160px; /* Einheitliche Höhe */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comparison-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.comparison-item.active {
    opacity: 1;
}

.comparison-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-item span {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    height: 160px; /* Feste Höhe für Konsistenz */
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 200%; /* Zwei Bilder in einer Reihe */
    height: 100%;
}

.carousel-images img {
    width: 50%; /* Jedes Bild nimmt 50% des Containers ein */
    height: 100%;
    object-fit: cover;
}

.carousel-dot-container {
    text-align: center;
    margin-top: 10px;
}

.carousel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background-color: var(--primary-color);
}

/* Impressum Section */
.impressum-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.impressum-section h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.impressum-section h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 10px;
}

.impressum-section p {
    line-height: 1.6;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.impressum-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.impressum-section a:hover,
.impressum-section a:focus {
    text-decoration: underline;
}

/* Kontakt-Formular */
.contact-section {
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-light);
    margin: 40px 0;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

.form-feedback {
    margin-top: 20px;
    text-align: center;
}

.form-feedback .success {
    color: var(--success-color);
    font-weight: 600;
}

.form-feedback .error {
    color: var(--error-color);
    font-weight: 600;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-size: 14px;
    flex-shrink: 0;
}

.footer-content a {
    color: var(--primary-color);
    margin: 0 5px;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-content a:hover,
.footer-content a:focus {
    color: #2ecc71;
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sticky-header {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .logo {
        margin-bottom: 10px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .contact-container {
        padding: 0 10px;
    }

    .impressum-section {
        padding: 15px;
    }
}
