/* ===================================
   手机站专用样式 - 淮安市青少年科技教育协会
   仅在屏幕宽度 ≤768px 时生效
   =================================== */

@media (max-width: 768px) {

  /* ---------- 基础 ---------- */
  html { font-size: 13px; -webkit-text-size-adjust: 100%; }
  body { background: #f0f2f5; padding-bottom: 56px; }
  .container { padding: 0 12px; max-width: 100%; }
  .layout { padding: 0; }
  .section-padding { padding: 16px 0 24px; }

  /* 隐藏桌面端头部，但保留 #menu 供 mmenu 使用 */
  .htop, .head-bg, .menuwrap { display: none !important; }
  #menu:not(.mm-menu) {
    position: absolute;
    left: -9999px;
    visibility: hidden;
  }

  /* ---------- 手机顶栏 ---------- */
  .m-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--blue-deep) 0%, #0A5CAD 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  .m-header-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    border: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
  }
  .m-header-logo {
    flex: 1;
    text-align: center;
    padding: 0 8px;
  }
  .m-header-logo img { height: 36px; margin: 0 auto; }
  .m-header-logo a { display: block; }

  /* 手机搜索面板 */
  .m-search-panel {
    display: none;
    background: var(--blue-deep);
    padding: 0 12px 12px;
  }
  .m-search-panel.open { display: block; }
  .m-search-panel form { display: flex; gap: 8px; }
  .m-search-panel input {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
  }
  .m-search-panel button {
    height: 40px;
    padding: 0 20px;
    background: var(--cyan);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* ---------- mmenu 侧滑菜单 ---------- */
  .mm-menu {
    background: var(--blue-deep) !important;
  }
  .mm-menu .mm-list > li > a {
    color: rgba(255,255,255,0.9) !important;
    font-size: 16px;
    padding: 14px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .mm-menu .mm-list > li > a.mm-subopen {
    padding-right: 50px !important;
  }
  .mm-menu .mm-list > li > a.mm-subopen + ul > li > a {
    padding-left: 36px !important;
    font-size: 14px;
    color: rgba(255,255,255,0.7) !important;
  }
  .mm-menu .mm-list > li > a.cur,
  .mm-menu .mm-list > li > a:hover {
    background: rgba(255,255,255,0.08) !important;
  }

  /* ---------- 手机底部导航 ---------- */
  .m-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid var(--gray-light);
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  }
  .m-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    font-size: 11px;
    gap: 2px;
    -webkit-tap-highlight-color: transparent;
  }
  .m-bottom-nav a i { font-size: 20px; }
  .m-bottom-nav a.active { color: var(--blue); font-weight: 600; }

  /* ---------- 内页 Banner ---------- */
  .inbanner {
    padding: 20px 0;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  }
  .inbanner h1 { font-size: 20px; }
  .inbanner .pos { font-size: 12px; margin-top: 6px; }

  /* ---------- 手机栏目导航 ---------- */
  .m-subnav { display: none; }
  .m-subnav.show {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 50px;
    z-index: 90;
    overflow: hidden;
  }
  .m-subnav-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 8px;
  }
  .m-subnav-scroll::-webkit-scrollbar { display: none; }
  .m-subnav-scroll a {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--gray-dark);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
  }
  .m-subnav-scroll a.active {
    color: var(--blue);
    font-weight: 600;
    border-bottom-color: var(--blue);
  }

  /* 隐藏桌面侧边栏 */
  .sidebar-col .sidebar,
  .sidebar-col .sidebar-box { display: none; }

  /* ---------- 内页布局 ---------- */
  .inner-wrap {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .inner-wrap .sidebar-col { width: 100%; }
  .inner-wrap .content-col { width: 100%; }
  .content-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    box-shadow: none;
    min-height: auto;
  }

  /* ---------- 新闻列表 ---------- */
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
    gap: 6px;
  }
  .news-item:hover { padding-left: 0; }
  .news-item .news-date {
    font-size: 11px;
    padding: 2px 10px;
    margin-right: 0;
  }
  .news-item .news-title a {
    font-size: 14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
  }

  /* ---------- 下载列表 ---------- */
  .down-item {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 8px;
  }
  .down-item .down-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .down-item .down-info { width: calc(100% - 50px); }
  .down-item .down-info a { font-size: 14px; }
  .down-item .button {
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }

  /* ---------- 图集列表 ---------- */
  .images-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .img-card .img-box { height: 120px; }
  .img-card .img-title { font-size: 12px; padding: 8px 6px; }

  /* ---------- 分页 ---------- */
  .page {
    padding: 20px 0 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .page a, .page span {
    padding: 6px 10px;
    font-size: 13px;
    margin: 0;
  }

  /* ---------- 新闻详情 ---------- */
  .news-detail h2 { font-size: 18px; text-align: left; }
  .news-detail .detail-meta {
    text-align: left;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .news-detail .detail-meta span { margin: 0; }
  .news-detail .detail-content { font-size: 15px; line-height: 1.8; }
  .news-detail .detail-content img { margin: 10px auto; border-radius: 4px; }
  .news-detail .detail-pager { font-size: 13px; }

  /* ---------- 搜索页 ---------- */
  .search-box form { flex-direction: column; }
  .search-box .input { height: 44px; }
  .search-box .button { width: 100%; height: 44px; }

  /* ---------- 表单 ---------- */
  .form-card { padding: 0; }
  .form-group .input, .form-group textarea { font-size: 16px; }
  .form-submit { width: 100%; padding: 14px; }

  /* ========== 首页手机版 ========== */

  /* Hero 轮播：完整显示图片，不裁切 */
  .hero-banner { background: #0A3D6B; }
  .hero-banner .bd ul li { height: auto !important; }
  .hero-banner .bd ul li img {
    width: 100%;
    height: auto !important;
    max-height: none;
    object-fit: contain;
    display: block;
  }
  .hero-banner .hero-text,
  .hero-banner .hero-overlay { display: none; }
  .hero-banner .hd { bottom: 10px; }
  .hero-banner .hd ul li { width: 8px; height: 8px; }
  .hero-banner .hd ul li.on { width: 20px; }

  /* 数据统计 */
  .stats-bar {
    margin: -16px 12px 24px;
    padding: 16px 0;
    border-radius: var(--radius-sm);
  }
  .stats-bar .stats-row { flex-wrap: wrap; }
  .stats-bar .stat-item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
    padding: 10px 8px;
  }
  .stats-bar .stat-item:nth-child(3),
  .stats-bar .stat-item:nth-child(4) { border-bottom: none; }
  .stats-bar .stat-item .stat-num { font-size: 24px; }
  .stats-bar .stat-item .stat-label { font-size: 12px; }

  /* 关于协会 */
  .about-sec { padding-bottom: 24px; }
  .about-card { flex-direction: column; border-radius: var(--radius-sm); }
  .about-card .about-img { width: 100%; min-height: 180px; }
  .about-card .about-text { width: 100%; padding: 20px 16px; }
  .about-card .about-text h3 { font-size: 18px; }
  .about-card .about-text p { font-size: 13px; line-height: 1.7; }
  .about-card .about-text .about-more { font-size: 13px; padding: 8px 20px; }

  /* 通知公告 + 协会要闻 */
  .news-sec { padding-bottom: 24px; }
  .line-big .xs6 { width: 100% !important; padding: 0 !important; margin-bottom: 12px; }
  .news-col { margin-bottom: 0; border-radius: var(--radius-sm); }
  .news-col .news-col-hd { padding: 12px 16px; }
  .news-col .news-col-hd h3 { font-size: 16px; }
  .news-col .news-highlight { padding: 10px 16px; }
  .news-col .news-highlight a { font-size: 14px; }
  .news-col .news-col-bd ul li a { padding: 8px 16px; font-size: 13px; }

  /* Tab 切换区 */
  .card-sec { padding-bottom: 24px; }
  .news-tabs .tab-nav-wrap {
    position: sticky;
    top: 50px;
    z-index: 80;
    border-radius: var(--radius-sm);
  }
  .news-tabs .tab-nav {
    background: #eef2f7;
    border-radius: var(--radius-sm);
    padding: 4px;
  }
  .news-tabs .tab-nav a {
    padding: 10px 4px;
    font-size: 13px;
    border-bottom: none;
    border-radius: 6px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .news-tabs .tab-nav a.active {
    background: #fff;
    box-shadow: 0 2px 6px rgba(10,102,194,0.1);
    border-bottom: none;
  }
  .news-tabs .tab-content { padding: 0; box-shadow: none; background: transparent; }
  .news-tabs .tab-pane-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 8px;
    border-bottom: 1px solid var(--gray-light);
  }
  .news-tabs .tab-pane-hd .tab-pane-title { font-size: 15px; font-weight: 600; }
  .news-tabs .tab-pane-hd .tab-more { font-size: 12px; color: var(--blue); }
  .news-tabs .tab-swipe-hint {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #aab;
    padding: 4px 0 8px;
  }
  .news-tabs .card-grid { display: flex; flex-direction: column; gap: 0; }
  .news-tabs .card-item {
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--gray-light);
    padding: 10px 4px;
    background: transparent;
  }
  .news-tabs .card-item:last-child { border-bottom: none; }
  .news-tabs .card-item:hover { transform: none; background: rgba(10,102,194,0.03); }
  .news-tabs .card-item a { display: flex; flex-direction: row; gap: 10px; }
  .news-tabs .card-item .card-img { width: 100px; height: 72px; flex-shrink: 0; border-radius: 4px; }
  .news-tabs .card-item .card-body { padding: 0; flex: 1; min-width: 0; }
  .news-tabs .card-item .card-body h4 { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 2px; }
  .news-tabs .card-item .card-body p { font-size: 11px; -webkit-line-clamp: 1; }

  /* 科学少年 */
  .science-sec { padding-bottom: 24px; }
  .science-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }
  .sci-card .sci-img { height: 90px; }
  .sci-card .sci-name { font-size: 12px; padding: 8px 4px; }

  /* 入会流程 */
  .flow-sec { padding-bottom: 24px; }
  .flow-row { flex-direction: column; gap: 0; }
  .flow-step { width: 100%; padding: 16px; display: flex; align-items: center; text-align: left; gap: 14px; }
  .flow-step .flow-num { margin: 0; width: 40px; height: 40px; font-size: 15px; flex-shrink: 0; }
  .flow-step h4 { font-size: 14px; margin-bottom: 2px; }
  .flow-step p { font-size: 12px; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; font-size: 16px; }

  /* 专家团队 */
  .expert-sec { padding-bottom: 24px; }
  .team-slider { padding: 12px 36px; border-radius: var(--radius-sm); }
  .team-slider .bd ul li { width: 100px; padding: 8px 4px; }
  .team-slider .bd ul li .team-photo { width: 72px; height: 72px; border-width: 2px; margin-bottom: 8px; }
  .team-slider .bd ul li .team-name { font-size: 12px; }
  .team-slider .prev, .team-slider .next { width: 28px; height: 28px; font-size: 14px; }

  /* 合作单位 */
  .partner-sec { padding: 24px 0; }
  .partner-row { gap: 8px; }
  .partner-row a { min-width: auto; padding: 10px 14px; font-size: 12px; flex: 0 0 calc(50% - 4px); text-align: center; }

  /* 区块标题 */
  .sec-title { padding-top: 24px; margin-bottom: 20px; }
  .sec-title h2 { font-size: 20px; }
  .sec-title p { font-size: 11px; }

  /* 加入 CTA */
  .join-cta { padding: 32px 16px; }
  .join-cta h2 { font-size: 20px; }
  .join-cta p { font-size: 13px; margin-bottom: 20px; }
  .join-cta .cta-btns { flex-direction: column; gap: 10px; }
  .join-cta .cta-btn { width: 100%; text-align: center; padding: 12px; font-size: 15px; }

  /* ---------- 页脚 ---------- */
  .footer2 { padding-top: 24px; padding-bottom: 0; }
  .footer2 .fotlogo { gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
  .footer2 .fot_ewm img { width: 90px; height: 90px; }
  .footer2 .fotnav { display: none; }
  .footer2 .copyright { padding: 16px 12px; font-size: 11px; line-height: 1.8; }
  .footer2 .foot_link { flex-direction: column; gap: 6px; }
  .footer2 .foot_link .foot_link_text { gap: 8px; }
  .footer2 .foot_link .foot_link_text a { font-size: 11px; }

  /* ---------- 回到顶部 ---------- */
  .m-back-top {
    display: flex;
    position: fixed;
    right: 12px;
    bottom: 68px;
    width: 40px;
    height: 40px;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(10,102,194,0.3);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  .m-back-top.show { opacity: 1; visibility: visible; }

  /* Grid 强制单列 */
  .xs1,.xs2,.xs3,.xs4,.xs5,.xs6,.xs7,.xs8,.xs9,.xs10,.xs11,.xs12 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
  }
}

/* 桌面端隐藏手机专用元素 */
@media (min-width: 769px) {
  .m-header, .m-search-panel, .m-bottom-nav, .m-subnav, .m-back-top { display: none !important; }
}
