/* ================================================
   BASE.CSS - Gemeinsame Komponenten für alle Seiten
   Sami-Konzeptwerk
   ================================================ */

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

:root {
    /* Light Mode Colors */
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #64748b;
    /* Neutralized accent */
    --success-color: #16a34a;
    --warning-color: #d97706;
    --error-color: #dc2626;

    /* REPLACED: Solid Professional Accents */
    --accent-purple: #475569;
    --accent-violet: #475569;
    --accent-indigo: #475569;
    --accent-cyan: #475569;
    --accent-teal: #475569;
    --accent-deep: #334155;

    /* Light Mode Background & Text */
    --bg-primary: #ffffff;
    --bg-secondary: #eef2f6;
    /* Distinct Cool Gray for separation */
    --bg-tertiary: #e2e8f0;
    /* Slate-200 */
    --bg-accent: #f8fafc;
    /* Slate-50 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    /* Stronger border for clarity */
    --border-accent: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.05);

    /* Component Colors */
    --card-bg: #ffffff;
    --nav-bg: #ffffff;
    /* Solid White */
    --footer-bg: #1e293b;

    /* Gradients - REDEFINED AS SOLIDS OR SUBTLE */
    --gradient-primary: #2563eb;
    --gradient-accent: #475569;
    --gradient-purple: #475569;
    --gradient-vibrant: #2563eb;
    --gradient-warm: #475569;
    --gradient-dark-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);

    /* REMOVED: Glassmorphism */
    --glass-bg: #ffffff;
    --glass-bg-strong: #ffffff;
    --glass-border: #e2e8f0;
    --glass-blur: 0px;
    --glass-shadow: none;

    /* REMOVED: Accent Glows */
    --glow-primary: none;
    --glow-accent: none;
    --glow-soft: none;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    --spacing-5xl: 8rem;

    /* Border Radius - Soft Design */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-3xl: 2.5rem;
    --radius-full: 9999px;

    /* Shadows - Soft & Subtle */
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.4);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-soft-lg: 0 8px 40px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);
    --shadow-colored: 0 20px 40px -15px rgba(124, 58, 237, 0.3);
    --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Colors */
.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);

    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --footer-bg: #1e293b;
}

html {
    font-size: 85%;
    /* Scales everything down by 15% */
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

body::-webkit-scrollbar {
    display: none;
}

.container {
    max-width: 75rem;
    /* 1200px / 16 */
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.accent-text {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 75rem;
    /* 1200px / 16 */
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
    /* 80px / 16 */
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    position: relative;
    width: 2.5rem;
    /* 40px / 16 */
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-s {
    width: 2rem;
    /* 32px / 16 */
    height: 2rem;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    transition: transform var(--transition-normal);
}

.logo:hover .logo-s {
    transform: scale(1.05);
}

.logo-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #22223b;
    transition: color 0.3s;
}

.dark-mode .logo-text {
    color: #f8fafc;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-2xl);
}

.nav-icon {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all var(--transition-normal);
    padding: var(--spacing-sm) 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

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

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 2.75rem;
    /* 44px / 16 */
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: var(--shadow-md);
}

.theme-toggle {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.light-mode .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.light-mode .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0.5);
}

.dark-mode .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
}

.dark-mode .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-2xl);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

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

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-primary.large,
.btn-secondary.large {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

.btn-primary:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: var(--shadow-xl);
}

.btn-primary {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px) translateZ(0);
}

