/* Wandel mit KI Website Styles - Based on fuchshasen colors */

:root {
    --color-primary: #C84023;
    --color-accent-1: #5b3125;
    --color-accent-2: #933a27;
    --color-accent-3: #cb4329;
    --color-dark: #232923;
    --primary-orange: #ff6b00;
    --accent-brown: #5b3125;
    --accent-orange1: #e65100;
    --accent-orange2: #ff8f00;
    --text-black: #232923;
    --bg-white: #ffffff;
    --bg-gray: #f7fafcff;
    --text-gray: #718096;
    --border-gray: #edf2f7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-black);
    line-height: 1.5;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-orange);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 1.5rem 8px;
    border-bottom: 1px solid var(--border-gray);
    background: rgba(255, 255, 255, 0.92);
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Top claim styling */
.top-claim {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.top-claim-line1 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

.top-claim-line2 {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-gray);
    letter-spacing: 0.03em;
}

@media (max-width: 767px) {
    .app-header {
        flex-direction: column;
        align-items: center;
        padding: 16px 1.5rem;
    }

    .top-claim {
        position: static;
        transform: none;
        width: 100%;
        order: 1;
        margin-top: 0.75rem;
        text-align: center;
    }

    .top-claim-line1 {
        font-size: 1.1rem;
        font-weight: 700;
    }

    .top-claim-line2 {
        font-size: 0.95rem;
        font-weight: 500;
        margin-top: 0.25rem;
    }

    .logo-link {
        order: 0;
    }
}

/* Logo */
.logo-link {
    text-decoration: none;
    color: var(--text-black);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-black);
}

/* Navigation */
.app-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main content */
.page-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.main-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.page-title {
    color: var(--text-black);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3rem;
    }
}

/* Footer */
.app-footer {
    min-height: 120px;
    border-top: 1px solid var(--border-gray);
    background: var(--bg-white);
}

.footer-container {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Mantine overrides */
.mantine-Container-root {
    max-width: 1280px;
}

.mantine-Text-root {
    color: var(--text-gray);
}

.mantine-Title-root {
    color: var(--text-black);
}

/* Utility classes */
.flex {
    display: flex;
}

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

.mt-6 {
    margin-top: 1.5rem;
}

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

/* Section Styling */
.section {
    width: 100%;
    position: relative;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-black);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-text {
    color: var(--text-gray);
    line-height: 1.7;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(200, 64, 35, 0.03), rgba(91, 49, 37, 0.03));
    min-height: 60vh;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-black);
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-primary);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

.hero-text {
    color: var(--text-gray);
    max-width: 900px;
}

/* CTA Buttons */
.cta-button {
    background-color: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--color-accent-2);
    border-color: var(--color-accent-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 64, 35, 0.3);
}

.cta-button-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.cta-button-outline:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 64, 35, 0.3);
}

@media (max-width: 767px) {
    .cta-button,
    .cta-button-outline {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 90%;
        max-width: 100%;
        text-align: center;
        white-space: normal;
        line-height: 1.5 !important;
        padding: 12px 16px !important;
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-height: 48px !important;
    }

    .hero-section .cta-button {
        width: 90%;
        max-width: 400px;
    }
}

/* Wandel Section */
.wandel-section {
    background-color: var(--bg-white);
}

.fact-list li {
    color: var(--text-gray);
    padding: 0.5rem 0;
}

.quote-box {
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    background: var(--bg-gray);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Potenzialanalyse Section */
.potenzial-section {
    background: linear-gradient(135deg, rgba(91, 49, 37, 0.02), rgba(200, 64, 35, 0.02));
}

.step-card {
    padding: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 1rem;
}

.step-text {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
}

/* Anwendungsfelder Section */
.anwendung-section {
    background-color: var(--bg-white);
}

.use-case-card {
    padding: 2rem;
    background: var(--bg-gray);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
}

.use-case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent-3);
}

.use-case-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.use-case-text {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
}

/* Vorgehen Section */
.vorgehen-section {
    background: linear-gradient(135deg, rgba(200, 64, 35, 0.02), rgba(91, 49, 37, 0.02));
}

.process-stepper {
    padding: 2rem 0;
}

/* Nutzen Section */
.nutzen-section {
    background-color: var(--bg-white);
}

.benefit-card {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(200, 64, 35, 0.05), rgba(91, 49, 37, 0.05));
    border: 2px solid var(--border-gray);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(200, 64, 35, 0.15);
    border-color: var(--color-primary);
}

