/* Mobile home layout, loaded after the desktop and legacy inline styles. */
.hero-mobile-action { display: none; }
@media (max-width: 1024px) {
    html body:has(.hero-section) .main-nav { padding: 12px; }
    html body:has(.hero-section) .main-nav .nav-container {
        display: flex !important;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 64px !important;
        margin: 0 !important;
        padding: 10px 12px !important;
    }
    html .main-nav .nav-logo { flex: 1; min-width: 0; gap: 9px; }
    html .main-nav .logo-img { width: 36px; height: 36px; flex-shrink: 0; }
    html .main-nav .logo-text {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 13px !important;
        line-height: 1.35;
    }
    html .main-nav .nav-menu, html .main-nav .nav-right { display: none !important; }
    html .main-nav .mobile-menu-toggle {
        display: grid;
        place-items: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        border-radius: 10px;
        background: rgba(255,255,255,.08);
    }
    html .main-nav.scrolled { padding: 8px 12px; }
    html .main-nav.scrolled .nav-container { border-radius: 14px; }
    .mobile-menu { z-index: 1100; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
    .mobile-menu-nav { max-width: 480px; margin: 64px auto 0; }
    .mobile-menu-nav a { min-height: 48px; }
    .mobile-lang-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
    .mobile-lang-list a { min-width: 0; padding: 12px 6px !important; font-size: 13px !important; }
    .mobile-menu-toggle:focus-visible, .mobile-menu-close:focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
    body.mobile-menu-open { overflow: hidden; }
}
@media (max-width: 768px) {
    html body .hero-section {
        min-height: 0;
        height: auto;
        padding: 116px 0 40px;
        align-items: flex-start;
    }
    html body .hero-content {
        display: block;
        grid-template-columns: 1fr !important;
        padding: 0 16px !important;
        margin: 0 auto;
        max-width: 600px;
    }
    .hero-text {
        padding: 24px 20px;
        text-align: center;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,.18);
        background: rgba(15,23,42,.62);
    }
    .hero-text::before { display: none; }
    html body .hero-text .hero-subtitle {
        padding: 0;
        font-size: clamp(23px, 6vw, 30px) !important;
        line-height: 1.4 !important;
        letter-spacing: -.02em;
        hyphens: none;
        -webkit-hyphens: none;
        overflow-wrap: normal;
        font-weight: 700;
    }
    .hero-text .ai-badge { margin: 0 auto 20px; padding: 9px 14px; }
    .hero-mobile-action {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        min-height: 48px;
        margin-top: 24px;
        padding: 12px 20px;
        border-radius: 12px;
        background: #0284c7;
        border: 1px solid #38bdf8;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
    }
    .hero-mobile-action:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
    .hero-section::after { height: 60px; }
    html body .container { width: 100%; max-width: 100%; padding-left: 16px; padding-right: 16px; }
    .tests-showcase, .for-whom-section, .how-it-works-section, .psychologist-section, .cta-section { padding: 44px 0; }
    .test-card, .whom-card, .step-card, .psychologist-info { min-width: 0; }
    .tests-grid, .for-whom-grid, .steps-grid { margin-top: 24px; gap: 16px; }
    .section-title { font-size: 28px; line-height: 1.25; }
    .section-subtitle { margin-bottom: 24px; line-height: 1.6; }
    .test-card-desc { font-size: 15px; line-height: 1.6; }
    .test-card-link, .whom-btn, .btn-psychologist-primary { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
    .psychologist-content { gap: 28px; }
    .psychologist-image-wrapper { width: 100%; max-width: 320px; }
    .psychologist-info .psychologist-name { font-size: 28px !important; line-height: 1.25; overflow-wrap: anywhere; text-shadow: none; }
    .psychologist-stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .psy-stat { min-width: 0; padding: 16px 10px; }
    .psy-stat:last-child { grid-column: 1 / -1; }
    .psy-stat-number { font-size: 28px; }
    .psy-stat-label { font-size: 12px; }
    .btn-psychologist-primary { width: 100%; padding: 14px 16px; }
    .stats-strip .strip-label { font-size: 13px; }
    .stats-strip .strip-number { font-size: 28px; }
    .cta-title { font-size: 28px; }
    .btn-cta-primary, .btn-cta-secondary { min-width: 0; }
    .steps-tabs { display: flex; width: 100%; min-width: 0; }
    .steps-tab { flex: 1; min-width: 0; padding: 12px 8px; font-size: 14px; white-space: normal; }
    .reveal.from-left, .reveal.from-right { transform: translateY(20px); }
    .reveal.from-left.visible, .reveal.from-right.visible { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal.from-left, .reveal.from-right { opacity: 1; transform: none; transition: none; }
    .hero-video, .nav-mirror-video, .particles-canvas { display: none; }
    .hero-video-container { background: #164e63 url('/images/hero-poster.jpg') center / cover; }
}

/* Mobile navigation panel */
#mobileMenu { background:#f7f9fc; color:#18243b; backdrop-filter:none; padding:0; }
#mobileMenu .mobile-menu-shell { display:flex; flex-direction:column; min-height:100%; width:100%; max-width:520px; padding:0 22px max(24px,env(safe-area-inset-bottom)); margin:0 auto; }
#mobileMenu .mobile-menu-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:24px 0; border-bottom:1px solid #e2e8f0; }
#mobileMenu .mobile-menu-brand { display:flex; align-items:center; gap:11px; min-width:0; }
#mobileMenu .mobile-menu-brand img { width:44px; height:44px; flex-shrink:0; object-fit:contain; }
#mobileMenu .mobile-menu-brand span { font-size:13px; font-weight:700; line-height:1.45; color:#26354b; }
#mobileMenu .mobile-menu-close { position:static; flex:0 0 40px; width:40px; height:40px; border:1px solid #dfe5ef; border-radius:12px; background:#fff; color:#64748b; }
#mobileMenu .mobile-menu-close:hover { color:#18243b; background:#eef2f8; }
#mobileMenu .mobile-menu-nav { display:flex; flex-direction:column; gap:10px; width:100%; max-width:none; margin:22px 0 0; }
#mobileMenu .mobile-menu-caption { color:#8895a9; font-size:11px; font-weight:600; margin:0 0 0 2px; }
#mobileMenu .mobile-lang-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:5px; margin:0 0 16px; border:1px solid #e0e6ef; border-radius:14px; background:#edf1f7; }
#mobileMenu .mobile-lang-list a { display:flex; flex-direction:row; justify-content:center; align-items:center; gap:7px; min-height:44px; min-width:0; padding:8px 4px !important; border:1px solid transparent; border-radius:10px !important; background:transparent !important; color:#758399; font-size:11px !important; font-weight:600; text-decoration:none; }
#mobileMenu .mobile-lang-list a.active { background:#fff !important; border-color:#e0e6ef; color:#334155; box-shadow:0 2px 4px #17233b08; }
#mobileMenu .mobile-lang-list img.flag { width:22px; height:22px; }
#mobileMenu .mobile-menu-nav > a { display:flex; align-items:center; justify-content:flex-start; gap:13px; padding:14px; border:1px solid #e1e7f0; border-radius:14px; background:#fff; color:#334155; text-decoration:none; text-align:left; min-height:70px; font-size:14px; font-weight:600; }
#mobileMenu .mobile-menu-nav > a:hover { background:#f0f4fc; border-color:#c7d2e6; }
#mobileMenu .mobile-menu-nav > .mobile-nav-home { background:transparent; border-color:transparent; min-height:56px; padding:6px 4px; margin-bottom:8px; }
#mobileMenu .mobile-role-icon { display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; color:#7d8ba1; background:#f1f4f9; border-radius:12px; }
#mobileMenu .mobile-role-icon svg { width:22px; height:22px; }
#mobileMenu .mobile-active-dot { width:6px; height:6px; border-radius:50%; background:#5a67dc; margin-left:auto; margin-right:12px; }
#mobileMenu .mobile-menu-section { margin:0 0 6px; padding-top:16px; border-top:1px solid #e2e8f0; }
#mobileMenu .mobile-menu-section h2 { color:#24324b; font-size:17px; font-weight:700; line-height:1.4; margin:0; }
#mobileMenu .mobile-menu-section p { color:#8a97aa; font-size:12px; line-height:1.6; margin:4px 0 0; }
#mobileMenu .mobile-role-text { display:flex; flex-direction:column; gap:4px; min-width:0; }
#mobileMenu .mobile-role-text strong { font-size:14px; font-weight:650; color:#26354b; }
#mobileMenu .mobile-role-text small { font-size:11px; line-height:1.4; font-weight:400; color:#8b97aa; }
#mobileMenu .mobile-role-arrow { margin-left:auto; color:#a3afc1; font-size:20px; }
#mobileMenu .mobile-menu-nav > .mobile-role-student { background:#eff3ff; border-color:#cfd9f4; }
#mobileMenu .mobile-role-student .mobile-role-icon { color:#5369cf; background:#e0e8ff; }
#mobileMenu .mobile-role-student .mobile-role-arrow { color:#5369cf; }
#mobileMenu .mobile-menu-contact { margin-top:auto; padding-top:32px; }
#mobileMenu .mobile-menu-contact > span { display:block; font-size:11px; color:#8a97aa; margin-bottom:10px; }
#mobileMenu .mobile-menu-contact a { display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:14px; border-radius:12px; border:1px solid #dce5e9; background:#edf5f3; color:#3b6c60; text-decoration:none; font-size:14px; font-weight:600; }
#mobileMenu .mobile-menu-contact svg { width:18px; height:18px; flex-shrink:0; }
#mobileMenu .mobile-menu-contact a span:last-child { margin-left:auto; color:#87a49b; }
#mobileMenu a:focus-visible, #mobileMenu button:focus-visible { outline:2px solid #6366f1; outline-offset:3px; }
@media(max-width:350px) {
 #mobileMenu .mobile-menu-shell { padding-left:16px; padding-right:16px; }
 #mobileMenu .mobile-lang-list a { font-size:10px !important; gap:5px; }
 #mobileMenu .mobile-menu-brand span { font-size:12px; }
}