.btn-secondary {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, background-color, border-color;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-arrow {
    transition: transform var(--transition-normal);
}

.btn-primary:hover .btn-arrow,
.btn-secondary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-text-full {
    display: inline;
}

.btn-text-short {
    display: none;
}

/* Button shine effect */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -150%;
    left: -50%;
    width: 60%;
    height: 300%;
    transform: rotate(25deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: translateX(250%) rotate(25deg);
}

/* Page Header */
.page-header {
    padding: 7.5rem var(--spacing-xl) var(--spacing-3xl);
    /* 120px / 16 */
    text-align: center;
    background: var(--bg-secondary);
    overflow: hidden;
    isolation: isolate;
    position: relative;
}

/* Page Header Background (similar but subtler than hero) */
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 70% at 15% 25%, rgba(37, 99, 235, 0.25), transparent 55%),
        radial-gradient(ellipse 70% 60% at 85% 65%, rgba(124, 58, 237, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(6, 182, 212, 0.18), transparent 65%),
        radial-gradient(ellipse 50% 40% at 70% 20%, rgba(220, 38, 38, 0.12), transparent 50%);
}

.dark-mode .page-header::before {
    background:
        radial-gradient(ellipse 90% 70% at 15% 25%, rgba(37, 99, 235, 0.3), transparent 55%),
        radial-gradient(ellipse 70% 60% at 85% 65%, rgba(124, 58, 237, 0.25), transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(6, 182, 212, 0.2), transparent 65%),
        radial-gradient(ellipse 50% 40% at 70% 20%, rgba(220, 38, 38, 0.15), transparent 50%);
}

.header-content h1 {
    margin-bottom: var(--spacing-md);
}

.header-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-md);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Top and bottom fade effects */
.cta-section::before,
.cta-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 5rem;
    /* 80px / 16 */
    pointer-events: none;
    z-index: 1;
}

.cta-section::before {
    top: 0;
    background: linear-gradient(to bottom,
            rgba(37, 99, 235, 0.08) 0%,
            rgba(124, 58, 237, 0.05) 30%,
            transparent 100%);
}

.cta-section::after {
    bottom: 0;
    background: linear-gradient(to top,
            rgba(37, 99, 235, 0.08) 0%,
            rgba(124, 58, 237, 0.05) 30%,
            transparent 100%);
}

.dark-mode .cta-section::before {
    background: linear-gradient(to bottom,
            rgba(37, 99, 235, 0.12) 0%,
            rgba(124, 58, 237, 0.08) 30%,
            transparent 100%);
}

.dark-mode .cta-section::after {
    background: linear-gradient(to top,
            rgba(37, 99, 235, 0.12) 0%,
            rgba(124, 58, 237, 0.08) 30%,
            transparent 100%);
}

/* CTA Wave Animation Background */
.cta-ocean {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.cta-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 6.25rem;
    /* 100px / 16 */
    background: linear-gradient(to bottom, transparent 0%, rgba(37, 99, 235, 0.08) 100%);
    animation: ctaWave 8s ease-in-out infinite;
    transform-origin: bottom center;
}

.cta-wave::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 120% 80% at 25% 100%, rgba(37, 99, 235, 0.12), transparent 50%),
        radial-gradient(ellipse 100% 60% at 75% 100%, rgba(124, 58, 237, 0.1), transparent 50%);
}

.cta-wave:nth-child(2) {
    height: 5rem;
    /* 80px / 16 */
    animation: ctaWave 6s ease-in-out -1s infinite reverse;
    opacity: 0.7;
}

.cta-wave:nth-child(2)::before {
    background:
        radial-gradient(ellipse 100% 70% at 60% 100%, rgba(6, 182, 212, 0.1), transparent 50%),
        radial-gradient(ellipse 80% 50% at 30% 100%, rgba(124, 58, 237, 0.08), transparent 50%);
}

@keyframes ctaWave {

    0%,
    100% {
        transform: translateX(0) scaleY(1);
    }

    25% {
        transform: translateX(-5%) scaleY(1.1);
    }

    50% {
        transform: translateX(-10%) scaleY(0.9);
    }

    75% {
        transform: translateX(-5%) scaleY(1.05);
    }
}

/* Floating particles for CTA - Base styles, positions set by JS */
.cta-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cta-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: ctaFloat 5s ease-in-out infinite;
}

@keyframes ctaFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0.7;
    }
}

