/**
 * FondiSoft Responsive Styles
 * Mobile-first responsive breakpoints
 */

/* ============================================
   Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    .section-grid,
    .content-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .section-grid.reverse {
        direction: ltr;
    }

    .section-image {
        order: -1;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   Mobile Navigation (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
    }

    /* Mobile Menu Toggle */
    .menu-toggle {
        display: flex;
    }

    /* Navigation */
    .nav-main {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        height: calc(100vh - var(--header-height));
        background: var(--color-bg);
        padding: var(--spacing-xl);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
        z-index: 99;
    }

    .nav-main.is-open {
        transform: translateX(0);
    }

    .nav-main .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--color-border);
        font-size: var(--font-size-lg);
    }

    .nav-link.active::after {
        display: none;
    }

    /* Dropdown auf Mobile */
    /* Desktop-Hover-Regeln auf Mobile überschreiben */
    .nav-dropdown:hover .dropdown-menu {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--spacing-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .nav-dropdown.is-open .dropdown-menu {
        max-height: 200px;
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .hero-slogan {
        font-size: var(--font-size-base);
    }

    /* Sections */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    /* Cards */
    .solution-card img {
        height: 150px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Page Header */
    .page-header {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    /* Forms */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand img {
        margin: 0 auto var(--spacing-md);
    }

    .footer-linkedin {
        margin: var(--spacing-md) auto 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

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

    /* Breadcrumb */
    .breadcrumb {
        font-size: var(--font-size-sm);
    }

    .breadcrumb ol {
        flex-wrap: wrap;
    }

    /* Product */
    .product-hero-image {
        max-width: 100%;
    }

    .product-cta {
        padding: var(--spacing-lg);
    }

    /* Contact */
    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

/* ============================================
   Small Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    .hero-content {
        padding: var(--spacing-md);
    }

    .hero-logo {
        width: 80px;
        height: 80px;
    }

    .service-card,
    .solution-content {
        padding: var(--spacing-md);
    }

    .contact-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ============================================
   Responsive: Neue Komponenten (Tablet)
   ============================================ */
@media (max-width: 1024px) {
    .key-facts {
        grid-template-columns: repeat(2, 1fr);
    }

    .problem-grid,
    .feature-cards-grid,
    .usp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-steps {
        flex-wrap: wrap;
        gap: var(--spacing-xl);
    }

    .process-steps::before {
        display: none;
    }

    .process-step {
        flex: 0 0 calc(33.333% - var(--spacing-md));
    }

    .steps-intro {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    /* Nav CTA ausblenden auf Tablet wenn kein Platz */
    .nav-cta {
        display: none;
    }
}

/* ============================================
   Responsive: Neue Komponenten (Mobile)
   ============================================ */
@media (max-width: 768px) {
    .key-facts {
        gap: var(--spacing-md);
        padding: var(--spacing-xl) 0;
    }

    .key-fact-number {
        font-size: 1.75rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
        max-width: 100%;
    }

    .team-photo,
    .team-photo-placeholder {
        width: 120px;
        height: 120px;
    }

    .problem-grid,
    .feature-cards-grid,
    .usp-grid {
        grid-template-columns: 1fr;
    }

    .process-step {
        flex: 0 0 calc(50% - 12px);
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .hero-video,
    .menu-toggle,
    .language-switch,
    .btn,
    .footer {
        display: none !important;
    }

    .hero {
        height: auto;
        min-height: auto;
        padding: var(--spacing-xl);
        color: var(--color-text);
    }

    .hero-overlay {
        display: none;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    a {
        color: var(--color-text);
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: var(--font-size-sm);
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-video {
        display: none;
    }
}

/* ============================================
   Dark Mode (optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support
    :root {
        --color-bg: #111827;
        --color-bg-alt: #1F2937;
        --color-text: #F9FAFB;
        --color-text-light: #9CA3AF;
        --color-border: #374151;
    }
    */
}

/* ============================================
   High Contrast Mode
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0000EE;
        --color-text: #000000;
        --color-bg: #FFFFFF;
    }

    .btn-outline {
        border-width: 3px;
    }

    a:focus,
    button:focus,
    input:focus,
    textarea:focus {
        outline: 3px solid var(--color-primary);
        outline-offset: 2px;
    }
}
