/* ==========================================================================
   mobile.css - 移动端专用增强与微调（Binance 深色）
   ========================================================================== */

/* --------------------------------------------------------------------------
   触摸优化
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] a,
[data-child-theme="binance"] button,
[data-child-theme="binance"] .btn,
[data-child-theme="binance"] .post-item {
  -webkit-tap-highlight-color: rgba(252, 213, 53, 0.15);
}

/* --------------------------------------------------------------------------
   移动端：减少动效
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  [data-child-theme="binance"] *,
  [data-child-theme="binance"] *::before,
  [data-child-theme="binance"] *::after {
    transition-duration: 0.15s !important;
  }

  /* 取消桌面端的 hover 浮起效果 */
  [data-child-theme="binance"] .post-item:hover,
  [data-child-theme="binance"] .hover-lift:hover,
  [data-child-theme="binance"] .division-item:hover,
  [data-child-theme="binance"] .cat-item:hover,
  [data-child-theme="binance"] .price-card:hover,
  [data-child-theme="binance"] .overview-item:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   移动端顶部导航
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  [data-child-theme="binance"] .site-header {
    background: rgba(11, 14, 17, 0.98);
  }
  [data-child-theme="binance"] .site-header .navbar {
    padding: 0;
  }
  [data-child-theme="binance"] .site-header .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   移动端主内容 padding 适配
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  [data-child-theme="binance"] .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  [data-child-theme="binance"] main {
    padding-bottom: 80px;
  }
}

/* --------------------------------------------------------------------------
   移动端首页小工具 stack
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  [data-child-theme="binance"] .home-widget {
    margin-bottom: 1rem;
  }

  [data-child-theme="binance"] .posts-warp.row-cols-1 {
    gap: 0.85rem;
  }

  /* 移动端 tab 切换优化 */
  [data-child-theme="binance"] .last-posts-tabs,
  [data-child-theme="binance"] .cat-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
  }
  [data-child-theme="binance"] .last-posts-tabs button,
  [data-child-theme="binance"] .cat-tabs button {
    flex-shrink: 0;
  }

  [data-child-theme="binance"] .entry-hero .entry-hero-content {
    padding: 1.75rem 1rem;
  }
}

/* --------------------------------------------------------------------------
   移动端 widget 卡片简化
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  [data-child-theme="binance"] .home-division,
  [data-child-theme="binance"] .last-posts,
  [data-child-theme="binance"] .cat-posts,
  [data-child-theme="binance"] .cms-posts,
  [data-child-theme="binance"] .title-posts,
  [data-child-theme="binance"] .home-overview,
  [data-child-theme="binance"] .cat-box {
    padding: 1rem;
    margin-bottom: 0.85rem;
    border-radius: var(--ri-border-radius-lg);
  }

  /* 移动端 division 2 列 */
  [data-child-theme="binance"] .home-division .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
  }
  [data-child-theme="binance"] .home-division .row > [class*="col-"] {
    flex: 0 0 auto;
    width: 50%;
  }

  /* 移动端 overview 2 列 */
  [data-child-theme="binance"] .home-overview .row > [class*="col-"] {
    flex: 0 0 auto;
    width: 33.333%;
  }

  /* 移动端动态条紧凑 */
  [data-child-theme="binance"] .home-dynamic {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }
  [data-child-theme="binance"] .home-dynamic .dynamic-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  /* 移动端 search-bg 紧凑 */
  [data-child-theme="binance"] .search-bg {
    padding: 1.5rem 1rem;
    border-radius: var(--ri-border-radius-xl);
  }
  [data-child-theme="binance"] .search-bg .search-title {
    font-size: 1.2rem;
  }
  [data-child-theme="binance"] .search-bg .form-control {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

/* --------------------------------------------------------------------------
   移动端滚动优化
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  [data-child-theme="binance"] html,
  [data-child-theme="binance"] body {
    overflow-x: hidden;
  }

  [data-child-theme="binance"] h1 { font-size: 1.6rem; }
  [data-child-theme="binance"] h2 { font-size: 1.3rem; }
  [data-child-theme="binance"] h3 { font-size: 1.1rem; }
  [data-child-theme="binance"] h4 { font-size: 1rem; }
  [data-child-theme="binance"] h5 { font-size: 0.95rem; }
  [data-child-theme="binance"] h6 { font-size: 0.85rem; }
}

/* --------------------------------------------------------------------------
   横屏移动设备优化
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) and (orientation: landscape) {
  [data-child-theme="binance"] .off-canvas {
    width: 60%;
    max-width: 380px;
  }
}