.dark-mode .cta-wave::before {
    background:
        radial-gradient(ellipse 120% 80% at 25% 100%, rgba(37, 99, 235, 0.18), transparent 50%),
        radial-gradient(ellipse 100% 60% at 75% 100%, rgba(124, 58, 237, 0.15), transparent 50%);
}

.dark-mode .cta-wave:nth-child(2)::before {
    background:
        radial-gradient(ellipse 100% 70% at 60% 100%, rgba(6, 182, 212, 0.15), transparent 50%),
        radial-gradient(ellipse 80% 50% at 30% 100%, rgba(124, 58, 237, 0.12), transparent 50%);
}

.dark-mode .cta-particle {
    opacity: 0.7;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    .cta-wave,
    .cta-particle {
        animation: none;
    }
}

/* CTA Container should be above particles */
.cta-section>.container {
    position: relative;
    z-index: 2;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer - Always Dark Mode */
.footer {
    background: #1e293b;
    border-top: 1px solid #334155;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    color: #f8fafc;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    max-width: 280px;
}

.footer .logo-text {
    color: #f8fafc;
}

.footer-description {
    margin: var(--spacing-md) 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.footer-links {
    display: contents;
}

.footer-column h4 {
    margin-bottom: var(--spacing-md);
    color: #f8fafc;
    font-size: 1rem;
    white-space: nowrap;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color var(--transition-normal);
    white-space: nowrap;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: #60a5fa;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid #334155;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-legal a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-normal);
    white-space: nowrap;
}

.footer-legal a:hover {
    color: #60a5fa;
}

/* ------------------- GLASSMORPHISM COMPONENTS ------------------- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: var(--glass-bg-strong);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-4px);
}

.dark-mode .glass-card {
    background: var(--bg-secondary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

/* ------------------- MODERN CARDS ------------------- */
.modern-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-vibrant);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.modern-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-colored);
    transform: translateY(-6px);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

/* ------------------- ACCENT BORDERS & DECORATIONS ------------------- */
.accent-border-left {
    border-left: 4px solid transparent;
    border-image: var(--gradient-purple) 1;
    padding-left: var(--spacing-lg);
}

.accent-border-top {
    position: relative;
}

.accent-border-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-vibrant);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

.accent-glow {
    box-shadow: var(--glow-accent);
}

.accent-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--gradient-vibrant);
    border-radius: 50%;
    margin-right: var(--spacing-sm);
    animation: pulse-dot 2s infinite;
}

/* ------------------- REVEAL ON SCROLL ANIMATIONS ------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s var(--transition-spring);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.stagger-children>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children>*:nth-child(6) {
    transition-delay: 0.6s;
}

/* ------------------- STICKY ELEMENTS ------------------- */
.sticky-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 90%;
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    text-align: center;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success-color), #22c55e);
}

