/* 
   --------------------------------------------------------------
   CSS VARIABLES - KONFIGURATION
   Hier können Farben, Abstände und Schriften angepasst werden.
   --------------------------------------------------------------
*/
:root {
    /* Farben */
    --color-primary: #EA580C;         /* Hauptfarbe (Orange) */
    --color-primary-hover: #C2410C;   /* Dunkleres Orange für Hover */
    --color-secondary: #FFF7ED;       /* Helles Beige (Hintergrund Leistungen) */
    --color-text-dark: #1F2937;       /* Dunkler Text (Überschriften) */
    --color-text-light: #4B5563;      /* Hellerer Text (Beschreibungen) */
    --color-white: #ffffff;
    --color-bg-gray: #F9FAFB;         /* Leichtes Grau für Hintergründe */
    --color-bg-form: #F5F0EB;         /* Hintergrund Kontakt Sektion */
    
    /* Typografie */
    --font-family: 'Inter', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.5;
    
    /* Abstände & Größen */
    --container-width: 1200px;
    --spacing-section: 5rem;          /* 80px - Abstand zwischen Sektionen */
    --border-radius: 0.5rem;          /* 8px - Abrundung von Karten/Buttons */
    --transition-speed: 0.3s;
    
    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* --------------------------------------------------------------
   RESET & GLOBAL STYLES
   -------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    color: var(--color-text-dark);
    line-height: var(--line-height-base);
    background-color: var(--color-white);
    overflow-x: hidden;
    width: 100%;
    /* 
       Add padding to prevent content from jumping behind fixed header.
       Calculation: Logo (40px) + Padding Top (0.75rem/12px) + Padding Bottom (0.75rem/12px) = 64px
    */
    padding-top: 64px; 
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section {
    padding: var(--spacing-section) 0;
}

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

/* --------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-align: center;
}

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

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

/* Outline Button Style (for Cookie Banner) */
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-text-light);
    color: var(--color-text-dark);
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: var(--color-text-dark);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------- */
.header {
    position: fixed; /* Always visible */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    position: relative; /* Wichtig für absolute Positionierung des Logos */
}

/* Mobile Layout Anpassungen */
@media (max-width: 767px) {
    .header-container {
        justify-content: flex-end; /* Schiebt Burger-Menü nach rechts */
        min-height: 40px; /* Verhindert Kollabieren */
    }
    
    /* Logo zentrieren */
    .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%); /* Exakte vertikale und horizontale Mitte */
        z-index: 10;
        white-space: nowrap;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-dark);
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.nav-desktop {
    display: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-dark);
    transition: color var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-desktop {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.phone-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    padding: 0;
    z-index: 51; /* Keep above menu */
    transition: color 0.3s ease;
}

/* Orange Color when Active */
.menu-toggle.active {
    color: var(--color-primary);
}

/* 
   Hamburger Icon Animation 
   ------------------------
*/
.hamburger-icon .line {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    transform-box: fill-box;
}

/* Active State (X shape) */
.menu-toggle.active .hamburger-icon .top {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .hamburger-icon .middle {
    opacity: 0;
}

.menu-toggle.active .hamburger-icon .bottom {
    transform: translateY(-6px) rotate(-45deg);
}

/* 
   Mobile Menu
   --------------------------------
*/
.mobile-menu {
    /* Layout */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    
    /* Appearance & Positioning */
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid #e5e7eb;
    
    /* FIX: Absolute Positionierung relativ zum Header statt Fixed */
    position: absolute; 
    top: 100%; /* Beginnt exakt an der Unterkante des Headers */
    left: 0;
    width: 100%;
    z-index: 40;
    
    padding: 1rem;
    color: var(--color-text-dark);

    /* 
       Closed State (The "Smoke" Effect) 
    */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-20px) scale(1.1);
    filter: blur(10px);
    
    transition: 
        opacity 0.6s ease-in,
        transform 0.8s ease-in,
        filter 0.6s ease-in,
        visibility 0.6s;
}

.mobile-menu.active {
    /* Open State (Solid) */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    filter: blur(0);
    
    transition: 
        opacity 0.3s ease-out,
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.3s ease-out;
}

.mobile-nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.mobile-nav-link.active {
    color: var(--color-primary);
}

.mobile-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-weight: 600;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* Desktop Media Query */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    .cta-desktop {
        display: flex;
    }
    .menu-toggle {
        display: none;
    }
    .mobile-menu {
        display: none !important;
    }
}

/* --------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------- */
.hero {
    position: relative;
    height: 600px;
    width: 100%;
    overflow: hidden;
    background-color: #f3f4f6;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

@media (min-width: 768px) {
    .hero-overlay {
        background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.5), transparent);
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-text-box {
    max-width: 36rem;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-desc {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-btn:hover {
    transform: scale(1.05);
}

/* --------------------------------------------------------------
   SECTIONS HEADINGS
   -------------------------------------------------------------- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.separator {
    width: 6rem;
    height: 4px;
    background-color: var(--color-primary);
    opacity: 0.5;
    margin: 0 auto;
}

/* --------------------------------------------------------------
   SERVICES (LEISTUNGEN)
   -------------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-speed);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.icon-circle {
    width: 5rem;
    height: 5rem;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.services-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.services-footer:hover {
    color: var(--color-primary);
}

.services-footer .highlight {
    color: var(--color-primary);
    font-weight: 500;
}

/* --------------------------------------------------------------
   ABOUT (ÜBER UNS)
   -------------------------------------------------------------- */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
    }
}

.about-image-wrapper {
    width: 100%;
}

@media (min-width: 768px) {
    .about-image-wrapper {
        width: 50%;
    }
}

.about-image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #e5e7eb;
    height: 20rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    /* Removed flex display to allow absolute positioning of slides */
}

