/**
 * Premium Glassmorphism Design System
 * Unified design across entire website
 * Created: 1. November 2025
 * Version: 1.0 - Production Ready
 */

/* ==========================================================================
   GLOBAL BACKGROUND WITH BUSINESS IMAGE
   ========================================================================== */

body:not(.homepage),
html:not(.homepage) {
    /* Clean white background - Hero section has own gradient */
    background: #ffffff !important;
    min-height: 100vh;
}

/* Ensure main containers are transparent */
main,
.parallax-container {
    background: transparent !important;
}

/* Subtle pattern overlay for depth - DISABLED to fix white background bug */
body::after {
    display: none !important;
    /* Commented out to prevent white overlay
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    */
}

/* ==========================================================================
   GLASSMORPHISM CARD SYSTEM - Used everywhere
   ========================================================================== */

.glass-card,
.section-card,
.content-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    -moz-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    padding: 3rem;
    margin: 2rem auto;
    max-width: 1400px;
    position: relative;
    overflow: hidden;
}

/* Firefox fallback - no backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
    .glass-card,
    .section-card,
    .content-card {
        background: rgba(255, 255, 255, 0.98);
    }
}

/* Portfolio Cards - Apply Glassmorphism Design */
.portfolio-card-white {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    -moz-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.portfolio-card-white:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Firefox fallback for portfolio cards */
@supports not (backdrop-filter: blur(20px)) {
    .portfolio-card-white {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Compliance Badges - Apply Glassmorphism Design */
.compliance-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    -moz-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.compliance-badge:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Firefox fallback for compliance badges */
@supports not (backdrop-filter: blur(20px)) {
    .compliance-badge {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Service Cards - Apply Glassmorphism Design */
.service-card,
.services-grid .service-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    -moz-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.service-card:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Firefox fallback for service cards */
@supports not (backdrop-filter: blur(20px)) {
    .service-card,
    .services-grid .service-card {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Subtle shimmer effect on hover */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

/* ==========================================================================
   HERO SECTION - Premium 3D Design
   ========================================================================== */

/* IMPORTANT: Exclude homepage - homepage uses custom gradient from homepage-hero-final.css */
body:not(.homepage) .hero-b2b,
body:not(.homepage) section.hero-b2b,
body:not(.homepage) .hero-b2b.scroll-section {
    background: transparent !important;
    padding: 8rem 2rem 8rem !important;
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    margin-top: 70px; /* Account for fixed header */
}

/* Hero Content as Glass Card */
.hero-b2b .hero-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    -moz-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 32px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 3rem 2.5rem !important;
    margin: 3rem auto !important;
    max-width: 1200px !important;
    width: 85% !important;
    text-align: center;

    /* 3D Transform for depth */
    transform: perspective(1000px) translateZ(0);
    transition: transform 0.3s ease;
}

/* Homepage-specific Desktop Styles */
.hero-b2b .hero-content h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.hero-b2b .trust-badge {
    font-size: 1rem !important;
    padding: 0.75rem 1.5rem !important;
    display: inline-block !important;
    margin: 0 auto 1rem !important;
    line-height: 1.8 !important;
    text-align: left !important;
}

.trust-badge .checkmark {
    color: #22c55e !important;
    font-weight: 700 !important;
}

.hero-actions a[href="/roi-rechner.html"] {
    color: #000 !important;
}

/* Grid Layout - Only for pages using .hero-content-grid */
.hero-content-grid {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    -moz-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 32px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 3rem 2.5rem !important;
    margin: 3rem auto !important;
    max-width: 1200px !important;
    width: 85% !important;

    /* Grid Layout */
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
    align-items: center !important;

    /* 3D Transform for depth */
    transform: perspective(1000px) translateZ(0);
    transition: transform 0.3s ease;
}

/* Firefox fallback for hero */
@supports not (backdrop-filter: blur(30px)) {
    .hero-b2b .hero-content,
    .hero-content-grid {
        background: rgba(255, 255, 255, 0.96);
    }
}

.hero-b2b .hero-content:hover,
.hero-content-grid:hover {
    transform: perspective(1000px) translateZ(10px);
}

/* ==========================================================================
   SECTION SPACING - Gaps to show background
   ========================================================================== */

section {
    margin: 4rem 0;
    padding: 0 2rem;
}

/* First section after hero has more gap */
section:first-of-type {
    margin-top: 6rem;
}

/* ==========================================================================
   RESPONSIVE - MOBILE (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Single column layout - FIX TEXT OVERFLOW */
    .hero-b2b .hero-content {
        padding: 2.5rem 1.5rem !important;
        border-radius: 24px !important;
        margin: 2rem auto !important;
        width: calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /* Grid layout for other pages */
    .hero-content-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem 1rem !important;
        border-radius: 24px;
        margin: 0 1rem !important;
        width: calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        box-sizing: border-box !important;
    }

    /* All child elements must not overflow */
    .hero-b2b .hero-content > *,
    .hero-content-grid > * {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }

    .glass-card,
    .section-card,
    .content-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 1.5rem auto;
    }

    .hero-b2b {
        padding: 6rem 0.5rem 4rem !important;
        min-height: auto;
    }

    section {
        padding: 0 1rem;
        margin: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-b2b .hero-content {
        padding: 2rem 1.25rem !important;
        border-radius: 20px !important;
        margin: 1.5rem auto !important;
        width: calc(100% - 1.5rem) !important;
        max-width: calc(100% - 1.5rem) !important;
        text-align: center !important;
    }

    .hero-content-grid {
        padding: 1.5rem 0.75rem !important;
        border-radius: 20px;
        margin: 0 0.5rem !important;
        width: calc(100% - 1rem) !important;
        max-width: calc(100% - 1rem) !important;
    }

    .glass-card,
    .section-card,
    .content-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .hero-b2b {
        padding: 6rem 0.25rem 4rem !important;
    }
}

/* ==========================================================================
   TYPOGRAPHY FIXES - Proper sizing, no overflow
   ========================================================================== */

/* Desktop */
.hero-title,
.hero-content h1,
.hero-content-grid h1 {
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    color: var(--color-text-primary) !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-subtitle,
.hero-content .subtitle,
.hero-content-grid .subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem) !important;
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
    color: var(--color-text-secondary) !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mobile specific overrides */
@media (max-width: 768px) {
    .hero-title,
    .hero-content h1,
    .hero-content-grid h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
    }

    .hero-subtitle,
    .hero-content .subtitle,
    .hero-content-grid .subtitle {
        font-size: 0.95rem !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }

    /* All text elements */
    .hero-content p,
    .hero-content-grid p,
    .hero-content li,
    .hero-content-grid li {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .hero-title,
    .hero-content h1,
    .hero-content-grid h1 {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }

    .hero-subtitle,
    .hero-content .subtitle,
    .hero-content-grid .subtitle {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    .hero-content p,
    .hero-content-grid p {
        font-size: 0.85rem !important;
    }
}

/* ==========================================================================
   BUTTONS - Unified styling
   ========================================================================== */

.hero-actions {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    margin-top: 2rem !important;
}

.hero-actions a,
.hero-actions .btn {
    flex: 1 1 auto;
    min-width: 200px;
    padding: 1rem 2rem !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }

    .hero-actions a,
    .hero-actions .btn {
        width: 100% !important;
        min-width: unset !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.95rem !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   STATS & BADGES - Clean layout
   ========================================================================== */

.hero-stats-compact {
    display: flex !important;
    gap: 1.5rem !important;
    flex-wrap: wrap !important;
    margin: 2rem 0 !important;
}

.stat-compact {
    flex: 1 1 auto;
    min-width: 100px;
    text-align: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .hero-stats-compact {
        gap: 0.75rem !important;
        margin: 1.5rem 0 !important;
    }

    .stat-compact {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .stat-compact {
        flex: 1 1 calc(50% - 0.375rem);
    }

    .stat-compact:nth-child(3) {
        flex-basis: 100%;
    }
}

@media (max-width: 375px) {
    .stat-compact {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   TRUST BADGES - Responsive wrapping
   ========================================================================== */

.trust-indicators,
.hero-trust-indicators {
    display: flex !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    margin: 1.5rem 0 !important;
}

.trust-badge,
.hero-trust-badge {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .trust-indicators,
    .hero-trust-indicators {
        justify-content: center !important;
        gap: 0.5rem !important;
        margin: 1rem 0 !important;
    }

    .trust-badge,
    .hero-trust-badge {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   TOOL PREVIEW - Proper sizing
   ========================================================================== */

.tool-preview-container {
    width: 100%;
    max-width: 100%;
}

.browser-mockup {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

@media (max-width: 768px) {
    .tool-preview-container {
        margin-top: 1.5rem;
        padding: 0 !important;
    }

    .browser-mockup {
        transform: scale(0.95);
        transform-origin: center;
    }
}

/* ==========================================================================
   PARALLAX EFFECT - Smooth scrolling
   ========================================================================== */

@media (min-width: 769px) {
    .parallax-layer {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: -1;
        will-change: transform;
        pointer-events: none;
    }
}

@media (max-width: 768px) {
    /* Disable parallax on mobile for performance */
    .parallax-layer {
        display: none;
    }
}

/* ==========================================================================
   ANTI-OVERFLOW - Prevent any horizontal scroll
   ========================================================================== */

* {
    max-width: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

.hero-content > *,
.hero-content-grid > * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
