/* ============================================================
   MIRAHO 移动端响应式适配  mobile.css
   仅在小屏生效，不改变桌面端设计、排版与风格
   ============================================================ */

/* 汉堡按钮与移动菜单：桌面/大屏默认隐藏 */
.mobile-nav-toggle { display: none; }
.mobile-menu { display: none; }

/* ---------- 平板及以下：收紧容器 ---------- */
@media (max-width: 991px) {
  .container { padding-left: 18px; padding-right: 18px; }
  /* 标题在平板略收 */
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
}

/* ---------- 手机端 ---------- */
@media (max-width: 767px) {

  /* 基础排版 */
  body { font-size: 16px; line-height: 1.75; }
  h1 { font-size: 26px; line-height: 1.3; }
  h2 { font-size: 23px; line-height: 1.35; }
  h3 { font-size: 19px; }
  p { margin-bottom: 12px; }

  /* 容器与区块间距 */
  .container { padding-left: 16px; padding-right: 16px; }
  section { padding-left: 0; padding-right: 0; }
  [class*="module-spacing"],
  .u-vertical-padding,
  .u-bottom-padding { padding-top: 30px; padding-bottom: 30px; }

  /* 图片/视频/媒体自适应，不溢出 */
  img { max-width: 100%; height: auto; }
  .featured-content__image img,
  .text-and-video-img img,
  .c-featured-panel__image img { width: 100%; height: auto; }

  /* ===== 顶部：让 header 可定位下拉菜单 ===== */
  header.header { position: relative; }

  /* 隐藏桌面端原有导航（用移动菜单替代） */
  .header__topstrip { display: none !important; }
  #nav { display: none !important; }

  /* 顶部 logo 行：logo 与汉堡各占合适宽度 */
  .header .row > .header__logo { width: 70%; float: left; }
  .header .row > #navigation { width: 30%; float: left; padding: 0; }
  .header__logo img { max-height: 60px; width: auto; }

  /* 汉堡按钮显示 */
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    margin: 6px 0 6px auto;
    padding: 9px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
  }
  .mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
  }
  /* 展开时汉堡变关闭(X) */
  .mobile-nav-open .mobile-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-open .mobile-nav-toggle span:nth-child(2) { opacity: 0; }
  .mobile-nav-open .mobile-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* 移动菜单下拉面板：全宽，位于 header 下方 */
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #d71920;
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
    z-index: 999;
    max-height: 75vh;
    overflow-y: auto;
  }
  .mobile-nav-open .mobile-menu { display: block; }

  /* 移动菜单：主导航垂直列表 */
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu__main li { border-bottom: 1px solid #eee; }
  .mobile-menu__main li a {
    display: block;
    padding: 14px 18px;
    font-size: 16px;
    color: #1f2328;
  }
  .mobile-menu__main li a:active,
  .mobile-menu__main li a:hover { background: #f5f5f5; }

  /* 移动菜单：顶部快捷链接（小标签横排/换行） */
  .mobile-menu__top {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #eee;
  }
  .mobile-menu__top li { margin: 4px 6px; }
  .mobile-menu__top li a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 13px;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
  }

  /* ===== 特色卡片/三列卡片：保证间距与全宽 ===== */
  .col-box, .variation-card-box { width: 100%; margin-bottom: 22px; }
  .variation-content-box { padding: 16px; }

  /* 文字+图片区块：灰色背景块间距 */
  .featured-content__padding,
  .description { padding: 20px 16px; }

  /* ===== 表格（如详情页内表格式内容）横向滚动，避免撑破 ===== */
  .news-data-wrapper, .sitecontainer { overflow-x: hidden; }
  table { max-width: 100%; }

  /* ===== 表单（Order / Contact）适配 ===== */
  input[type="text"], input[type="email"], input[type="tel"],
  textarea, select {
    max-width: 100%;
    width: 100%;
    margin-bottom: 12px;
  }
  .btn, button[type="submit"], input[type="submit"] {
    width: 100%;
    max-width: 100%;
    padding: 13px 20px;
  }

  /* ===== Banner 高度收敛 ===== */
  .homepage-banner-wrapper { min-height: 220px; background-size: cover !important; }

  /* ===== 底部版权行允许换行 ===== */
  .footer__copyright .dyndate { flex-wrap: wrap !important; }
  .footer__copyright .dyndate span { width: 100%; margin: 4px 0; }

  /* 底部社交横排栏避免遮挡正文：给页面底部留白 */
  body { padding-bottom: 76px; }
}

/* ---------- 超小屏（≤360px）进一步收紧 ---------- */
@media (max-width: 360px) {
  body { font-size: 15px; }
  h2 { font-size: 21px; }
  .container { padding-left: 13px; padding-right: 13px; }
}