/* Mobile-first comfort, RTL support, and swipe-friendly surfaces */
.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.language-toggle {
    min-width: 72px;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #6757d8, #0f7c72);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(103, 87, 216, 0.22);
}

.mobile-helper {
    display: none;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #09524d;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .glass-nav .page-nav-link,
html[dir="rtl"] .hero-actions .badge,
html[dir="rtl"] .btn-primary,
html[dir="rtl"] .btn-secondary,
html[dir="rtl"] .ghost-button {
    flex-direction: row-reverse;
}

html[dir="rtl"] .home-hero::after {
    transform: scaleX(-1);
}

@media (max-width: 760px) {
    .home-shell {
        padding: 0;
        overflow-x: clip;
    }

    .task-panel.home-panel {
        width: 100%;
        max-width: 100vw;
        padding: 14px;
        border-radius: 0;
        overflow-x: clip;
    }

    .home-panel .task-form,
    .workspace-grid,
    .capture-card,
    .team-snapshot,
    .board-card {
        min-width: 0;
    }

    .glass-nav {
        position: sticky;
        top: 8px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px;
        border-radius: 22px;
    }

    .nav-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .glass-nav .page-nav-link {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 10px 14px;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .nav-actions {
        justify-content: end;
    }

    .language-toggle,
    .icon-button {
        min-height: 44px;
    }

    .home-hero {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .hero-copy h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero-text {
        font-size: 1rem;
    }

    .mobile-helper {
        display: block;
    }

    .innovation-map,
    .quick-stats {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .innovation-stage,
    .quick-stats .stat-card {
        min-width: 82%;
        scroll-snap-align: center;
    }

    .capture-card,
    .team-snapshot,
    .board-card {
        padding: 16px;
        border-radius: 22px;
    }

    .team-form .input-wrapper,
    .home-panel .task-form-row,
    .task-name-field {
        flex-direction: column;
    }

    .task-name-label {
        min-width: 0;
        padding-top: 0;
    }

    .home-panel .task-form input,
    .home-panel .task-form textarea,
    .home-panel .task-form select,
    .team-form input {
        min-width: 0;
    }

    .board-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .home-panel .toolbar {
        width: 100%;
        display: flex;
        gap: 8px;
        margin: 4px 0 10px;
        flex-wrap: nowrap;
    }

    .home-panel .filter-button {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 8px;
        min-height: 46px;
        text-align: center;
        white-space: nowrap;
    }

    .btn-primary,
    .btn-secondary,
    .ghost-button {
        width: 100%;
        min-height: 48px;
    }

    .home-panel .kanban-board {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 16px;
        max-width: 100%;
        padding: 0;
        overflow-x: visible;
    }

    .home-panel .kanban-column {
        width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 16px;
    }

    .home-panel .kanban-task-list {
        min-height: 60px;
    }

    .task-item {
        touch-action: pan-y;
    }
}

@media (max-width: 420px) {
    .glass-nav {
        grid-template-columns: 1fr;
    }

    .nav-actions {
        width: 100%;
    }

    .language-toggle {
        flex: 1;
    }
}
