/* ========================================
 * malaji.com 官网响应式样式 responsive.css
 * 断点：PC ≥ 1200px / 平板 768-1199px / 手机 ≤ 767px
 * ======================================== */

/* ===== 平板（768px - 1199px） ===== */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }

  /* 导航 */
  .nav__menu {
    position: fixed;
    top: 64px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 64px);
    background: var(--color-nav);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 4px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .nav__menu--open {
    right: 0;
  }

  .nav__link {
    width: 100%;
    padding: 12px 16px;
  }

  .nav__toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 480px;
  }

  .hero__slogan {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  /* 数据卡片：5列→3列 */
  .data-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .data-card:nth-child(4),
  .data-card:nth-child(5) {
    /* 后两个移到第二行居中 */
  }

  /* 入口卡片：2列→1列 */
  .entry-grid {
    grid-template-columns: 1fr;
  }

  /* 资讯列表：2列→1列 */
  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 企业列表：3列→2列 */
  .enterprise-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .enterprise-card__header {
    padding: 12px 14px;
  }

  .enterprise-card__name {
    font-size: 0.95rem;
  }

  .enterprise-card__products {
    gap: 6px;
    padding: 10px 14px;
  }

  .enterprise-card__product {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .enterprise-card__body {
    padding: 10px 14px 16px;
  }

  /* 统计区：4列→2列 */
  .stats-block {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 五统一：5列→3列 */
  .unify-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 权益：3列→2列 */
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ROI：3列→2列 */
  .roi-calculator__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 红黑榜：2列→1列 */
  .rank-list {
    grid-template-columns: 1fr;
  }

  /* 页脚：4列→2列 */
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer__brand-col {
    grid-column: 1 / -1;
  }

  /* 域名对比 */
  .domain-compare {
    grid-template-columns: 1fr;
  }
}

/* ===== 手机（≤ 767px） ===== */
@media (max-width: 767px) {
  :root {
    --space-section: 40px;
  }

  .container {
    padding: 0 16px;
  }

  /* 导航 */
  .nav__logo {
    font-size: 1.1rem;
  }

  .nav__logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  /* Hero */
  .hero {
    min-height: 420px;
    margin-top: 56px;
  }

  .hero__slogan {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  /* 标题 */
  .section-title h2 {
    font-size: 1.5rem;
  }

  /* 数据卡片：3列→2列 */
  .data-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .data-card {
    padding: 20px 12px;
  }

  .data-card__value {
    font-size: 1.5rem;
  }

  .data-card__icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  /* 入口卡片 */
  .entry-card {
    flex-direction: column;
    padding: 24px;
    gap: 16px;
  }

  .entry-card__icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  /* 资讯列表：2列→1列 */
  .news-list {
    grid-template-columns: 1fr;
  }

  /* 企业列表：2列→1列，卡片改为横向布局 */
  .enterprise-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .enterprise-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
  }

  .enterprise-card__header {
    flex-direction: column;
    width: 90px;
    padding: 12px 8px;
    border-bottom: none;
    border-right: 1px solid var(--color-bg-cream);
    flex-shrink: 0;
    justify-content: center;
    gap: 6px;
  }

  .enterprise-card__logo {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .enterprise-card__name {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.3;
  }

  /* 中间产品图标区 */
  .enterprise-card__products {
    flex-direction: column;
    width: 70px;
    padding: 8px;
    gap: 4px;
    border-right: 1px solid var(--color-bg-cream);
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-start;
  }

  .enterprise-card__product {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  /* 右侧描述+按钮区 */
  .enterprise-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    min-width: 0;
  }

  .enterprise-card__desc {
    font-size: 0.8rem;
    margin-bottom: 8px;
    -webkit-line-clamp: 3;
  }

  .enterprise-card__btn {
    width: 100%;
    padding: 8px 0;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  /* 统计区：2列→1列 */
  .stats-block {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-item {
    padding: 20px 12px;
  }

  .stat-item__value {
    font-size: 1.6rem;
  }

  /* 五统一：3列→2列 */
  .unify-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 权益：2列→1列 */
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  /* ROI：2列→1列 */
  .roi-calculator__grid {
    grid-template-columns: 1fr;
  }

  .roi-calculator {
    padding: 24px;
  }

  /* 页脚 */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* 移动端隐藏快速导航板块（与导航栏汉堡菜单功能重复） */
  .footer__col-quicknav {
    display: none;
  }

  /* 品牌列+产业服务+合作伙伴改为两列并排，更紧凑 */
  .footer__brand-col {
    grid-column: 1 / -1;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__top > div:not(.footer__brand-col):not(.footer__col-quicknav) {
    min-width: 0;
  }

  /* 页脚各板块：标题独占一行加底边框分隔，内容项横向并列（自动换行） */
  .footer__title {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* 移动端链接容器：flex横向排列+自动换行 */
  .footer__links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .footer__link {
    display: inline-block;
    padding: 6px 14px;
    margin: 0;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .footer__link:hover {
    background: rgba(255,255,255,0.12);
    color: var(--color-gold);
    border-color: rgba(212,168,71,0.3);
  }

  .footer__bottom {
    font-size: 0.75rem;
  }

  .footer__icp {
    flex-direction: column;
    gap: 6px;
  }

  /* 筛选栏 */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar__group {
    width: 100%;
  }

  .filter-bar__select,
  .filter-bar__input {
    flex: 1;
  }

  .filter-bar__search {
    margin-left: 0;
  }

  /* 时间轴 */
  .timeline {
    padding-left: 28px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline__dot {
    left: -28px;
  }

  .timeline__year {
    font-size: 1.1rem;
  }

  /* 模态弹窗 */
  .modal-overlay {
    padding: 10px;
  }

  .modal__header {
    padding: 20px;
  }

  .modal__body {
    padding: 16px 20px 24px;
  }

  .modal__title {
    font-size: 1.2rem;
  }

  .modal__list {
    grid-template-columns: 1fr;
  }

  /* 合作模式 */
  .coop-flow {
    flex-direction: column;
  }

  .coop-arrow {
    transform: rotate(90deg);
  }

  .coop-node {
    width: 100%;
  }

  /* 文章详情 */
  .article {
    padding: 20px;
  }

  .article__title {
    font-size: 1.3rem;
  }

  .article__content {
    font-size: 0.95rem;
  }

  /* 企业卡片产品 */
  .enterprise-card__products {
    flex-wrap: wrap;
  }

  .enterprise-card__product {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }

  /* 返回顶部 */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ===== 超小屏（≤ 480px） ===== */
@media (max-width: 480px) {
  .hero__slogan {
    font-size: 1.3rem;
  }

  .data-cards {
    grid-template-columns: 1fr;
  }

  .stats-block {
    grid-template-columns: 1fr;
  }

  .unify-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 1.3rem;
  }
}

/* ===== 打印样式 ===== */
@media print {
  .nav,
  .footer,
  .back-to-top,
  .hero__actions,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
