/*
 * ADAM — Premium Mobile Design System
 * Covers: legacy layout, panel shells (admin/teacher/student/parent), auth pages
 */

:root {
    --mobile-topbar-h: 60px;
    --mobile-bottom-nav-h: 68px;
    --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --mobile-safe-top: env(safe-area-inset-top, 0px);
    --mobile-radius: 16px;
    --mobile-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
    --mobile-drawer-w: min(320px, 88vw);
    --mobile-grid-gap: 10px;
}

/* ── Premium 2-Column Mobile Grid System ── */
@media (max-width: 768px) {
    .stats-grid,
    .mini-kpis,
    .cards,
    .metric-grid,
    .feature-grid,
    .about-roles,
    .teachers,
    .workflow,
    .reviews,
    .pricing,
    .blog-grid,
    .command-grid,
    .about-score,
    .points,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: var(--mobile-grid-gap) !important;
    }

    /* Tek sayılı son kart tam genişlik */
    .stats-grid > *:last-child:nth-child(odd),
    .mini-kpis > *:last-child:nth-child(odd),
    .cards > *:last-child:nth-child(odd),
    .metric-grid > *:last-child:nth-child(odd),
    .feature-grid > *:last-child:nth-child(odd),
    .about-roles > *:last-child:nth-child(odd),
    .teachers > *:last-child:nth-child(odd),
    .workflow > *:last-child:nth-child(odd),
    .reviews > *:last-child:nth-child(odd),
    .pricing > *:last-child:nth-child(odd),
    .blog-grid > *:last-child:nth-child(odd),
    .about-score > *:last-child:nth-child(odd),
    .points > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    /* Komut paneli geniş kart */
    .command-grid .command-wide {
        grid-column: 1 / -1 !important;
    }

    /* Premium kompakt kartlar */
    .stat-card,
    .mini-kpi,
    .card,
    .metric,
    .feature,
    .role-card,
    .teacher,
    .step,
    .review,
    .plan,
    .blog,
    .point,
    .command-card,
    .score-card {
        border-radius: 16px !important;
        min-width: 0;
    }

    .stat-card,
    .mini-kpi {
        padding: 14px 12px !important;
    }

    .card,
    .feature,
    .role-card,
    .teacher,
    .step,
    .review,
    .plan,
    .blog {
        padding: 16px 14px !important;
    }

    .point {
        padding: 14px !important;
    }

    .point span,
    .feature p,
    .role-card p,
    .step p,
    .teacher p,
    .blog p {
        font-size: 0.78rem !important;
        line-height: 1.45 !important;
    }

    .feature h3,
    .role-card h3,
    .step h3,
    .teacher h3,
    .plan h3,
    .blog h3,
    .point strong {
        font-size: 0.88rem !important;
    }

    .feature-icon,
    .role-card i {
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        font-size: 0.85rem !important;
    }

    .metric {
        padding: 16px 10px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--line, #e4e7ec) !important;
    }

    .metric:nth-child(2n) {
        border-right: none !important;
    }

    .metric-grid {
        border-radius: 18px !important;
        overflow: hidden;
    }

    .metric strong {
        font-size: 1.35rem !important;
    }

    .metric span {
        font-size: 0.72rem !important;
    }

    .teacher-top {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .teacher .avatar {
        width: 42px !important;
        height: 42px !important;
        font-size: 0.95rem !important;
    }

    .teacher-footer {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .student-count,
    .plan .price {
        font-size: 1.15rem !important;
    }

    .plan ul {
        margin: 12px 0 16px !important;
        gap: 6px !important;
        font-size: 0.78rem !important;
    }

    .review-footer {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .command-card {
        padding: 14px !important;
    }

    .command-card strong {
        font-size: 1.2rem !important;
    }

    .command-card span {
        font-size: 0.72rem !important;
    }

    .command-card i {
        width: 32px !important;
        height: 32px !important;
        margin-bottom: 10px !important;
    }

    .score-card {
        padding: 12px !important;
    }

    .score-card strong {
        font-size: 1.1rem !important;
    }

    .footer-grid {
        gap: 20px !important;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 360px) {
    .stats-grid,
    .mini-kpis,
    .cards,
    .metric-grid,
    .feature-grid,
    .about-roles,
    .teachers,
    .workflow,
    .reviews,
    .pricing,
    .blog-grid,
    .command-grid,
    .about-score,
    .points {
        grid-template-columns: 1fr !important;
    }

    .stats-grid > *,
    .mini-kpis > *,
    .cards > *,
    .metric-grid > *,
    .feature-grid > *,
    .about-roles > *,
    .teachers > *,
    .workflow > *,
    .reviews > *,
    .pricing > *,
    .blog-grid > *,
    .about-score > *,
    .points > * {
        grid-column: auto !important;
    }
}

/* ── Mobile Top Bar ── */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-topbar-h) + var(--mobile-safe-top));
    padding-top: var(--mobile-safe-top);
    z-index: 900;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
}

