/* ============================================================
   performance.css — Mobile Performance Optimizations
   Fokus4IT Website
   ============================================================ */

/* ----------------------------------------------------------
   1. Disable GPU-heavy backdrop-filter on mobile
      backdrop-filter: blur() forces GPU compositing layers —
      the single most expensive CSS property on mobile.
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    /* Disable backdrop-filter for all themes */
    .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Dark mode: keep dark background */
    .dark .glass-panel {
        background: rgba(45, 52, 73, 0.93) !important;
    }

    /* Light mode: white background — high specificity to beat all overrides */
    html.light .glass-panel,
    .light .glass-panel {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07) !important;
    }

    .modal-overlay.active {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(6, 14, 32, 0.95) !important;
    }

    /* Header backdrop-blur (Tailwind class overridden here) */
    header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(11, 19, 38, 0.97) !important;
    }

    /* Light mode: header becomes white on mobile */
    .light header {
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    /* Light mode: contact section background */
    .light #contact-cta-section {
        background-color: #f1f5f9 !important;
    }

    /* Light mode: Impressum & Nach oben buttons in contact section */
    .light .bg-surface-container-highest {
        background-color: #e2e8f0 !important;
        color: #0f172a !important;
    }

    .light .text-on-surface {
        color: #0f172a !important;
    }
}

/* ----------------------------------------------------------
   2. Hide decorative blur blobs on mobile
      Large elements with blur-[120px] trigger expensive
      GPU paint layers on every scroll frame.
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    .hero-glow {
        display: none !important;
    }

    .blur-decorative {
        display: none !important;
    }

    /* Grid pattern background = extra repaint cost */
    .grid-overlay {
        background-image: none !important;
    }
}

/* ----------------------------------------------------------
   3. Reduce transition overhead on touch devices
      Hover transitions don't benefit touch users.
      Shorter durations = less paint time per frame.
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    /* Shorten decorative transitions, but preserve functional ones */
    *:not(.hero-slide):not(.reveal):not(.ampel-card),
    *:not(.hero-slide):not(.reveal):not(.ampel-card)::before,
    *:not(.hero-slide):not(.reveal):not(.ampel-card)::after {
        transition-duration: 0.1s !important;
    }

    /* Image scale-on-hover: visually useless on touch */
    .group img {
        transform: none !important;
        transition: none !important;
    }

    /* FAB: simplify shadow animation */
    button.fixed {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    }

    /* Slideshow: slightly smaller on mobile */
    #hero-slideshow {
        height: 260px !important;
    }

}

/* ----------------------------------------------------------
   4. Respect "Reduce Motion" OS setting on all devices
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-pulse {
        animation: none !important;
    }

    .logo-shake {
        animation: none !important;
    }
}

/* ----------------------------------------------------------
   Hero Slideshow
   ---------------------------------------------------------- */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.9s ease;
}
.hero-slide.active {
    opacity: 1;
}
.slideshow-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background 0.3s, transform 0.3s;
}
.slideshow-dot.active {
    background: #d2bbff;
    transform: scale(1.4);
}


/* ----------------------------------------------------------
   Site-wide scroll reveal animation
   ---------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------------------------
   Ampel-System: Hover Glow Effect
   Jede Karte leuchtet beim Hovern in ihrer eigenen Farbe auf.
   ---------------------------------------------------------- */
.ampel-card {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.65s ease, transform 0.65s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.ampel-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ampel-red:hover {
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.3),
        0 0 28px 6px rgba(239, 68, 68, 0.22),
        0 8px 32px rgba(239, 68, 68, 0.2);
    border-left-color: rgba(248, 113, 113, 0.95) !important;
    transform: translateY(-3px);
}

.ampel-yellow:hover {
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.25),
        0 0 24px 4px rgba(245, 158, 11, 0.2),
        0 8px 32px rgba(245, 158, 11, 0.15);
    border-left-color: rgba(251, 191, 36, 0.9) !important;
    transform: translateY(-3px);
}

.ampel-green:hover {
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.25),
        0 0 24px 4px rgba(34, 197, 94, 0.2),
        0 8px 32px rgba(34, 197, 94, 0.15);
    border-left-color: rgba(74, 222, 128, 0.9) !important;
    transform: translateY(-3px);
}

/* ----------------------------------------------------------
   5. CSS containment: limit browser layout recalculation
      "layout style" tells the browser each section is
      independent — avoids full-page reflow on changes.
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    main > section {
        contain: layout style;
    }
}

/* ----------------------------------------------------------
   Mobile Navigation: Panel styles (Dark + Light)
   ---------------------------------------------------------- */
