/* ==========================================================
   MOBILE STYLES – Cevio Index
   Active below 768px
   Header/Menu/Burger styles are in mobileheader.js
   Footer styles are in mobilefooter.js
   ========================================================== */

@media (max-width: 768px) {

    html { overflow-x: hidden !important; }
    .site-header { display: none !important; }
    body.cevio-bg { padding-top: 4.5em; }

    /* ── HERO ── */
    .hero {
        padding: 0 !important;
        position: relative !important;
        overflow: visible !important;
        margin-bottom: 0 !important;
    }

    .hero-inner {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        grid-template-columns: none !important;
        padding: 1.5em 1.2em 2.5em !important;
        gap: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-visual { display: none !important; }

    .hero-content {
        position: relative !important;
        display: block !important;
        background: none !important;
        align-self: unset !important;
        padding: 0 !important;
    }

    .hero-title {
        font-size: clamp(2.8em, 11vw, 3.8em) !important;
        text-align: left !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #0e1422 !important;
        text-shadow: none !important;
        line-height: 1.15 !important;
    }

/* Word rotator — single span on mobile */
    .hero-title .word-rotator {
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
    }

    .word-rotator {
        display: inline !important;
        white-space: nowrap !important;
        padding: 0 !important;
    }

    .word-rotator span {
        display: inline !important;
    }

    .word-rotator span.morphing {
        transform: none !important;
        filter: none !important;
    }

    .hero-actions {
        margin-left: 0 !important;
        margin-top: 1.2em !important;
        justify-content: flex-start !important;
        display: flex !important;
        gap: 0.8em !important;
        padding-bottom: 0 !important;
    }

    .hero-actions .btn-secondary,
    .hero-actions .btn-primary {
        font-size: 1em;
        padding: 0.75em 1.6em;
    }

    .hero-text {
        display: block !important;
        margin-top: 1.2em !important;
        margin-left: 0 !important;
        font-size: 0.95em !important;
        line-height: 1.6 !important;
        color: #555 !important;
        max-width: 100% !important;
        width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }

    .hero-trust { display: none !important; }
    .hero-social { display: none !important; }

    /* ── SERVICES ── */
    .services-heading { margin-top: 2em; }
    .services-heading-title { font-size: 1.6em !important; padding: 0 1em; }
    .services-cards { padding: 0 1em 2em; margin-top: 1em; }

    .services-cards-inner {
        flex-direction: column;
        height: auto !important;
        gap: 0.8em;
    }

    .svc-card {
        height: 220px !important;
        flex: none !important;
        border-radius: 1em;
        overflow: hidden !important;
    }

    .services-cards-inner:hover .svc-card { flex: none !important; }
    .services-cards-inner:hover .svc-card:hover { height: 220px !important; flex: none !important; }
    .svc-card-bg img { filter: none !important; transform: scale(1) !important; }

    .svc-card-overlay {
        background: linear-gradient(180deg,
            rgba(79, 70, 255, 0.08) 0%,
            rgba(15, 20, 34, 0.85) 100%) !important;
    }

    .svc-card-title { font-size: 1.5em !important; }
    .svc-card:hover .svc-card-title { font-size: 1.5em !important; }
    .svc-card-content { padding: 1.2em 1.4em; }

    .svc-card .svc-card-text {
        opacity: 1 !important;
        max-height: 10em !important;
        overflow: visible !important;
    }

    .svc-card .svc-card-cta {
        opacity: 1 !important;
        transform: translateY(0) !important;
        color: #ffffff !important;
    }

    /* ══════════════════════════════════════════════
       PROCESS – Sticky Scroll Stack
       ══════════════════════════════════════════════ */

    .process-scroll { height: auto !important; overflow: visible !important; }

    .process-pinned {
        position: relative !important;
        height: auto !important;
        top: auto !important;
        bottom: auto !important;
        padding: 2em 0 3em !important;
        overflow: visible !important;
    }

    .process-bg { display: none !important; }
    .process-trail-v { display: none !important; }

    .process-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        max-width: 100% !important;
        grid-template-columns: none !important;
    }

    .process-left {
        transform: none !important;
        width: 100% !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .process-section-title {
        font-size: 1.6em !important;
        text-align: center !important;
        margin-bottom: 0.5em !important;
        padding: 0.5em 1.4em 0.6em !important;
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0em !important;
        z-index: 100 !important;
        background: #ffffff !important;
        box-shadow: 0 8px 24px rgba(255, 255, 255, 1), 0 20px 40px rgba(255, 255, 255, 0.9) !important;
    }

    .process-step-counter { display: none !important; }

    .process-cards {
        position: relative !important;
        z-index: 1 !important;
        min-height: auto !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 1.2em !important;
        margin-top: 0 !important;
        overflow: visible !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .process-card {
        position: -webkit-sticky !important;
        position: sticky !important;
        left: auto !important;
        width: 100% !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 1.4em 1.3em !important;
        margin-bottom: 1.5em !important;
        border-radius: 1em !important;
        background: #ffffff !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
        box-sizing: border-box !important;
        visibility: visible !important;
    }

    .process-card[data-step="0"] { top: 6.0em !important; z-index: 2 !important; }
    .process-card[data-step="1"] { top: 6.5em !important; z-index: 3 !important; }
    .process-card[data-step="2"] { top: 7.0em !important; z-index: 4 !important; }
    .process-card[data-step="3"] { top: 7.5em !important; z-index: 5 !important; }
    .process-card[data-step="4"] { top: 8.0em !important; z-index: 6 !important; }

    .process-card::before { opacity: 1 !important; transform: scaleX(1) !important; }
    .process-card.active,
    .process-card.exiting {
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .pcard-title { font-size: 1.1em; }
    .pcard-text { font-size: 0.88em; line-height: 1.5; }
    .process-right, .process-scroll-hint { display: none !important; }

    /* ── ERSTBERATUNG CTA ── */
    .cta-consult-inner { padding: 0 1.4em 3em; }
    .cta-consult-title { font-size: 1.5em !important; }
    .cta-consult-text { font-size: 0.9em; margin-left: 0 !important; }
    .cta-consult-btn { margin-left: 0 !important; width: 100%; box-sizing: border-box; text-align: center; }

    /* ── PROJECTS BENTO ── */
    .projects-marquee { display: none !important; }
    .projects-layout { padding: 0 !important; }
    .projects-section { margin-top: 0; padding: 2.5em 0 2em; }

    .projects-bento {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 0 1em !important;
    }

    .bento-c1 { grid-column: 1 / 3 !important; grid-row: auto !important; height: 180px !important; }
    .bento-c2 { grid-column: 1 / 3 !important; grid-row: auto !important; height: 160px !important; }
    .bento-c3 { grid-column: 1 / 2 !important; grid-row: auto !important; height: 150px !important; }
    .bento-c4 { grid-column: 2 / 3 !important; grid-row: auto !important; height: 150px !important; }
    .bento-c5 { grid-column: 1 / 3 !important; grid-row: auto !important; height: 160px !important; }
    .bento-c6 { grid-column: 1 / 2 !important; grid-row: auto !important; height: 150px !important; }
    .bento-c7 { grid-column: 2 / 3 !important; grid-row: auto !important; height: 150px !important; }
    .bento-c8 { grid-column: 1 / 3 !important; grid-row: auto !important; height: 150px !important; }

    .bento-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .bento-card-info { padding: 0.8em 1em !important; }
    .bento-card-name { font-size: 0.85em !important; }
    .bento-card-sub { font-size: 0.65em !important; }
    .projects-more { margin-top: 1.2em; }

    /* ══════════════════════════════════════════════
       TESTIMONIALS – Horizontal Swipe Slider
       ══════════════════════════════════════════════ */

    .tf-section {
        padding: 2.5em 0 2em !important;
        overflow: hidden !important;
    }

    .tf-header {
        padding: 0 1.4em !important;
        margin-bottom: 1em !important;
    }

    .tf-title { font-size: 1.8em !important; }

    .tf-stage {
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 0.8em !important;
        padding: 0.5em 1.2em 1.2em !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-padding-left: 1.2em !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .tf-stage::after {
        content: "" !important;
        flex: 0 0 1.2em !important;
        min-width: 1.2em !important;
    }

    .tf-card:last-child {
        margin-right: 1.2em !important;
    }

    .tf-stage::-webkit-scrollbar { display: none !important; }

    .tf-card {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        flex: 0 0 85vw !important;
        max-width: 85vw !important;
        width: 85vw !important;
        min-height: auto !important;
        scroll-snap-align: start !important;
        padding: 1.3em 1.3em !important;
        border-radius: 1em !important;
        background: #ffffff !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07) !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        filter: none !important;
        animation: none !important;
        transform: none !important;
    }

    .tf-card .tf-card-stars { margin-bottom: 0.5em !important; }
    .tf-card .tf-card-stars .tf-star { width: 0.75em !important; height: 0.75em !important; }
    .tf-card .tf-card-text { font-size: 0.88em !important; line-height: 1.55 !important; margin-bottom: 0.8em !important; }
    .tf-card .tf-avatar { width: 1.8em !important; height: 1.8em !important; font-size: 0.7em !important; }
    .tf-card .tf-author-name { font-size: 0.75em !important; }
    .tf-card .tf-author-role { font-size: 0.65em !important; }
    .tf-card .tf-send-btn { display: none !important; }

    /* ══════════════════════════════════════════════
       WEB SHOWCASE – Hidden on mobile
       ══════════════════════════════════════════════ */

    .wsc-scroll {
        display: none !important;
    }

    /* ── NEWSLETTER ── */
    .newsletter-section { margin-bottom: 0; padding: 2em 1em 3em; }
    .newsletter-inner { transform: none; padding: 2.2em 1.6em; border-radius: 1.2em; box-sizing: border-box !important; max-width: 100% !important; overflow: hidden !important; }
    .nl-orbital { display: none !important; }
    .nl-content { max-width: 100%; }
    .newsletter-title { font-size: 1.5em; }
    .newsletter-text { font-size: 0.88em; margin-bottom: 1.4em; }
    .newsletter-form { flex-direction: column; align-items: stretch; }
    .newsletter-input { min-width: 0 !important; width: 100% !important; box-sizing: border-box !important; }
    .newsletter-form .btn-primary { width: 100% !important; box-sizing: border-box !important; }

    .site-grid-bg { opacity: 0.5; }
    ::-webkit-scrollbar { width: 4px; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 2.5em !important; }
    .hero-actions { flex-direction: row !important; }
    .hero-actions .btn-secondary,
    .hero-actions .btn-primary { font-size: 0.9em; padding: 0.7em 1.2em; }
    .m-menu-sub-links { grid-template-columns: 1fr; }
}