.mobile-topbar--dark {
    background: rgba(15, 23, 42, 0.94);
    border-bottom-color: rgba(51, 65, 85, 0.6);
}

.mobile-topbar--dark .mobile-topbar-title {
    color: #f1f5f9;
}

.mobile-topbar--panel {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #dbe3ee;
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary, #6366f1);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-topbar--panel .mobile-menu-btn,
.mobile-topbar--dark .mobile-menu-btn {
    background: rgba(36, 87, 255, 0.12);
    color: #2457ff;
}

.mobile-menu-btn:active {
    transform: scale(0.94);
}

.mobile-topbar-title {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main, #1e293b);
    font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
}

.mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.mobile-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main, #1e293b);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-topbar--dark .mobile-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

/* ── Overlay ── */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 950;
    opacity: 0;
    transition: opacity 0.28s ease;
}

body.mobile-nav-open .mobile-overlay {
    display: block;
    opacity: 1;
}

/* ── Bottom Navigation ── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-bottom-nav-h) + var(--mobile-safe-bottom));
    padding-bottom: var(--mobile-safe-bottom);
    z-index: 890;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
    justify-content: space-around;
    align-items: stretch;
}

.mobile-bottom-nav--dark {
    background: rgba(17, 24, 39, 0.97);
    border-top-color: rgba(51, 65, 85, 0.7);
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: none;
    background: none;
    cursor: pointer;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}

.mobile-bottom-nav--dark a,
.mobile-bottom-nav--dark button {
    color: #94a3b8;
}

.mobile-bottom-nav a i,
.mobile-bottom-nav button i {
    font-size: 1.15rem;
    line-height: 1;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav button.active {
    color: var(--primary, #6366f1);
}

.mobile-bottom-nav--dark a.active,
.mobile-bottom-nav--dark button.active {
    color: #818cf8;
}

.mobile-bottom-nav a.active i,
.mobile-bottom-nav button.active i {
    transform: scale(1.08);
}

.mobile-bottom-nav span {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* ── Legacy Layout (header.php) ── */
@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .sidebar {
        width: var(--mobile-drawer-w) !important;
        padding: 1.25rem 1rem !important;
        transform: translateX(-105%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.18);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar .logo-text,
    .sidebar .nav-link span,
    .sidebar .nav-section-label {
        display: block !important;
    }

    .sidebar .nav-link {
        min-height: 44px;
        padding: 12px 14px;
    }

    .main-content {
        margin-left: 0 !important;
        padding: calc(var(--mobile-topbar-h) + var(--mobile-safe-top) + 16px) 16px calc(var(--mobile-bottom-nav-h) + var(--mobile-safe-bottom) + 20px) !important;
        max-width: 100%;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 1.5rem;
    }

    .top-header > div:first-child h1 {
        font-size: 1.35rem !important;
    }

    .top-header .top-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px !important;
        justify-content: flex-start;
    }

    .top-header .user-profile glass,
    .top-header .user-profile {
        flex: 1 1 100%;
    }

    .top-header .user-profile > div:last-child {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 14px 12px;
        border-radius: 16px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .btn {
        min-height: 44px;
        justify-content: center;
    }

    /* Aksiyon butonları tam genişlik, grid içi değil */
    .top-actions .btn,
    .actions .btn,
    form .btn-primary,
    form .btn {
        width: 100%;
    }

    .glass {
        border-radius: var(--mobile-radius);
    }

    #notify-dropdown {
        position: fixed !important;
        top: calc(var(--mobile-topbar-h) + var(--mobile-safe-top) + 8px) !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
    }
}