.mobile-menu-panel {
    background: rgba(11, 19, 38, 0.98);
}

.mobile-menu-item {
    color: #cbd5e1;
    transition: background 0.15s, color 0.15s;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    color: #d2bbff;
    background: rgba(124, 58, 237, 0.12);
}

/* Light mode: mobile menu */
.light .mobile-menu-panel {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.light .mobile-menu-item {
    color: #1e293b;
}

.light .mobile-menu-item:hover,
.light .mobile-menu-item:active {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}

/* ----------------------------------------------------------
   Light Mode: Missing contrast fixes
   ---------------------------------------------------------- */

/* Page background */
.light body {
    background-color: #f1f5f9 !important;
}

/* text-on-background uses the Tailwind variable (#dae2fd in dark)
   — override to near-black in light mode.
   Exclude industry-card-text (needs white on dark image overlay) */
.light .text-on-background {
    color: #0f172a;
}
.light h1, .light h2, .light h4 {
    color: #0f172a;
}
/* h3 only where NOT inside an image overlay */
.light h3 {
    color: #0f172a;
}
.light .industry-card-text h3,
.light .industry-card-text p {
    color: #ffffff !important;
    text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}

/* Ampel titles: black in light mode */
.light .ampel-red h3,
.light .ampel-yellow h3,
.light .ampel-green h3 { color: #0f172a !important; }

/* "Weitere Dienstleistungen" card: fix dark gradient in light mode */
html.light .services-discover-card,
.light .services-discover-card {
    background: linear-gradient(135deg, #ede9fe, #dbeafe) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
}
html.light .services-discover-card span,
.light .services-discover-card span {
    color: #7c3aed !important;
}

/* text-slate-300 is almost invisible on white */
.light .text-slate-300 {
    color: #334155 !important;
    font-weight: 500;
}

/* Section backgrounds */
.light section,
.light .bg-surface-container-low {
    background-color: #f8fafc;
}

.light .bg-surface-container-lowest {
    background-color: #ffffff;
}

.light .bg-surface-container-high,
.light .bg-surface-container-highest {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* primary/10 tinted bento card in services */
.light .bg-primary\/10 {
    background-color: rgba(124, 58, 237, 0.07) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
}

/* Footer */
.light footer {
    background-color: #e2e8f0 !important;
    border-top: 1px solid #cbd5e1;
}

/* gradient text (from-primary to-tertiary) stays visible in light */
.light .bg-gradient-to-r.from-primary.to-tertiary,
.light .from-primary.to-tertiary {
    /* keep the gradient — it's already colorful enough */
}

/* Ampel cards in light mode */
.light .ampel-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
}

/* "Get Started" CTA button — text must stay white/dark on gradient */
.light .from-primary.to-primary-container {
    color: #ffffff;
}

/* on-primary text (button labels) */
.light .text-on-primary {
    color: #ffffff !important;
}

/* Modals in light mode */
.light .modal-overlay.active {
    background: rgba(15, 23, 42, 0.7) !important;
}

.light .bg-surface-container-high.rounded-\[2rem\],
.light [class*="bg-surface-container-high"][class*="rounded-"] {
    background-color: #ffffff !important;
    color: #0f172a;
}

/* on-surface-variant in light */
.light .text-on-surface-variant {
    color: #475569 !important;
}

/* outline-variant borders in light */
.light .border-outline-variant\/20,
.light .border-outline-variant\/15,
.light .border-outline-variant\/10 {
    border-color: #cbd5e1 !important;
}

/* Nav header buttons in light */
.light nav button.text-slate-400 {
    color: #334155 !important;
}

.light nav button.text-slate-400:hover {
    color: #7c3aed !important;
}

/* theme toggle icon */
.light #theme-toggle {
    color: #475569;
}

/* FAB button stays visible */
.light button.fixed.bottom-8 {
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

/* Ampel badges: black text in light mode for readability */
.light .ampel-badge {
    color: #0f172a !important;
}

/* Geschäftsführer text: black in light mode */
.light .geschaeftsfuehrer-text,
.light .geschaeftsfuehrer-text strong {
    color: #0f172a !important;
}

/* ----------------------------------------------------------
   Cookie Consent Banner
   ---------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 200;
    max-width: 46rem;
    margin: 0 auto;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 51, 234, 0.15);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.cookie-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cookie-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 1.4rem;
}
.cookie-banner-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(147, 51, 234, 0.08));
    border: 1px solid rgba(147, 51, 234, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d2bbff;
}
.cookie-banner-icon .material-symbols-outlined {
    font-size: 1.5rem;
}
.cookie-banner-text {
    flex: 1 1 18rem;
    min-width: 0;
}
.cookie-banner-text h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
}
.cookie-banner-text p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}
.cookie-link {
    background: none;
    border: none;
    color: #d2bbff;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.cookie-link:hover {
    color: #ffffff;
}
.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 0.6rem 1.1rem;
    border-radius: 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.cookie-btn:hover {
    transform: translateY(-1px);
}
.cookie-btn-primary {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}
.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
}
.cookie-btn-secondary {
    background: transparent;
    color: #cbd5e1;
    border-color: rgba(203, 213, 225, 0.25);
}
.cookie-btn-secondary:hover {
    background: rgba(203, 213, 225, 0.08);
    border-color: rgba(203, 213, 225, 0.4);
}

/* Light mode cookie banner */
.light .cookie-banner {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.1);
}
.light .cookie-banner-text h3 { color: #0f172a; }
.light .cookie-banner-text p { color: #475569; }
.light .cookie-link { color: #7c3aed; }
.light .cookie-btn-secondary { color: #475569; border-color: rgba(15, 23, 42, 0.2); }
.light .cookie-btn-secondary:hover { background: rgba(15, 23, 42, 0.05); }

/* Mobile: compact, stacked, icon-less */
@media (max-width: 640px) {
    .cookie-banner {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        border-radius: 1rem;
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0.9rem 1rem 1rem;
        gap: 0.75rem;
    }
    /* Hide the decorative icon on mobile to save space */
    .cookie-banner-icon {
        display: none;
    }
    .cookie-banner-text h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    .cookie-banner-text p {
        font-size: 0.75rem;
        line-height: 1.45;
    }
    .cookie-banner-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    .cookie-btn {
        flex: 1;
        text-align: center;
        padding: 0.7rem 0.5rem;
        font-size: 0.8rem;
        min-width: 0;
    }
}

/* Very small screens: even tighter */
@media (max-width: 380px) {
    .cookie-banner-inner {
        padding: 0.8rem;
    }
    .cookie-banner-text p {
        font-size: 0.72rem;
    }
    .cookie-btn {
        padding: 0.65rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* ----------------------------------------------------------
   Industry Cards: clickable hint + smooth hover
   (no backdrop-filter — avoids GPU cost during hover)
   ---------------------------------------------------------- */
.industry-card {
    transition: transform 0.3s ease;
}
.industry-card:hover {
    transform: translateY(-4px);
}
.industry-card-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.85);
    border: 1px solid rgba(210, 187, 255, 0.5);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.25s ease, transform 0.25s ease;
}
.industry-card:hover .industry-card-hint {
    background: rgba(147, 51, 234, 1);
    transform: translateX(3px);
}
.light .industry-card-hint {
    background: rgba(124, 58, 237, 0.95);
    color: #ffffff;
}

/* ----------------------------------------------------------
   Modal transitions — opacity/transform only for GPU speed
   No backdrop-filter (too expensive), solid bg instead.
   ---------------------------------------------------------- */
.modal-overlay {
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(6, 14, 32, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}
.modal-overlay > div {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.25s ease;
    will-change: transform, opacity;
    overflow-x: hidden !important;
}
.modal-overlay.active > div {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ----------------------------------------------------------
   Branch modal: compact layout — fits without scrolling
   ---------------------------------------------------------- */
.branch-modal-panel {
    padding: 1.25rem !important;
    max-width: 28rem !important;
    max-height: 82vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
@media (min-width: 768px) {
    .branch-modal-panel {
        padding: 1.5rem 1.75rem !important;
        max-width: 44rem !important;
    }
}
.branch-modal-panel .branch-modal-header {
    margin-bottom: 0.75rem;
}
.branch-modal-panel .branch-modal-header h2 {
    font-size: 1.4rem;
    line-height: 1.15;
    margin-top: 0.25rem;
}
.branch-modal-panel .branch-modal-header p {
    font-size: 0.82rem;
    margin-top: 0.35rem;
    line-height: 1.4;
}
.branch-modal-panel .branch-service-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
@media (min-width: 768px) {
    .branch-modal-panel .branch-service-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }
}
.branch-service-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(147, 51, 234, 0.15);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: default;
}
.branch-service-item:hover {
    background: rgba(147, 51, 234, 0.18) !important;
    border-color: rgba(147, 51, 234, 0.75) !important;
    box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.45), 0 0 26px rgba(147, 51, 234, 0.35), 0 14px 36px -10px rgba(147, 51, 234, 0.6) !important;
    transform: translateY(-3px);
}
.branch-service-item:hover .branch-service-icon {
    background: rgba(147, 51, 234, 0.45) !important;
    box-shadow: 0 0 22px rgba(147, 51, 234, 0.55) !important;
    transform: scale(1.05);
}
.branch-service-item:hover .branch-service-icon .material-symbols-outlined {
    color: #f3e8ff !important;
}
.branch-service-item:hover h4 {
    color: #f5f3ff !important;
}

/* Gastro modal: blue hover glow to match its accent color */
#branche-gastro-modal .branch-service-item:hover {
    background: rgba(76, 214, 255, 0.18) !important;
    border-color: rgba(76, 214, 255, 0.75) !important;
    box-shadow: 0 0 0 1px rgba(76, 214, 255, 0.45), 0 0 26px rgba(76, 214, 255, 0.35), 0 14px 36px -10px rgba(76, 214, 255, 0.6) !important;
}
#branche-gastro-modal .branch-service-item:hover .branch-service-icon {
    background: rgba(76, 214, 255, 0.45) !important;
    box-shadow: 0 0 22px rgba(76, 214, 255, 0.55) !important;
}
#branche-gastro-modal .branch-service-item:hover .branch-service-icon .material-symbols-outlined {
    color: #e0f6ff !important;
}
#branche-gastro-modal .branch-service-item:hover h4 {
    color: #ecfbff !important;
}
.branch-service-item .branch-service-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.branch-service-item .branch-service-icon .material-symbols-outlined {
    font-size: 1.15rem;
}
.branch-service-item h4 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}
.branch-service-item p {
    font-size: 0.74rem;
    line-height: 1.35;
}
.branch-modal-cta {
    margin-top: 0.9rem !important;
    padding: 0.7rem 1.35rem !important;
    font-size: 0.9rem !important;
    background: linear-gradient(90deg, #9333ea 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 28px -10px rgba(147, 51, 234, 0.65) !important;
}
.branch-modal-cta .material-symbols-outlined {
    font-size: 1.2rem !important;
    color: #ffffff !important;
}
#branche-gastro-modal .branch-modal-cta {
    background: linear-gradient(90deg, #4cd6ff 0%, #22b5e0 100%) !important;
    box-shadow: 0 10px 28px -10px rgba(76, 214, 255, 0.65) !important;
}

/* Mobile: even tighter + allow scroll as safety net */
@media (max-width: 767px) {
    .branch-modal-panel {
        padding: 1.25rem !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
    }
    .branch-modal-panel .branch-modal-header h2 {
        font-size: 1.5rem;
    }
    .branch-service-item p {
        font-size: 0.75rem;
    }
}

/* ----------------------------------------------------------
   Contact Form + Direct Contact Sidebar
   ---------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 62rem;
    margin: 0 auto;
}
.contact-grid > * { min-width: 0; }
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 42rem;
        gap: 1.25rem;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2.5rem 2.75rem;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, rgba(24, 23, 40, 0.85), rgba(17, 16, 32, 0.75));
    border: 1px solid rgba(147, 51, 234, 0.18);
    box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.6);
}
@media (max-width: 560px) {
    .contact-form {
        padding: 1.75rem 1.5rem;
        gap: 1.1rem;
    }
}
.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.15rem;
}
.form-row > * { min-width: 0; }
@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #c9c5d6;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.form-required { color: #c084fc; }
.form-optional {
    color: #8a8598;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: inherit;
    font-size: 0.92rem;
    color: #f1efff;
    background: rgba(12, 11, 24, 0.75);
    border: 1px solid rgba(147, 51, 234, 0.22);
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.contact-form textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.45;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6d6882;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: rgba(147, 51, 234, 0.75);
    background: rgba(18, 16, 34, 0.9);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.18);
}
.contact-form select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9333ea 50%), linear-gradient(135deg, #9333ea 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.2rem;
}
.contact-form select option {
    background: #141226;
    color: #f1efff;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}
.form-privacy {
    font-size: 0.72rem;
    color: #8a8598;
    line-height: 1.45;
    flex: 1;
    min-width: 200px;
    margin: 0;
}
.form-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    box-shadow: 0 10px 30px -12px rgba(147, 51, 234, 0.7);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.form-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px -10px rgba(147, 51, 234, 0.85);
}
.form-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.form-submit-btn .material-symbols-outlined {
    font-size: 1.15rem;
}

.form-status {
    font-size: 0.85rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}
.form-status.visible {
    padding: 0.75rem 1rem;
    max-height: 120px;
    border-radius: 0.75rem;
}
.form-status.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}
.form-status.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.form-fallback-link {
    color: #fecaca;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.form-fallback-link:hover { color: #ffffff; }
.light .form-fallback-link { color: #b91c1c; }
.light .form-fallback-link:hover { color: #7f1d1d; }

/* Right column wrapper (direct contact + process timeline) */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Direct contact sidebar — compact version */
.contact-direct {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1.15rem;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, rgba(147, 51, 234, 0.08), rgba(17, 16, 32, 0.75));
    border: 1px solid rgba(147, 51, 234, 0.18);
}
.contact-direct-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c084fc;
    margin-bottom: 0.1rem;
}
.contact-direct-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.7rem;
    background: rgba(12, 11, 24, 0.5);
    border: 1px solid rgba(147, 51, 234, 0.15);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.contact-direct-item:hover {
    transform: translateX(3px);
    border-color: rgba(147, 51, 234, 0.5);
    background: rgba(18, 16, 34, 0.75);
}
.contact-direct-icon {
    width: 1.9rem;
    height: 1.9rem;
    flex-shrink: 0;
    border-radius: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}
