html {
    height: 100%;
    scroll-behavior: auto; /* Standard: Auto für bessere Performance */
}

/* PERFORMANCE-MODE: Minimal-Modus aktivieren */
html.performance-minimal {
    scroll-behavior: auto !important;
}

/* Für Brave: Aktivieren von smooth scroll, da wir natives Scrollen verwenden */
.brave-optimized {
    scroll-behavior: smooth;
}

/* Browser-spezifische Optimierungen für Brave */
/* Brave kann Probleme mit backdrop-blur und filter: blur() haben */
@media screen {
    /* Erkenne Brave über User-Agent (wird dynamisch hinzugefügt via JavaScript) */
    .brave-optimized .backdrop-blur-sm,
    .brave-optimized [class*="backdrop-blur"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(255, 255, 255, 0.8) !important; /* Fallback ohne Blur */
    }
    
    .brave-optimized .blur-2xl,
    .brave-optimized [class*="blur-"] {
        filter: blur(8px) !important; /* Reduzierter Blur statt blur(24px) */
    }
    
    /* Reduziere Blur-Filter in CSS */
    .brave-optimized .hero-background::before,
    .brave-optimized .hero-background::after {
        filter: blur(20px) !important; /* Reduziert von 40px */
    }
}

/* PERFORMANCE-MODE: Alle Backdrop-Blur und Blur-Effekte komplett deaktivieren */
.performance-minimal .backdrop-blur-sm,
.performance-minimal [class*="backdrop-blur"],
.performance-minimal [class*="blur-"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
}

/* Alternative mit Media Query für Browser-Präferenzen */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Globale Regel gegen horizontales Überlaufen */
* {
    max-width: 100%;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8fafc; /* Leicht grauer Hintergrund wie im Dashboard */
    margin: 0;
    padding: 0;
    display: flex;
    position: relative; /* Für absolute positionierte SVG */
    flex-direction: column;
    min-height: 100%;
    color: #1e293b; /* Slate-800 als Standard-Textfarbe */
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    width: 100%;
}

/* Wrapper für saubere Struktur */
.wrapper {
    margin: 0;
    padding: 0;
    width: 100%; /* Stellt sicher, dass der Wrapper nicht überläuft */
}

.hero-background {
    background: #ffffff; /* Reines Weiß - kein Gradient mehr */
    position: relative;
    overflow: hidden;
    max-width: 100vw;
    border-bottom: 1px solid #e2e8f0; /* Subtile Trennlinie statt verspielter Effekte */
}

/* Gradient-Text entfernt - professionelle einfarbige Typografie */
.gradient-text {
    color: #4a90b8; /* Corporate Blau */
    -webkit-text-fill-color: #4a90b8;
}

/* Subtile Scroll-Animationen - modern & professionell */
.fade-in-section {
    opacity: 1; /* Standardmäßig sichtbar */
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section:not(.is-visible) {
    opacity: 1; /* Bleibt sichtbar auch ohne is-visible */
    transform: translateY(0);
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* Gradient-Animation entfernt - nicht mehr benötigt */

/* Floating-Elemente entfernt - professionelleres Design */
.hero-background::before,
.hero-background::after {
    display: none; /* Alle verspielten Elemente entfernt */
}

/* Cookie Banner */
#cookie-banner {
    display: none;
} 

/* Accessibility: Custom focus style for keyboard users, matching the brand identity */
:focus-visible {
    outline: none; /* Remove the default, often clunky browser outline */
    box-shadow: 0 0 0 3px rgba(74, 144, 184, 0.4); /* Corporate Blau mit Transparenz */
    border-radius: 4px; /* Optional: rounds the corners of the focus ring slightly */
    transition: box-shadow 0.2s ease-in-out; /* Smooth transition for the focus ring */
}

/* Hide focus styles from mouse users to avoid visual clutter, but keep them for keyboard and assistive tech users */
:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
} 

/* Gradient-Text entfernt - professionelle einfarbige Typografie */
.gradient-shift {
    color: #4a90b8; /* Corporate Blau */
    -webkit-text-fill-color: #4a90b8;
    animation: none; /* Keine Animation mehr */
} 

/* Animated background for call-to-action section */
.cta-background {
    position: relative;
    overflow: hidden;
    z-index: 0; /* establishes stacking context */
}

/* ensure content sits above animation */
.cta-background > * {
    position: relative;
    z-index: 1;
}

/* CTA-Ring-Animationen entfernt - professionelleres Design */
.cta-background::before,
.cta-background::after {
    display: none; /* Alle verspielten Animationen entfernt */
} 

/* CO2 Badge */
.co2-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: #2d9b8b; /* Corporate Türkis */
    color: #fff;
    font-weight: 600;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: -0.5px;
}

.text-justify {
    text-align: justify;
    hyphens: auto;
}

.no-break {
    white-space: nowrap;
}

