/* ============================================================
   门户移动端适配层（四川辰越 电子招投标服务平台）
   作用域：仅手机/小平板（≤720px、≤480px）；桌面端样式不变
   说明：本文件在 site.css / site-v2.css 之后加载，同名选择器优先生效
   ============================================================ */

.v2-nav-toggle { display: none; }
.v2-nav-links { display: flex; align-items: center; height: 100%; }

@media (max-width: 720px) {
  html { -webkit-text-size-adjust: 100%; }
  html, body { overflow-x: hidden; max-width: 100%; }
  img { max-width: 100%; height: auto; }

  /* ---------- 版心 / 面包屑 ---------- */
  .container { width: calc(100% - 24px); }
  .crumb { font-size: 13px; }
  .crumb-inner { padding: 10px 0; }
  .section { padding: 18px 0 30px; }

  /* ---------- 顶部工具栏：字号加大、允许换行 ---------- */
  .v2-topbar { height: auto; padding: 6px 0; font-size: 13px; line-height: 1.6; }
  .v2-topbar { overflow: hidden; }
  .v2-topbar .v2-topbar-inner { flex-wrap: wrap; align-items: center; gap: 4px 10px; justify-content: flex-start; width: 100%; }
  .v2-topbar .topbar-welcome { display: block; width: 100%; }
  .v2-topbar .topbar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; white-space: normal; }
  .v2-topbar .topbar-links a { white-space: nowrap; }
  .v2-topbar .topbar-sep { display: none; }

  /* ---------- 品牌头部 ---------- */
  .v2-header,
  .v2-header .v2-header-inner { height: auto; min-height: 62px; padding: 10px 0; }
  .v2-header-inner { flex-wrap: wrap; gap: 10px; }
  .v2-brand-logo { width: 44px; height: 44px; }
  .v2-brand .brand-text strong { font-size: 17px; }
  .v2-brand .brand-text small { font-size: 11.5px; }
  .v2-header-actions { width: 100%; gap: 10px; }
  .v2-header-actions .btn { flex: 1 1 auto; min-height: 42px; font-size: 15px; }
  .v2-header-tel { display: none; }

  /* ---------- 主导航：手机端折叠菜单 ---------- */
  .v2-nav,
  .v2-nav .v2-nav-inner { height: auto; }
  .v2-nav .v2-nav-inner { display: block; padding: 0; }
  .v2-nav-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; height: 48px; padding: 0 14px;
    background: transparent; border: 0; color: #fff;
    font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .v2-nav-toggle .v2-nav-toggle-inner { display: flex; align-items: center; gap: 8px; }
  .v2-nav-caret { font-size: 12px; transition: transform .2s ease; }
  .v2-nav.open .v2-nav-caret { transform: rotate(180deg); }
  .v2-nav-links { display: none; flex-direction: column; height: auto; }
  .v2-nav.open .v2-nav-links { display: flex; }
  .v2-nav .v2-nav-inner .v2-nav-links a {
    display: flex; align-items: center;
    width: 100%; min-width: 0; height: 46px; padding: 0 16px;
    font-size: 15px; border-top: 1px solid rgba(255, 255, 255, .12);
  }

  /* ---------- 首屏轮播 ---------- */
  .hero-banner { height: auto; min-height: 300px; }
  .hero-slide { min-height: 300px; }
  .caption { padding: 0 16px; }
  .caption h2 { font-size: 22px; line-height: 1.35; }
  .caption p { font-size: 13.5px; line-height: 1.7; }
  .caption .eyebrow,
  .caption .hp-eyebrow { font-size: 12px; }
  /* 手机端背景图文字容易与文案重叠：压暗背景并右移主体 */
  .hero-banner .slide.s1,
  .hero-banner .slide.s2 { background-position: right center; }
  .hero-banner .slide.s1::after,
  .hero-banner .slide.s2::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(6, 30, 56, .82) 0%, rgba(6, 30, 56, .88) 60%, rgba(6, 30, 56, .94) 100%);
  }
  .hero-banner .slide.s3::before { opacity: .35; }
  .hero-banner .banner-wrap { width: calc(100% - 32px); }
  .hero-banner .caption { max-width: 100%; }

  /* ---------- 首页标讯大厅：表格转卡片列表 ---------- */
  .hp-hall-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hp-tabs { width: 100%; overflow-x: auto; }
  .hp-tab { flex: 1 0 auto; min-width: 88px; height: 40px; font-size: 14px; }
  .hp-table-container { overflow: visible; border-radius: 0 0 6px 6px; }
  .hp-pane .hp-table,
  .hp-pane .hp-table tbody,
  .hp-pane .hp-table tr,
  .hp-pane .hp-table td { display: block; width: auto; }
  .hp-pane .hp-table { min-width: 0 !important; table-layout: auto; }
  .hp-pane .hp-table thead { display: none; }
  .hp-pane .hp-table tr { padding: 12px 14px; border-bottom: 1px solid var(--v2-line-soft, #e9eef2); }
  .hp-pane .hp-table tr:last-child { border-bottom: 0; }
  .hp-pane .hp-table td { height: auto; padding: 0; border: 0; }
  .hp-pane .hp-table td.hp-col-title { margin-bottom: 6px; }
  .hp-pane .hp-table .hp-title { font-size: 15px; font-weight: 600; line-height: 1.55; }
  .hp-pane .hp-table td:not(.hp-col-title) {
    display: inline-flex; align-items: center; gap: 4px;
    margin: 2px 14px 0 0; color: #6b7885; font-size: 12.5px;
  }
  .hp-pane .hp-table td:nth-child(2)::before { content: "采购方式："; color: #98a4af; }
  .hp-pane .hp-table td:nth-child(3)::before { content: "发布日期："; color: #98a4af; }
  .hp-pane .hp-table td:nth-child(4)::before { content: "状态："; color: #98a4af; }
  .hp-pane .hp-table td:nth-child(4) { text-align: left !important; }

  /* ---------- 检索托盘 ---------- */
  .hp-search-wrap { padding: 12px 0 14px; }
  .hp-search { flex-wrap: wrap; gap: 10px; }
  .hp-search select,
  .hp-search-input,
  .hp-search-btn { width: 100%; min-width: 0; }
  .hp-search-btn { height: 44px; }

  /* ---------- 通用列表页表格：横向滚动，首列加宽 ---------- */
  .hall-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hall-table { min-width: 560px; }
  .hall-table th,
  .hall-table td { padding: 10px 12px; font-size: 13.5px; }
  .hall-table .col-title { min-width: 260px; }
  /* 公告标题在手机上允许换行完整显示（桌面端保持单行省略） */
  .hall-table .col-title a {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
    line-height: 1.55;
  }
  /* 手机端标讯列表转卡片：字段带标签、信息完整 */
  .hall-table-wrap:has(table.mob-cardified) { overflow: visible; border: 0; background: transparent; }
  table.hall-table.mob-cardified { display: block; min-width: 0 !important; width: 100%; border: 0; }
  table.hall-table.mob-cardified thead { display: none; }
  table.hall-table.mob-cardified tbody { display: block; }
  table.hall-table.mob-cardified tr {
    display: block; background: #fff; border: 1px solid var(--v2-line, #e5eaf0);
    border-radius: 8px; margin-bottom: 10px; padding: 10px 12px;
  }
  table.hall-table.mob-cardified td {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 3px 0 !important; border: 0; font-size: 14px; line-height: 1.6;
  }
  table.hall-table.mob-cardified td::before {
    content: attr(data-label) "："; flex: 0 0 4.6em;
    color: #98a4af; font-size: 13px;
  }
  table.hall-table.mob-cardified td[data-label=""]::before { content: ""; flex: 0 0 0; }
  table.hall-table.mob-cardified .col-title a { font-weight: 600; }
  .search-form input[type="search"]::placeholder { font-size: 13.5px; }

  /* ---------- 列表页头部 / 搜索 ---------- */
  .section-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .section-head h1,
  .section-head h2 { font-size: 19px; }
  .section-head p { font-size: 13px; }
  .search-form { flex-direction: column; gap: 8px; }
  .search-form input[type="search"] { width: 100%; min-height: 42px; font-size: 16px; }
  .search-form .btn { width: 100%; min-height: 42px; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .category-tabs a { flex: 0 0 auto; padding: 10px 14px; font-size: 14px; white-space: nowrap; }

  /* ---------- 表单：全宽单列、16px 防 iOS 缩放 ---------- */
  input[type="text"], input[type="password"], input[type="search"], input[type="email"],
  input[type="tel"], input[type="number"], input[type="date"], select, textarea { font-size: 16px; }
  .field input, .field select, .field textarea { min-height: 44px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-actions, .form-actions .btn { width: 100%; }
  .card { padding: 16px; }
  .btn { min-height: 42px; font-size: 15px; }

  /* ---------- 公告/法规详情 ---------- */
  .notice-detail header h1 { font-size: 20px; line-height: 1.5; }
  .notice-detail .meta,
  .notice-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
  .notice-detail .meta span,
  .notice-meta span { margin: 0 !important; }
  .notice-detail .content,
  .notice-content,
  .article-body { font-size: 16px; line-height: 1.9; }
  .notice-detail .content table,
  .notice-content table,
  .article-body table { display: block; overflow-x: auto; }
  .notice-detail img,
  .notice-content img { max-width: 100%; height: auto; }

  /* ---------- 页脚 ---------- */
  .v2-footer { padding: 34px 0 0; }
  .v2-footer .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .v2-footer .footer-brand { font-size: 15.5px; }
  .v2-footer .footer-col > strong { font-size: 15px; }
  .v2-footer .footer-links a { font-size: 14px; line-height: 2.2; }
  .v2-footer .footer-hours { font-size: 13px; }
  .v2-footer .footer-tel { font-size: 21px; }
  .footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; font-size: 12.5px; line-height: 1.8; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 20px); }
  .caption h2 { font-size: 20px; }
  .hp-pane .hp-table .hp-title { font-size: 14.5px; }
  .v2-header-actions .btn { font-size: 14.5px; }
}