.contact-direct-icon .material-symbols-outlined {
    font-size: 1.05rem;
}
.contact-direct-icon-primary {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
}
.contact-direct-icon-tertiary {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}
.contact-direct-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1efff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contact process timeline — "Was Sie erwartet" */
.contact-process {
    padding: 1.6rem 1.5rem 1.75rem;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, rgba(17, 16, 32, 0.75), rgba(147, 51, 234, 0.06));
    border: 1px solid rgba(147, 51, 234, 0.18);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.contact-process-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c084fc;
    margin-bottom: 1.4rem;
}
.contact-process-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    position: relative;
    flex: 1;
    justify-content: space-between;
}
.contact-process-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}
/* Vertical connector line between step numbers */
.contact-process-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 2.4rem;
    width: 2px;
    height: calc(100% + 0.4rem);
    background: linear-gradient(180deg, rgba(147, 51, 234, 0.45), rgba(147, 51, 234, 0.1));
    border-radius: 1px;
}
.contact-process-num {
    flex-shrink: 0;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px -4px rgba(147, 51, 234, 0.65);
    position: relative;
    z-index: 1;
}
.contact-process-body {
    flex: 1;
    padding-top: 0.25rem;
    min-width: 0;
}
.contact-process-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f1efff;
    line-height: 1.25;
    margin-bottom: 0.3rem;
}
.contact-process-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #a8a3bc;
}