.modal-icon.error {
    background: linear-gradient(135deg, var(--error-color), #ef4444);
}

.modal h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.modal p {
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.modal-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 100px;
}

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

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.modal-btn-primary:active {
    transform: translateY(0);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.mt-0 {
    margin-top: 0;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.1s;
}

.fade-in-delay-2 {
    animation-delay: 0.2s;
}

.fade-in-delay-3 {
    animation-delay: 0.3s;
}

.fade-in-delay-4 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-in-down {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-slide-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.animate-visible {
    opacity: 1;
    transform: none;
}

.animate-delay-1 {
    transition-delay: 0.1s;
}

.animate-delay-2 {
    transition-delay: 0.2s;
}

.animate-delay-3 {
    transition-delay: 0.3s;
}

.animate-delay-4 {
    transition-delay: 0.4s;
}

.animate-delay-5 {
    transition-delay: 0.5s;
}

.animate-delay-6 {
    transition-delay: 0.6s;
}

.animate-delay-7 {
    transition-delay: 0.7s;
}

.animate-delay-8 {
    transition-delay: 0.8s;
}

body.loaded .hero-title {
    animation: fadeInUp 1s ease-out forwards;
}

body.loaded .hero-subtitle {
    opacity: 1;
    transform: none;
}

body.loaded .hero-buttons {
    opacity: 1;
    transform: none;
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .cta-section {
        display: none;
    }

    .page-header {
        padding-top: var(--spacing-xl);
    }

    body {
        background: white;
        color: black;
    }

    .card-bg,
    .bg-secondary,
    .bg-tertiary {
        background: white;
    }
}

/* ================================================
   RESPONSIVE DESIGN - Base Breakpoints
   ================================================ */

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .footer-brand {
        max-width: 220px;
    }

    .footer-column h4 {
        font-size: 0.9rem;
    }

    .footer-column a {
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-column: 1 / -1;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .footer-column {
        text-align: left;
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    .container {
        padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
        height: 70px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-s {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .theme-toggle {
        width: 48px;
        height: 48px;
        touch-action: manipulation;
    }

    .hamburger {
        display: flex;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 12px;
        touch-action: manipulation;
        cursor: pointer;
    }

    .hamburger span {
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 24px 20px;
        transition: left var(--transition-normal);
        border-top: 1px solid var(--border-color);
        gap: 0;
        overflow-y: auto;
    }

    .nav-link {
        padding: 16px 20px;
        font-size: 18px;
        text-align: left;
        border-radius: var(--radius-md);
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-icon {
        display: block;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        stroke: currentColor;
    }

    .nav-link:active {
        background: var(--bg-tertiary);
        transform: scale(0.98);
    }

    .nav-link::before {
        display: none;
    }

    .nav-link.active {
        background: var(--bg-secondary);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .btn-text-full {
        display: none;
    }

    .btn-text-short {
        display: inline;
    }

    .btn-primary,
    .btn-secondary {
        flex: 1;
        max-width: 50%;
        min-height: 52px;
        padding: 12px 12px;
        font-size: 0.875rem;
        justify-content: center;
        touch-action: manipulation;
    }

    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.97);
    }

    .btn-primary.large,
    .btn-secondary.large {
        min-height: 60px;
        padding: 18px 28px;
        font-size: 1.125rem;
    }

    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.375rem;
        line-height: 1.3;
    }

    h4 {
        font-size: 1.125rem;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .page-header {
        padding: 100px 20px 48px;
    }

    .header-content h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .header-content p {
        font-size: 1.125rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        margin-bottom: 12px;
    }

    .section-header p {
        font-size: 1.0625rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }

    .cta-content p {
        font-size: 1.0625rem;
        margin-bottom: 28px;
    }

    .footer {
        padding: 48px 0 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 32px;
    }

    .footer-brand {
        text-align: left;
    }

    .footer-column h4 {
        font-size: 1.125rem;
        margin-bottom: 16px;
    }

    .footer-column li {
        margin-bottom: 12px;
    }

    .footer-column {
        padding: 0;
        overflow: hidden;
    }

    .footer-column h4 {
        margin: 0;
        padding: 16px 0;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: transparent;
        user-select: none;
        transition: all var(--transition-normal);
        border-bottom: 0.1px solid var(--border-color);
    }

    .footer-column h4:active {
        transform: scale(0.98);
    }

    .footer-column h4::after {
        content: '\25BC';
        font-size: 0.75rem;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--text-secondary);
    }

    .footer-column.active h4::after {
        transform: rotate(180deg);
    }

    .footer-column ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
        padding: 0;
    }

    .footer-column.active ul {
        max-height: 500px;
        padding: 12px 0 16px;
    }

    .footer-column a {
        font-size: 1rem;
        min-height: 32px;
        display: inline-block;
        padding: 4px 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: left;
        padding-top: 24px;
    }

    .footer-bottom p {
        font-size: 0.9375rem;
    }

    .footer-legal {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .footer-legal a {
        font-size: 0.9375rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Modal mobile */
    .modal {
        width: 85%;
        padding: var(--spacing-xl);
    }

    .modal-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .modal-btn {
        min-height: 48px;
        touch-action: manipulation;
    }

    /* Reduce animation intensity on mobile */
    .reveal-on-scroll,
    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }

    /* Cards mobile */
    .modern-card {
        padding: var(--spacing-lg);
    }

    .modern-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .page-header {
        padding: 100px 16px 40px;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .header-content p {
        font-size: 1.0625rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 1rem;
        padding: 14px 20px;
    }

    .btn-primary.large,
    .btn-secondary.large {
        font-size: 1.0625rem;
        padding: 16px 24px;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        text-align: center;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-bottom {
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* Touch device optimizations */
@media (hover: none) {

    .modern-card:hover,
    .glass-card:hover {
        transform: none;
    }

    .modern-card:active {
        transform: scale(0.98);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    .reveal-on-scroll,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body.loaded .hero-title,
    body.loaded .hero-subtitle,
    body.loaded .hero-buttons {
        animation: none;
        opacity: 1;
    }

    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-zoom-in,
    .animate-slide-in-up,
    .animate-fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ================================================
   TEXT READABILITY FIXES - Colored Backgrounds
   ================================================ */

/* Ensure text is white on gradient/colored backgrounds */
[style*="background: var(--gradient"] h1,
[style*="background: var(--gradient"] h2,
[style*="background: var(--gradient"] h3,
[style*="background: var(--gradient"] h4,
[style*="background: var(--gradient"] p,
[style*="background: var(--gradient"] span,
[style*="background: var(--gradient"] li {
    color: white;
}

/* Gradient section text */
.gradient-text-section h2,
.gradient-text-section h3,
.gradient-text-section p {
    color: white;
}

/* ================================================
   COOKIE CONSENT BANNER
   ================================================ */

#cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 360px;
    width: calc(100vw - 3rem);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#cookie-banner.cookie-banner--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#cookie-banner.cookie-banner--hidden {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    pointer-events: none;
}

.cookie-inner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cookie-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.cookie-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.cookie-text p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

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

.cookie-text a:hover {
    opacity: 0.8;
}

.cookie-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.cookie-btn--primary {
    background: var(--primary-color);
    color: #ffffff;
}

.cookie-btn--primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cookie-btn--secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn--secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Dark mode adjustments */
.dark-mode #cookie-banner {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile */
@media (max-width: 480px) {
    #cookie-banner {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        min-width: 0;
        text-align: center;
    }
}

/* ================================================
   HOVER-EFFEKTE AUF TOUCH-GERÄTEN DEAKTIVIEREN
   @media (hover: none) trifft Geräte ohne Mauszeiger (Handys, Tablets)
   ================================================ */
@media (hover: none) {

    /* Buttons */
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Cards */
    .modern-card:hover,
    .glass-card:hover,
    .portfolio-card:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: var(--border-color) !important;
    }

    .modern-card:hover::before {
        transform: scaleX(0) !important;
    }

    /* Horizontal Scroll Items */
    .horizontal-scroll-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Portfolio card images */
    .portfolio-card:hover .portfolio-image img {
        transform: none !important;
    }

    /* Navigation Links */
    .nav-link:hover {
        transform: none !important;
    }

    /* Filter Buttons */
    .filter-btn:hover {
        border-color: var(--border-color) !important;
        color: var(--text-primary) !important;
        background: var(--bg-primary) !important;
    }

    /* Slider Arrows */
    .slider-arrow:hover {
        transform: none !important;
        background: transparent !important;
        color: var(--text-muted) !important;
    }

    /* Footer Links */
    .footer-column a:hover,
    .footer-legal a:hover {
        color: inherit !important;
    }

    /* Detail Tags */
    .detail-tags span:hover {
        transform: none !important;
        border-color: var(--border-color) !important;
        color: var(--text-primary) !important;
    }

    /* Close Modal Button */
    .close-modal-btn:hover {
        transform: none !important;
        background: var(--bg-primary) !important;
        color: var(--text-secondary) !important;
        border-color: var(--border-color) !important;
    }
}