/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
   :root {
    /* Colors */
    --bg-dark: #0a0a0f;
    --bg-light: #ffffff;
    --text-primary-dark: #ffffff;
    --text-secondary-dark: #a0a0b0;
    --text-primary-light: #000000;
    --text-secondary-light: #666666;
    
    --card-border: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --section-spacing: 100px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

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

ul {
    list-style: none;
}

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 30px 0;
    background: transparent;
}

#main-header.scrolled {
    position: fixed;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

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

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-end;
    padding-right: 40px;
}

.header-right {
    justify-content: flex-start;
    padding-left: 40px;
    gap: 30px;
}

.logo {
    flex: 0 0 auto;
    z-index: 10;
}

.nav-left, .nav-right {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-left a, .nav-right a {
    color: var(--text-primary-dark);
}

.nav-left a:hover, .nav-right a:hover {
    color: #cccccc;
}

.logo img {
    height: 80px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.emergency-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ff3b30;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-medium);
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.emergency-btn:hover {
    background-color: #e03025;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.5);
    color: #ffffff !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary-dark);
    cursor: pointer;
    z-index: 101;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-medium);
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-links li {
    margin: 24px 0;
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 50px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary-dark);
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1.5rem;
    text-align: center;
    max-width: 600px;
    letter-spacing: 0.5px;
    font-weight: 300;
}

/* Background Particle Canvas for Hero */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   Leistungen Section (White Background)
   ========================================================================== */
.leistungen {
    background-color: var(--bg-light);
    color: var(--text-primary-light);
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-light);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 40px;
    transition: var(--transition-medium);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    overflow: hidden;
}

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

.expand-btn {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.expand-icon {
    font-size: 1.2rem;
    font-weight: normal;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .expand-btn {
    opacity: 0.8;
}

.service-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary-light);
}

.service-card.expanded .service-details {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.service-card.expanded .expand-icon {
    transform: rotate(45deg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: inline-block;
    color: var(--text-primary-light);
}

.service-icon svg {
    width: 64px;
    height: 64px;
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.service-desc {
    color: var(--text-secondary-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* ==========================================================================
   Gallery / Referenzen Section
   ========================================================================== */
.galerie {
    background-color: var(--bg-dark);
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.galerie .section-title {
    color: var(--text-primary-dark);
}

.section-subtitle {
    color: var(--text-secondary-dark);
    margin-top: 10px;
    font-size: 1.1rem;
}

.gallery-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.gallery-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 20px;
    scroll-behavior: smooth; /* Ensure smooth animation when clicking buttons */
}

.gallery-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: min(600px, 80vw);
    min-width: min(600px, 80vw);
    scroll-snap-align: start;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    flex: 0 0 auto;
    flex-shrink: 0;
    background: #050505;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Show the full image instead of zooming/cropping */
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0) 100%);
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-medium);
}

.gallery-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

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

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Removed backdrop-filter to fix iOS Safari black box bug */
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 40px;
    color: white;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    color: #ff3b30;
}

.lightbox-close {
    top: 20px;
    right: 30px;
    font-size: 4rem;
    line-height: 1;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        font-size: 2rem;
    }
    .lightbox-caption {
        font-size: 1rem;
        bottom: 20px;
    }
}

/* ==========================================================================
   Trust Section (Google Reviews)
   ========================================================================== */
.trust {
    background-color: #f8f9fa; /* Slightly off-white to contrast with Leistungen */
    color: var(--text-primary-light);
    border-top: 1px solid var(--card-border);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.reviews-slider-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.reviews-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 30px;
    padding: 20px 5px; /* Added slight padding for box-shadows */
    scrollbar-width: none;
}

.reviews-slider::-webkit-scrollbar {
    display: none;
}

.slider-btn {
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: var(--text-primary-light);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: absolute;
    z-index: 10;
    transition: var(--transition-fast);
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.review-card {
    flex: 0 0 calc(33.333% - 20px);
    scroll-snap-align: start;
    min-width: min(300px, 85vw);
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-medium);
}

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

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.reviewer-avatar {
    width: 45px;
    height: 45px;
    background-color: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.reviewer-info {
    flex: 1;
}

.reviewer-info h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.review-date {
    font-size: 0.85rem;
    color: var(--text-secondary-light);
}

.stars {
    color: #fbbc05;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.review-text {
    color: var(--text-secondary-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--bg-dark);
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

/* Blue glow at the bottom of the footer */
footer::before {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    height: 200px;
    background: radial-gradient(ellipse at bottom, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    z-index: 1;
}

.footer-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 120px;
    object-fit: contain;
}

.footer-columns {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p, .footer-col a {
    color: var(--text-secondary-dark);
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: block;
}

.footer-col a:hover {
    color: var(--text-primary-dark);
}

.footer-bottom {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-up, .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-up.visible, .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .header-container {
        gap: 30px;
    }
    
    .footer-columns {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        justify-content: space-between;
    }

    .header-left {
        padding-right: 0;
    }

    .header-right {
        justify-content: flex-end;
        padding-left: 0;
    }

    .nav-left, .nav-right {
        display: none;
    }
    
    .emergency-btn span {
        display: none;
    }

    .emergency-btn {
        padding: 10px;
        border-radius: 50%;
    }

    .header-actions {
        gap: 15px;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .logo img {
        height: 50px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .slider-btn {
        display: flex; /* Show buttons on mobile */
        position: absolute;
        z-index: 10;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.6);
        color: white;
    }

    .prev-btn {
        left: 0px;
    }

    .next-btn {
        right: 0px;
    }

    .gallery-slider {
        margin: 0;
        width: 100%;
        scroll-snap-type: x mandatory;
    }

    .gallery-item {
        min-width: 100%;
        height: 100vw;
        max-height: 400px;
        scroll-snap-align: center;
    }
    
    .footer-container {
        flex-direction: column;
    }
    
    .footer-columns {
        flex-direction: column;
        gap: 30px;
    }
}