/* Light mode for process */
.light .contact-process {
    background: linear-gradient(160deg, #ffffff, #f8f5ff);
    border-color: rgba(147, 51, 234, 0.18);
}
.light .contact-process-title { color: #0f172a; }
.light .contact-process-desc { color: #64748b; }
.light .contact-process-step:not(:last-child)::before {
    background: linear-gradient(180deg, rgba(147, 51, 234, 0.4), rgba(147, 51, 234, 0.08));
}

/* Light mode */
.light .contact-form {
    background: linear-gradient(145deg, #ffffff, #f8f5ff);
    border-color: rgba(147, 51, 234, 0.18);
    box-shadow: 0 20px 50px -30px rgba(79, 70, 229, 0.25);
}
.light .form-label { color: #475569; }
.light .form-required { color: #7c3aed; }
.light .form-optional { color: #94a3b8; }
.light .contact-form input,
.light .contact-form select,
.light .contact-form textarea {
    color: #0f172a;
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
}
.light .contact-form input::placeholder,
.light .contact-form textarea::placeholder { color: #94a3b8; }
.light .contact-form input:focus,
.light .contact-form select:focus,
.light .contact-form textarea:focus {
    border-color: #9333ea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.14);
}
.light .contact-form select option { background: #ffffff; color: #0f172a; }
.light .form-privacy { color: #64748b; }

.light .contact-direct {
    background: linear-gradient(160deg, #f8f5ff, #ffffff);
    border-color: rgba(147, 51, 234, 0.18);
}
.light .contact-direct-item {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}
.light .contact-direct-item:hover {
    border-color: rgba(147, 51, 234, 0.4);
    background: #faf7ff;
}
.light .contact-direct-value { color: #0f172a; }