.benefit-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.benefit-text {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Kontakt Section */
.kontakt-section {
    background: linear-gradient(135deg, rgba(91, 49, 37, 0.03), rgba(200, 64, 35, 0.03));
}

.contact-form-card {
    padding: 3rem;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

@media (max-width: 767px) {
    .contact-form-card {
        padding: 2rem 1.5rem;
    }

    .contact-form-card .mantine-Group-root {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-form-card .mantine-Group-root button {
        width: 100%;
    }
}

/* Blog Section */
.blog-section {
    background-color: var(--bg-gray);
}

.blog-card {
    padding: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-black);
    line-height: 1.4;
}

.blog-card-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Mantine Component Overrides */
.mantine-Button-root {
    font-weight: 700;
    line-height: 1.5 !important;
    padding: 12px 24px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mantine-Button-label {
    line-height: 1.5 !important;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.mantine-TextInput-label,
.mantine-Textarea-label {
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 0.5rem;
}

.mantine-TextInput-input,
.mantine-Textarea-input,
.mantine-NumberInput-input {
    border: 2px solid var(--border-gray);
    transition: border-color 0.2s ease;
}

.mantine-TextInput-input:focus,
.mantine-Textarea-input:focus,
.mantine-NumberInput-input:focus {
    border-color: var(--color-primary);
}

/* Prevent auto-zoom on mobile for NumberInput */
.mantine-NumberInput-input {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* Prevent double-tap zoom on NumberInput controls */
.mantine-NumberInput-controls,
.mantine-NumberInput-control {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mantine-Blockquote-root {
    border-left-color: var(--color-primary);
}

.mantine-Stepper-stepIcon {
    background-color: rgba(200, 64, 35, 0.08) !important;
    border: 2px solid var(--color-primary) !important;
}

.mantine-Stepper-stepCompletedIcon {
    color: var(--color-primary) !important;
}

.mantine-Stepper-step[data-progress="true"] .mantine-Stepper-stepIcon,
.mantine-Stepper-step[data-completed="true"] .mantine-Stepper-stepIcon {
    background-color: rgba(200, 64, 35, 0.08) !important;
    border: 2px solid var(--color-primary) !important;
}

.mantine-Stepper-stepBody {
    color: var(--text-gray);
}

.mantine-Stepper-separator {
    background-color: var(--color-accent-2) !important;
}

.mantine-Stepper-separatorActive {
    background-color: var(--color-primary) !important;
}

/* Smooth transitions */
@media (prefers-reduced-motion: no-preference) {
    .section {
        animation: fadeIn 0.6s ease-in;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent auto-scroll on page load */
html {
    scroll-behavior: auto;
}

html:focus-within {
    scroll-behavior: smooth;
}

/* Prevent sections from triggering scroll on load */
section {
    scroll-margin-top: 0;
    scroll-snap-margin-top: 0;
}

/* Custom Modal Overlay - Based on api-support proven implementation */

/* Modal Container - Wrapper with pointer-events passthrough */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    touch-action: auto;
    /* Prevent any layout shifts */
    contain: layout;
}

.modal-container > * {
    pointer-events: auto;
    touch-action: auto;
}

/* Modal Backdrop - Captures touch events behind window */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
    touch-action: none;
    overscroll-behavior: contain;
    pointer-events: all;
    overflow: hidden;
}

/* Modal Window - Mobile First */
.modal-window {
    position: fixed !important;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: auto;
    isolation: isolate;
    pointer-events: auto;
    /* Prevent any scroll-into-view behavior */
    scroll-margin: 0 !important;
    scroll-padding: 0 !important;
    /* Lock position completely */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: contents;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Modal Header */
.modal-window-header {
    background-color: var(--primary-red);
    color: var(--bg-white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.modal-window-header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-window-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close-button {
    background: transparent;
    border: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Content Container - Scrollable with buttons inside */
.modal-content-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

/* Input fields - prevent mobile auto-zoom and scroll-into-view */
.modal-content-container input,
.modal-content-container textarea {
    font-size: 16px !important;
    min-height: 44px;
    /* Prevent scroll-into-view on focus */
    scroll-margin: 0 !important;
    scroll-snap-margin: 0 !important;
    /* Lock in place with GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* When input is focused, ensure it doesn't cause layout shifts */
.modal-content-container input:focus,
.modal-content-container textarea:focus {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Fix button text cutoff in modal */
.modal-content-container button,
.modal-content-container .cta-button {
    padding: 12px 24px !important;
    line-height: 1.5 !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Desktop override */
@media (min-width: 768px) {
    .modal-window {
        width: 500px;
        height: auto;
        max-height: 90vh;
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }
}

/* ========================================
   Weitergabe Page Specific Styles
   ======================================== */

/* Problem cards */
.problem-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Solution cards */
.solution-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Feature cards */
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-white);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Benefit cards with gradient */
.benefit-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, #fff5f2 100%);
    transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Rollout cards */
.rollout-card {
    background: var(--bg-white);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rollout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Section backgrounds - alternating pattern for visual interest */
.problem-section {
    background: var(--bg-white);
}

.retirement-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.solution-section {
    background: var(--bg-white);
}

.process-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.features-section {
    background: var(--bg-white);
}

.value-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.value-retirement-section {
    background: var(--bg-white);
}

.security-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.integration-section {
    background: var(--bg-white);
}

.rollout-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.roi-section {
    background: var(--bg-white);
    touch-action: manipulation;
}

.faq-section {
    background: linear-gradient(180deg, #f7fafcff 0%, var(--bg-white) 100%);
}

.contact-section {
    background: var(--bg-white);
}
