/* =============================================================
   国小安亲托管班 · 对外站点移动端样式（home.html / teachers.html）
   只在 ≤860px 生效，桌面端一行都不受影响。
   加载顺序：home.css → 本文件（靠后加载，可覆盖同优先级规则）。
   原则：只写差异，不重写桌面规则。
   ============================================================= */

/* ---------------- ≤860：导航 / 首屏 / 版心 ---------------- */
@media (max-width: 860px) {

    html { scroll-padding-top: calc(var(--nav-h) + 12px); }

    .wrap { padding: 0 18px; }

    /* 导航：手机上也保留「登录」入口，触控目标不小于 40px */
    .site-nav .wrap { gap: 10px; padding: 0 16px; }

    .brand { gap: 9px; }

    .brand .mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }

    .brand .name { font-size: 15.5px; }

    .nav-actions {
        display: flex;
        margin-left: auto;
        gap: 8px;
    }

    .nav-actions .btn { height: 36px; padding: 0 12px; font-size: 13px; }

    .nav-toggle { margin-left: 0; width: 40px; height: 40px; }

    .nav-links { padding: 8px 12px 14px; background: #fdfbf7; }

    .nav-links a { padding: 13px 14px; font-size: 15px; }

    /* 菜单展开时导航栏不再做毛玻璃：backdrop-filter 会把 fixed 子元素关进导航栏的包含块，
       菜单面板就会半透明地糊在首屏上（Chrome/Edge/Safari 都这个行为） */
    .site-nav.menu-open {
        backdrop-filter: none;
        background: #fdfbf7;
    }

    /* 首屏 */
    .hero {
        min-height: 0;
        padding-top: calc(var(--nav-h) + 26px);
        padding-bottom: 40px;
    }

    .hero .wrap { padding-top: 0; padding-bottom: 0; }

    .hero-badge {
        height: auto;
        padding: 6px 12px;
        font-size: 11.5px;
        line-height: 1.55;
        align-items: flex-start;
    }

    .hero-badge .dot { margin-top: 7px; flex-shrink: 0; }

    .hero h1 { margin-top: 16px; font-size: 30px; line-height: 1.22; max-width: none; }

    .hero-sub { margin-top: 14px; font-size: 14.5px; line-height: 1.8; }

    .hero-actions { margin-top: 24px; gap: 10px; }

    .hero-actions .btn { flex: 1 1 0; min-width: 0; height: 46px; }

    .hero-facts {
        margin-top: 30px;
        padding-top: 16px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        max-width: none;
    }

    .hero-facts .fact {
        margin: 0;
        padding: 0 0 0 12px;
        border-right: 0;
        border-left: 1px solid rgba(255, 255, 255, .14);
    }

    .hero-facts .fact:first-child { padding-left: 0; border-left: 0; }

    .hero-facts .k { font-size: 11.5px; }

    .hero-facts .v { font-size: 15.5px; }

    /* 区块节奏 */
    .section { padding: 56px 0; }

    .section.tight { padding: 44px 0; }

    .section-head { margin-bottom: 26px; }

    .section-head h2 { font-size: 24px; }

    .section-head .desc { margin-top: 12px; font-size: 14px; }

    /* 托管班简介 */
    .intro-body p { font-size: 14.5px; line-height: 1.95; }
    .intro-tags { gap: 8px; margin-top: 22px; }
    .intro-tag { padding: 7px 13px; font-size: 12.5px; }

    /* 数据条 */
    .stats .wrap { padding-top: 22px; padding-bottom: 22px; gap: 18px 0; }

    .stat .num { font-size: 27px; }

    .stat .label { font-size: 12.5px; }

    /* 关于我们 */
    .about { gap: 26px; }

    .about-media { aspect-ratio: 16 / 10; border-radius: 18px; }

    .about-media .stamp { right: 10px; bottom: 10px; width: 104px; padding: 11px 8px; border-radius: 14px; }

    .about-media .stamp .big { font-size: 20px; }

    .about-media .stamp .small { font-size: 10.5px; }

    .about-media .placeholder { font-size: 12px; padding: 16px; }

    .about-body h2 { font-size: 24px; }

    .about-body > p { margin-top: 14px; font-size: 14px; line-height: 1.85; }

    .about-list { margin-top: 22px; gap: 14px; }

    .about-item { gap: 12px; }

    .about-item .ico { width: 34px; height: 34px; border-radius: 10px; }

    .about-item .t { font-size: 14.5px; }

    .about-item .d { margin-top: 2px; font-size: 13px; }

    /* 照片墙：两列小格，首张横跨整行 */
    .gallery-head { gap: 16px; margin-bottom: 20px; }

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

    .gallery-grid .g-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    .filter { height: 34px; padding: 0 14px; font-size: 13px; }

    .gallery-empty { padding: 40px 18px; }

    /* 师资：改横向紧凑卡（头像在左、信息在右），一屏能看两位 */
    .teachers-head { gap: 14px; margin-bottom: 24px; }

    .teacher-grid,
    .teacher-grid.full { grid-template-columns: 1fr; gap: 12px; }

    .t-card { flex-direction: row; }

    .t-photo { flex: 0 0 96px; width: 96px; aspect-ratio: auto; }

    .t-photo .t-ph { font-size: 28px; }

    .t-body { padding: 12px 14px; }

    .t-name { gap: 6px; font-size: 15px; }

    .t-tag { padding: 1px 7px; font-size: 11px; }

    .t-meta { margin-top: 3px; font-size: 12px; line-height: 1.6; }

    .t-intro {
        margin-top: 6px;
        font-size: 12.5px;
        line-height: 1.7;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .teacher-grid.full .t-intro { -webkit-line-clamp: 3; }

    .t-more { padding: 8px 0 0; font-size: 12.5px; }

    .t-skeleton { min-height: 120px; }

    .teacher-empty { padding: 36px 18px; }

    /* 特色服务：图标在左的横条，不再一人一张大卡 */
    .features { grid-template-columns: 1fr; gap: 10px; }

    .feature {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        column-gap: 13px;
        padding: 15px 16px;
    }

    .feature .ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 11px; margin-bottom: 0; }

    .feature .t { grid-column: 2; font-size: 14.5px; }

    .feature .d { grid-column: 2; margin-top: 4px; font-size: 12.5px; line-height: 1.7; }

    /* 一日流程：沿用已竖排的版本，只收紧间距 */
    .dayline { margin-top: 2px; }

    .day-step .t { font-size: 14.5px; }

    .day-step .d { font-size: 12.5px; }

    /* 联系 */
    .contact { padding: 52px 0; }

    .contact .wrap { gap: 26px; }

    .contact h2 { font-size: 24px; }

    .contact .desc { margin-top: 12px; font-size: 14px; }

    .contact-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 22px; }

    .contact-actions .btn { width: 100%; height: 48px; }

    .contact-card { padding: 18px 16px; border-radius: 16px; }

    .contact-card .row { padding: 11px 0; gap: 12px; }

    .contact-card .v { font-size: 13.5px; }

    /* 页脚 */
    .site-foot { padding: 24px 0 28px; }

    .site-foot .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }

    .site-foot .links { flex-wrap: wrap; gap: 10px 18px; }

    /* 师资页头（teachers.html） */
    .page-head { padding: calc(var(--nav-h) + 30px) 0 34px; }

    .page-head h1 { font-size: 26px; }

    .page-head .page-sub { margin-top: 12px; font-size: 13.5px; line-height: 1.85; }

    .page-head .page-facts { gap: 10px 18px; margin-top: 18px; font-size: 12.5px; }

    .page-head .page-facts b { font-size: 18px; }

    /* 简历弹窗 */
    .tmodal-box { border-radius: 18px; }

    .tmodal-foot { flex-direction: column; }

    .tmodal-foot .btn { width: 100%; }

    /* 灯箱 */
    .lightbox { padding: 56px 12px 16px; }

    .lb-bar .d { max-width: 68vw; }
}

/* ---------------- ≤420：小屏微调 ---------------- */
@media (max-width: 420px) {

    .wrap { padding: 0 14px; }

    /* 去掉品牌副标题，给「登录」按钮腾位置 */
    .brand .name small { display: none; }

    .nav-actions .btn { padding: 0 10px; }

    .hero h1 { font-size: 27px; }

    .stat .num { font-size: 25px; }

    .hero-facts .v { font-size: 14.5px; }
}