.text-shadow-soft {
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.25), 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Dashboard-Style Banner mit Gradient - Volle Breite */
.dashboard-banner {
    background: linear-gradient(135deg, #2d9b8b 0%, #4a90b8 100%);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.dashboard-banner-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 3rem 2rem;
    border-radius: 0;
    position: relative;
}

/* Große Dashboard-Style Buttons */
.btn-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.btn-dashboard:hover {
    border-color: #4a90b8;
    box-shadow: 0 4px 12px rgba(74, 144, 184, 0.15);
    transform: translateY(-2px);
}

.btn-dashboard svg {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
}

.btn-dashboard-primary {
    background: #4a90b8;
    color: white;
    border-color: #4a90b8;
}

.btn-dashboard-primary:hover {
    background: #3a7a9a;
    border-color: #3a7a9a;
    box-shadow: 0 4px 12px rgba(74, 144, 184, 0.3);
}

/* Dashboard-Style Cards */
.card-dashboard {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card-dashboard:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-dashboard-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Status-Indikatoren wie im Dashboard */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #1e293b;
}

.status-indicator.success {
    color: #059669; /* Grün für positive Status */
}

.status-indicator.success::before {
    content: '✓';
    color: #059669;
    font-weight: bold;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #059669;
    display: inline-block;
}

/* Dashboard-Style Icon Grid */
.icon-grid {
    width: 48px;
    height: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.icon-grid-item {
    background: #4a90b8;
    border-radius: 2px;
}

/* Section Divider - Strich entfernt */
.section-divider {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Größere, professionellere Icon-Boxes */
.icon-box-modern {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-box-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 144, 184, 0.2);
}

/* Verbesserte Typografie-Hierarchie */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.005em;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
} 

/* Text-Stroke-Effekte entfernt - professionelleres Design */
.headline-highlight {
    /* Keine Text-Stroke-Effekte mehr */
}

.light-highlight {
    color: #475569; /* Einfarbig statt Text-Stroke */
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth button hover effects */
a[href="#kontakt"],
a[href*="mailto"] {
    transition: all 0.3s ease-in-out;
}

/* Progress Animation Styles */
.progress-point div {
    transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}

.progress-point div.bg-\[#2d9b8b\] {
    animation: pulse-point 0.3s ease-out;
}

@keyframes pulse-point {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1.2);
    }
}

#progress-line {
    transition: width 0.1s linear;
}

/* Sicherstellen, dass alle Sections und deren Inhalte über der Linie liegen */
section[id] {
    position: relative;
    z-index: 100;
    /* background-color wird NICHT überschrieben - behält bg-slate-50 wenn vorhanden */
}

section[id] > * {
    position: relative;
    z-index: 100;
}

section[id] .card-modern,
section[id] h2,
section[id] h3,
section[id] p,
section[id] .icon-box-modern {
    position: relative;
    z-index: 100;
    /* background-color wird NICHT überschrieben */
}

/* PERFORMANCE-MODE: Alle Transitionen und Animationen deaktivieren */
.performance-minimal *,
.performance-minimal *::before,
.performance-minimal *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-iteration-count: 1 !important;
}

/* Screenshot Carousel Styles - Single Row Horizontal Scrolling */
.screenshot-carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.screenshot-carousel-row {
    display: flex;
    gap: 0.25rem;
    animation: scroll-horizontal 80s linear infinite;
}

.screenshot-item {
    flex-shrink: 0;
}

.screenshot-item img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Animation: Von links nach rechts */
@keyframes scroll-horizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-83.33%);
    }
}

/* Pause on hover */
.screenshot-carousel-row:hover {
    animation-play-state: paused;
}

/* Legacy slide styles - will be removed */
.slideshow-container {
    position: relative;
    background: #f1f5f9;
    border-radius: 0.5rem;
}

.slide {
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    display: none !important;
}

.slide.fade {
    animation: none;
}

@keyframes fade {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 1;
    }
}

/* Performance mode: Disable slide animations */
.performance-minimal .slide {
    transition: none !important;
    animation: none !important;
}

/* Ensure images are responsive */
.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.25rem;
}

/* Navigation buttons */
.prev-slide,
.next-slide {
    z-index: 10;
    transition: all 0.3s ease;
}

.prev-slide:hover,
.next-slide:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-slide:active,
.next-slide:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dots styling */
.dots-container {
    flex-wrap: wrap;
    max-width: 100%;
}

.dot {
    transition: all 0.3s ease;
}

.dot:hover {
    transform: scale(1.25);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .prev-slide,
    .next-slide {
        padding: 0.5rem;
    }

    .prev-slide svg,
    .next-slide svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .dot {
        width: 0.5rem;
        height: 0.5rem;
    }

    .slide img {
        border-radius: 0;
    }

    .slideshow-container {
        aspect-ratio: 4/3;
    }
}

/* Small screens - adjust dots */
@media (max-width: 640px) {
    .dots-container {
        gap: 0.375rem;
        padding: 1rem;
    }

    .dot {
        width: 0.375rem;
        height: 0.375rem;
    }
}

/* Accessibility: Focus styles for slideshow controls */
.prev-slide:focus-visible,
.next-slide:focus-visible,
.dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 184, 0.5);
    border-radius: 9999px;
}

/* Image caption overlay styling */
.slide .absolute.bottom-0 {
    transition: opacity 0.3s ease;
}

.slide:hover .absolute.bottom-0 {
    opacity: 1;
}

/* Performance optimization: Use GPU acceleration for slides */
.slide {
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .slide.fade {
        animation: none;
        transition: none;
    }

    .prev-slide,
    .next-slide,
    .dot {
        transition: none;
    }
}