@media (min-width: 768px) {
    .about-image-container {
        height: 400px;
    }
}

/* Slider specific styles */
/* Now we style img tags directly inside the container as slides */
.slider-container > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.slider-container > img.active {
    opacity: 1;
    z-index: 2;
}

.about-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #e5e7eb, transparent, transparent);
    z-index: 3; /* Overlay stays on top of images */
    pointer-events: none; /* Let clicks pass through to buttons if needed */
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10; /* Above overlay */
    color: var(--color-primary);
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

.about-text {
    width: 100%;
}

@media (min-width: 768px) {
    .about-text {
        width: 50%;
    }
}

.about-text .lead {
    font-size: 1.125rem;
    color: var(--color-text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.about-text .desc {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.bold {
    font-weight: 700;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-dark);
    font-weight: 500;
}

/* --------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------- */
.contact-section {
    position: relative;
    background-color: var(--color-bg-form);
}

.contact-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url('https://www.transparenttextures.com/patterns/linen.png');
    opacity: 0.1;
    pointer-events: none;
}

.relative-z {
    position: relative;
    z-index: 10;
}

.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .contact-layout {
        flex-direction: row;
    }
}

.contact-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .contact-info {
        width: 41.666667%; /* 5/12 */
        padding-left: 1rem;
    }
}

/* Standard-Ansicht (Desktop First Ansatz für .info-item) */
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    background-color: var(--color-white);
    padding: 0.5rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-sm);
    color: var(--color-primary);
    display: flex;
    /* Center the icon content (SVG) */
    align-items: center;
    justify-content: center;
}

.info-item h4 {
    font-weight: 700;
    color: var(--color-text-dark);
}

.info-item p {
    color: var(--color-text-light);
}

/* 
   Mobile & Tablet Contact Alignment (< 1024px)
   Layout switches to single column here.
   IMPORTANT: This block must be AFTER .info-item definition to override it.
   Requirements:
   1. Icons ABOVE text (flex-direction: column)
   2. All content centered (align-items: center, text-align: center)
*/
@media (max-width: 1023px) {
    .contact-info {
        width: 100%;
        align-items: center; /* Centers the .info-item blocks in the wrapper */
    }
    
    .info-item {
        /* Force Column Layout */
        display: flex;
        flex-direction: column; 
        
        /* Center Horizontally */
        align-items: center; 
        justify-content: center;
        
        /* Center Text alignment */
        text-align: center;
        width: 100%;
    }
    
    .info-icon {
        margin-bottom: 0.5rem; /* Space between icon and text */
        margin-right: 0; /* Remove potential side margins */
    }

    /* Target the text container explicitly */
    .info-item > div:last-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
    }
    
    .info-item h4, 
    .info-item p {
        text-align: center;
        width: 100%; /* Ensure text takes full width to be centered properly */
    }
}


.info-image {
    margin-top: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 12rem;
    box-shadow: var(--shadow-md);
}

.info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-form-wrapper {
    width: 100%;
}

@media (min-width: 1024px) {
    .contact-form-wrapper {
        width: 58.333333%; /* 7/12 */
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.25rem;
    background-color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-sm);
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

.form-input:focus {
    box-shadow: 0 0 0 2px var(--color-primary);
}

.form-textarea {
    resize: none;
}

.form-footer {
    display: flex;
    justify-content: center; /* Center aligned always */
    margin-top: 0.5rem;
}

.btn-large {
    width: 100%;
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
}

@media (min-width: 768px) {
    .btn-large {
        width: auto;
    }
}

/* --------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------- */
.footer {
    background-color: #E5E0DB;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.footer-legal {
    margin-top: 0.5rem;
}

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

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

/* --------------------------------------------------------------
   LEGAL PAGES (Impressum & Datenschutz)
   -------------------------------------------------------------- */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
}

/* --------------------------------------------------------------
   COOKIE BANNER
   -------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-text h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.cookie-text p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.5;
    max-width: 40rem;
}

.cookie-text a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-text a:hover {
    color: var(--color-primary-hover);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .cookie-buttons {
        width: auto;
    }
}

/* --------------------------------------------------------------
   MOBILE CENTERING ADJUSTMENTS (< 768px)
   -------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Headings */
    h1, h2, h3 {
        text-align: center;
    }

    /* Hero Section */
    .hero-content {
        justify-content: center;
    }
    
    .hero-text-box {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* About Section */
    .about-text {
        text-align: center;
    }
    
    .check-list {
        align-items: center; /* Centers the flex items (check-item) */
    }
    
    /* Center the check-item contents (icon + text) */
    .check-item {
        justify-content: center;
    }
}