@media (max-width: 480px) {
    .top-header > div:first-child {
        display: none;
    }
}

[data-theme="dark"] .mobile-topbar {
    background: rgba(15, 23, 42, 0.94);
    border-bottom-color: rgba(51, 65, 85, 0.6);
}

[data-theme="dark"] .mobile-topbar-title {
    color: #f1f5f9;
}

[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.97);
    border-top-color: rgba(51, 65, 85, 0.7);
}

[data-theme="dark"] .mobile-bottom-nav a,
[data-theme="dark"] .mobile-bottom-nav button {
    color: #94a3b8;
}

[data-theme="dark"] .mobile-bottom-nav a.active,
[data-theme="dark"] .mobile-bottom-nav button.active {
    color: #818cf8;
}

/* ── Panel Shells (admin/teacher/student/parent) ── */
@media (max-width: 768px) {
    .app,
    .owner-app {
        grid-template-columns: 1fr !important;
    }

    .app > .sidebar,
    .owner-app > .owner-side,
    .app > aside.sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--mobile-drawer-w) !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 960;
        transform: translateX(-105%);
        transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: calc(var(--mobile-safe-top) + 12px) !important;
    }

    body.mobile-nav-open .app > .sidebar,
    body.mobile-nav-open .owner-app > .owner-side,
    body.mobile-nav-open .app > aside.sidebar {
        transform: translateX(0);
    }

    .app > .sidebar .nav,
    .owner-app > .owner-side .owner-nav {
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow: visible !important;
    }

    .app > .sidebar .nav a,
    .owner-app > .owner-side .owner-nav a {
        min-width: 0 !important;
        min-height: 44px;
    }

    .main,
    .owner-main {
        padding: calc(var(--mobile-topbar-h) + var(--mobile-safe-top) + 16px) 16px calc(var(--mobile-bottom-nav-h) + var(--mobile-safe-bottom) + 20px) !important;
        min-width: 0;
    }

    .topbar,
    .owner-top {
        display: none !important;
    }

    .mini-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .mini-kpi {
        padding: 14px 12px !important;
        border-radius: 16px !important;
    }

    .mini-kpi strong {
        font-size: 1.25rem !important;
    }

    .mini-kpi span {
        font-size: 0.72rem !important;
    }

    .grid-main {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .grid-2 > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .cards > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .panel,
    .card {
        border-radius: 18px !important;
        padding: 16px !important;
        margin-bottom: 14px !important;
    }

    .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .form-row .field.full,
    .form-row > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .button,
    .btn,
    .btn-primary {
        min-height: 44px;
        touch-action: manipulation;
    }

    .actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch !important;
    }

    .actions .button,
    .actions .btn {
        flex: 1 1 calc(50% - 8px) !important;
        width: auto !important;
        min-width: 0;
    }

    .actions .button:only-child,
    .actions .btn:only-child {
        flex: 1 1 100% !important;
    }

    .top-actions {
        flex-direction: column;
        align-items: stretch !important;
    }

    .top-actions .button {
        width: 100%;
    }

    .table-wrap {
        border-radius: 14px;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    .table-wrap::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
        pointer-events: none;
        border-radius: 0 14px 14px 0;
    }

    .table,
    table.table {
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 10px !important;
        font-size: 0.82rem !important;
    }

    .field input,
    .field select,
    .field textarea {
        font-size: 16px !important;
        min-height: 44px;
    }

    .page-hero {
        border-radius: 18px !important;
        padding: 18px !important;
    }

    .child-switch {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .td-metrics,
    .td-quick,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .td-metrics > *:last-child:nth-child(odd),
    .td-quick > *:last-child:nth-child(odd),
    .metric-grid > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .td-signup-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .td-signup-actions .button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        justify-content: center;
    }

    .td-signup-link {
        display: flex !important;
        grid-template-columns: unset !important;
    }

    .td-hero {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Teacher Exams page */
    .exam-layout {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .exam-hero {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        align-items: start !important;
    }

    .exam-hero h2 {
        font-size: 1.35rem !important;
        line-height: 1.2 !important;
    }

    .exam-hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100%;
    }

    .exam-hero-metrics div {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    .exam-hero-metrics strong {
        font-size: 1.25rem !important;
    }

    .tiny-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .tiny-grid > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .exam-list {
        gap: 8px !important;
    }

    .exam-row {
        border-radius: 16px !important;
        padding: 12px !important;
    }

    .exam-row .actions {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .exam-row .actions .pill {
        font-size: 0.68rem !important;
    }

    .question-card,
    .attempt-card {
        border-radius: 16px !important;
        padding: 12px !important;
    }

    .question-head {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .question-head form .button {
        width: 100% !important;
        justify-content: center !important;
    }

    .attempt-card .button.primary {
        width: 100% !important;
        justify-content: center !important;
    }

    .panel h3 {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .panel h3 .pill {
        margin-left: 0 !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Owner admin dashboard */
    .owner-main .grid-main {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .owner-main .chart-head {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .owner-main .chart-wrap {
        padding: 16px !important;
        border-radius: 18px !important;
        min-height: auto !important;
    }

    .owner-main .rev-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .owner-main .rev-metrics > div:last-child {
        grid-column: 1 / -1;
    }

    .owner-main .rev-actions {
        flex-wrap: wrap;
    }

    .owner-main .rev-actions .button {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    .owner-main .chart-labels {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        row-gap: 6px;
    }

    .app > .sidebar .side-bottom {
        display: grid;
        margin-top: auto;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .app > .sidebar .teacher-mini {
        margin-bottom: 12px;
    }

    .app > .sidebar .brand-row {
        margin-bottom: 14px;
    }

    .child-switch .button {
        width: auto !important;
        flex-shrink: 0;
    }
}

@media (max-width: 360px) {
    .mini-kpis,
    .cards,
    .grid-2,
    .form-row {
        grid-template-columns: 1fr !important;
    }
}

/* ── Auth Pages (login/register) ── */
@media (max-width: 768px) {
    .page {
        grid-template-columns: 1fr !important;
    }

    .showcase {
        padding: 24px 20px 32px !important;
        min-height: auto;
    }

    .copy h1 {
        font-size: 2rem !important;
        margin: 28px 0 12px !important;
    }

    .copy p {
        font-size: 0.95rem;
    }

    .points {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
        margin-top: 20px;
    }

    .points > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .point {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .point strong {
        font-size: 0.85rem !important;
    }

    .point span {
        font-size: 0.75rem !important;
    }

    .login-zone,
    .form-zone {
        padding: 16px !important;
        align-items: flex-start !important;
        padding-bottom: calc(24px + var(--mobile-safe-bottom)) !important;
    }

    .card {
        padding: 22px !important;
        border-radius: 20px !important;
        max-width: 100% !important;
    }

    .card-top h2 {
        font-size: 1.45rem !important;
    }

    .btn,
    .link-btn {
        min-height: 48px;
        font-size: 0.95rem;
    }

    .split {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .register .grid,
    .form-zone .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .register .grid .field.full,
    .form-zone .grid .field.full {
        grid-column: 1 / -1;
    }

    .input input {
        font-size: 16px !important;
        min-height: 48px;
    }
}

/* ── Landing Page (index.php) ── */
.landing-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line, #e4e7ec);
    border-radius: 14px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    place-items: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.landing-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 86vw);
    z-index: 960;
    background: #fff;
    padding: calc(var(--mobile-safe-top) + 20px) 20px 24px;
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 40px rgba(15, 23, 42, 0.15);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.landing-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e7ec;
}

.landing-drawer-head strong {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.landing-drawer-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    font-size: 1rem;
}

.landing-drawer-nav {
    display: grid;
    gap: 6px;
}

.landing-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 14px;
    color: #374151;
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    min-height: 48px;
}

.landing-drawer-nav a i {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: #eef4ff;
    color: #1d4ed8;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
}

.landing-drawer-nav a:active {
    background: #f3f4f6;
}

.landing-drawer-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e4e7ec;
    display: grid;
    gap: 10px;
}

.landing-drawer-actions .btn {
    width: 100%;
    min-height: 48px;
}

.landing-bottom-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 880;
    padding: 12px 16px calc(12px + var(--mobile-safe-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(228, 231, 236, 0.95);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.landing-bottom-cta .btn {
    min-height: 48px;
    font-size: 0.88rem;
    padding: 12px 14px;
}

.landing-bottom-cta .btn-primary {
    grid-column: span 1;
}

@media (max-width: 768px) {
    body.landing-page {
        padding-bottom: calc(76px + var(--mobile-safe-bottom));
    }

    .landing-hamburger {
        display: grid;
    }

    .landing-drawer {
        display: block;
    }

    body.mobile-nav-open .landing-drawer {
        transform: translateX(0);
    }

    .landing-bottom-cta {
        display: grid;
    }

    .site-header .nav-shell {
        grid-template-columns: 1fr auto !important;
        padding: 10px 12px !important;
    }

    .site-header .nav-actions {
        gap: 8px !important;
    }

    .site-header .nav-actions .btn-ghost,
    .site-header .nav-actions .btn-primary {
        display: none !important;
    }

    .site-header .lang-switch {
        order: 2;
    }

    .hero {
        padding: 36px 0 28px !important;
    }

    .hero h1 {
        font-size: 2.15rem !important;
        line-height: 1.02 !important;
    }

    .hero p {
        font-size: 0.98rem !important;
    }

    .hero-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .hero-actions .btn {
        width: 100%;
        min-height: 48px;
        font-size: 0.85rem;
        padding: 12px 10px;
    }

    .proof-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .proof-row > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .proof {
        justify-content: flex-start;
        font-size: 0.72rem !important;
        padding: 8px 10px !important;
    }

    .hero-command {
        border-radius: 22px !important;
        padding: 18px !important;
    }

    .command-head {
        flex-direction: column;
        gap: 12px;
    }

    .command-head h3 {
        font-size: 1.25rem !important;
    }

    .command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .command-card strong {
        font-size: 1.2rem !important;
    }

    .section {
        padding: 48px 0 !important;
    }

    .section h2 {
        font-size: 1.75rem !important;
    }

    .about-mission {
        grid-template-columns: 1fr !important;
        padding: 22px !important;
        border-radius: 22px !important;
    }

    .about-score {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        min-width: 0 !important;
        gap: 10px !important;
    }

    .about-score > *:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .cta-box {
        grid-template-columns: 1fr !important;
        padding: 24px !important;
        border-radius: 22px !important;
    }

    .cta-box .btn {
        width: 100%;
        min-height: 48px;
    }

    .cta-box h2 {
        font-size: 1.65rem !important;
    }

    .footer {
        padding: 40px 0 24px !important;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .plan .btn {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.85rem !important;
    }
}

/* Prevent body scroll when drawer open */
body.mobile-nav-open {
    overflow: hidden;
    touch-action: none;
}

/* Smooth scroll containers */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }
}
