/* ========================================================
 * 响应式适配 (pages)
 * ======================================================== */
@media (max-width: 1440px) {
  .site-header .inner {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }
}

@media (max-width: 1280px) {
  .site-header .inner {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .home-banner .stats .inner {
    width: 100%;
    padding: 0 20px;
    gap: 10px;
  }

  .home-about .left {
    max-width: 50%;
  }

  .home-about .right {
    width: 45%;
  }

  .home-about .stats-grid {
    width: 100%;
  }

  .home-products .panel-text {
    flex: 1;
  }

  .product-detail .top .pic {
    flex: 0 0 400px;
  }

  .apps-case .case-pic {
    flex: 0 0 400px;
  }

  .search-bar {
    width: 100%;
  }

  .site-footer .footer-main {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }
}

@media (max-width: 1024px) {
  .site-header { position: fixed !important; top: 0; z-index: 1000; }
  /* ----- Banner: 完全参考原版，恢复背景全覆盖 + 数据底部悬浮 ----- */
  .home-banner {
    height: 540px;
    min-height: 0;
  }

  .home-banner .banner-list {
    height: 100%;
    min-height: 0;
  }

  .home-banner .banner-item {
    position: absolute;
    opacity: 0;
    display: block;
    transition: opacity 0.8s;
  }
  .home-banner .banner-item.active {
    opacity: 1;
  }

  .home-banner .container {
    height: 100%;
    padding: 80px 16px 0; /* 文字区放在上半部 */
    justify-content: flex-start;
  }

  .home-banner h1 {
    font-size: 28px;
    letter-spacing: 1px;
    line-height: 1.3;
    padding: 0 8px;
  }

  .home-banner .tagline {
    min-width: auto;
    padding: 0 18px;
    font-size: 14px;
    height: 34px;
    gap: 14px;
    letter-spacing: 1px;
  }

  /* stats 悬浮在图片中下部，不贴底，下方露出树林背景 */
  .home-banner .stats {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    height: auto;
    padding: 20px 16px 24px;
    background: rgba(255, 255, 255, 0.08); /* 半透白背景 */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0;
  }

  .home-banner .stats .inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .home-banner .stats-grid {
    flex-wrap: wrap;
    width: 100%;
    gap: 18px 12px;
  }

  .home-banner .stat-sep {
    display: none;
  }

  .home-banner .stat {
    width: calc(50% - 6px);
  }

  .home-banner .stat .num {
    font-size: 28px;
  }

  .home-banner .stat .num.short {
    font-size: 22px;
    line-height: 1;
  }

  .home-banner .stat .unit {
    font-size: 14px;
  }

  .home-banner .stat .label {
    font-size: 12px;
    margin-top: 6px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }

  .home-banner .arrows,
  .home-banner .dots {
    display: none;
  }

  .home-about .inner {
    flex-direction: column;
    gap: 40px;
  }

  .home-about .left {
    max-width: 100%;
  }

  .home-about .section-title .en {
    font-size: 14px;
  }

  .home-about .section-title .cn {
    font-size: 20px;
  }

  .home-about .heading h2 {
    font-size: 20px;
    line-height: 1.5;
    margin-top: 15px;
    white-space: nowrap;
  }

  .home-about .desc {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
  }

  .home-about .btn-more {
    margin-top: 30px;
  }

  .home-about .right {
    width: 100%;
    height: auto;
    margin-top: 0;
    padding: 0;
  }

  .home-about .right::before {
    inset: 0;
    border-radius: 12px;
  }

  .home-about .whale-deco,
  .home-products .whale-deco {
    display: none;
  }

  .home-about .stats-grid {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    padding: 40px 20px;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .home-about .stats-grid::before,
  .home-about .stats-grid::after {
    display: none;
  }

  .home-about .stat-item {
    width: 100%;
  }

  .home-about .stat-num .n {
    font-size: 40px;
  }

  .home-products .tabs {
    flex-wrap: wrap;
  }

  .home-products .tab {
    max-width: 100%;
  }

  .home-products .panel {
    flex-direction: column;
    gap: 30px;
  }

  .home-products .panel-img {
    width: 100%;
    height: 260px;
  }

  .home-ability .head,
  .home-rd .head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .home-ability .body {
    flex-direction: column;
  }

  .home-ability .side {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .home-ability .side-item {
    flex: 1;
    min-width: 110px;
    height: 50px;
    padding: 0 10px;
    justify-content: center;
  }

  .home-ability .side-item .arrow {
    display: none;
  }

  .home-ability .side-item .name {
    font-size: 16px;
  }

  .home-ability .main .icons {
    grid-template-columns: repeat(2, 1fr);
    padding: 30px 20px 0;
    gap: 20px;
  }

  .home-ability .main .summary {
    padding: 20px;
  }

  .home-rd .card {
    width: 100%;
    padding: 30px 20px;
  }

  .home-apps .cards {
    grid-template-columns: 1fr;
  }

  .home-apps .arrows {
    display: none;
  }

  .home-news .head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .home-news .layout {
    grid-template-columns: 1fr;
  }

  .home-news .list {
    grid-column: span 1;
  }

  .home-news .news-card .pic {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .home-news .filter {
    flex-wrap: wrap;
  }

  .home-partners .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Subpages */
  .page-banner {
    height: 40vw; /* match 750x300 aspect ratio */
  }
  .page-banner .bg,
  .page-banner .content {
    display: none !important;
  }

  .about-intro .whale {
    width: 100%;
  }

  .about-nums .inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }

  .about-nums .item+.item::before {
    display: none;
  }

  .about-values .inner {
    grid-template-columns: 1fr;
  }

  .about-history .year-tabs {
    flex-wrap: wrap;
    gap: 20px;
  }

  .about-history .year-tabs::before {
    display: none;
  }

  .about-honor {
    padding: 40px 0 0;
    height: 400px;
    aspect-ratio: auto;
  }
  .about-honor h2 {
    font-size: 24px;
    line-height: 36px;
  }

  .about-partners {
    padding: 70px 20px 80px;
  }

  .about-partners .inner {
    width: 100%;
  }

  .about-partners .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-partners .arrow.prev {
    left: 10px;
  }

  .about-partners .arrow.next {
    right: 10px;
  }

  .about-join .inner {
    width: 100%;
    padding: 0 20px;
  }

  .about-join .jobs {
    gap: 20px;
  }

  .about-join .job {
    width: calc(33.333% - 14px);
  }

  .product-card {
    flex-direction: column;
  }

  .product-card .pic {
    flex: auto;
    height: 240px;
  }

  .product-detail .inner {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .product-detail .top {
    flex-direction: column;
    gap: 24px;
  }

  .product-detail .top > div:first-child {
    flex: auto;
    width: 100%;
  }

  .product-detail .top .pic {
    flex: auto;
    height: 280px;
    width: 100%;
  }

  .product-detail .top .info {
    padding: 0;
  }

  .product-detail .top .buttons {
    flex-direction: column;
    gap: 15px;
  }

  .product-detail .top .btn-primary,
  .product-detail .top .btn-line {
    width: 100%;
    white-space: nowrap;
  }

  .product-detail .related-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail table {
    display: table;
    width: 100%;
    table-layout: auto;
    white-space: normal;
  }

  .product-detail table th,
  .product-detail table td {
    word-break: break-word;
    padding: 10px 8px;
  }

  .product-detail .section-tabs {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .product-detail .section-tabs::-webkit-scrollbar {
    display: none;
  }

  .product-detail .section-tabs button {
    flex: 0 0 auto;
    padding: 0 16px;
    height: 42px;
    font-size: 14px;
    white-space: nowrap;
  }

  .product-detail .feature-list {
    padding-left: 18px;
  }

  .product-detail .feature-list li {
    font-size: 14px;
    line-height: 1.7;
    padding: 6px 0;
  }

  .apps-case .case-row {
    flex-direction: column;
  }

  .apps-case .case-pic {
    flex: auto;
    width: 100%;
  }

  .apps-case .case-pic .main-img {
    height: auto;
    aspect-ratio: 3 / 2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .apps-case .case-pic .thumbs {
    flex-wrap: wrap;
  }

  .apps-case .case-pic .thumb {
    width: 100px;
    height: auto;
    aspect-ratio: 10 / 7;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .apps-related .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .apps-remark {
    flex-direction: column;
  }

  .rd-direction {
    padding: 60px 0;
  }

  .rd-direction .inner {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
  }

  .rd-direction .cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .rd-direction .card {
    width: 100%;
    max-width: 340px;
  }

  .rd-direction h2 {
    font-size: 22px;
    margin-bottom: 40px;
  }

  .rd-direction .card h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .rd-direction .card .feat-list {
    text-align: center;
  }

  .rd-direction .card .feat-list li {
    font-size: 14px;
    line-height: 1.8;
    padding-left: 0;
  }

  .rd-direction .card .feat-list li::before {
    display: none;
  }

  .rd-centers {
    flex-direction: column;
    padding: 60px 0 0;
    min-height: auto;
  }

  .rd-centers .inner {
    width: 100%;
    padding: 0 20px;
    margin-bottom: 40px;
  }

  .rd-centers .left {
    flex: auto;
    width: 100%;
  }

  .rd-centers .right {
    position: relative;
    width: 100%;
    height: 350px;
    left: 0;
    right: auto;
  }

  .rd-centers .slider-nav {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    gap: 20px;
    width: 100%;
    justify-content: center;
  }

  .rd-results .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rd-patents .inner {
    flex-direction: column;
    gap: 40px;
  }

  .rd-patents .left {
    flex: auto;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: auto;
    aspect-ratio: 700 / 798;
  }
  
  .rd-patents .left .patent-img-wrap {
    width: 100%;
    height: 100%;
    left: 0;
    transform: none;
    top: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .rd-patents .left .patent-img-wrap img {
    object-fit: cover;
  }

  .news-grid .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-detail .inner {
    flex-direction: column;
  }

  .news-detail .side {
    flex: auto;
    width: 100%;
  }

  .contact-cards .inner {
    grid-template-columns: 1fr;
  }

  .contact-form .inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form .form-row {
    flex-direction: column;
  }

  .jobs-page .inner {
    grid-template-columns: 1fr;
  }

  .jobs-filter .selects {
    flex-direction: column;
  }

  .search-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* ----- Banner: 极窄屏再次缩小字号，避免标题过长换太多行 ----- */
  .home-banner {
    height: 480px;
    min-height: 0;
  }

  .home-banner .banner-list {
    min-height: 0;
    height: 100%;
  }

  .home-banner .container {
    padding: 60px 14px 0;
    height: 100%;
    justify-content: flex-start;
  }

  .home-banner h1 {
    font-size: 22px;
    letter-spacing: 1px;
  }

  .home-banner .tagline {
    font-size: 12px;
    height: 30px;
    gap: 8px;
    padding: 0 14px;
  }

  .home-banner .stat {
    width: calc(50% - 6px);
  }

  .home-banner .stat .num {
    font-size: 22px;
  }

  .home-banner .stat .num.short {
    font-size: 18px;
  }

  .home-banner .stat .unit {
    font-size: 12px;
  }

  /* ----- Header: 窄屏 logo 文字略缩，避免与汉堡按钮挤压 ----- */
  .site-header .logo-text .cn,
  .site-footer .footer-logo .txt .cn {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .site-header .logo-text .en {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .site-header .inner {
    padding: 0 16px;
    gap: 12px;
  }

  .home-about .stats-grid {
    grid-template-columns: 1fr;
    padding: 30px 20px;
    gap: 20px;
  }

  .home-about .stat-item {
    align-items: center;
  }

  .home-about .heading h2 {
    font-size: 16px;
  }

  .home-partners .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-partners .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-honor {
    padding: 0;
    height: auto;
    aspect-ratio: 750 / 392;
  }
  .about-honor .title-wrap {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .about-honor h2 {
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 1px;
  }
  .about-honor .title-wrap::after {
    width: 60px;
  }

  .about-join .job {
    width: calc(50% - 10px);
  }

  .news-grid .grid {
    grid-template-columns: 1fr;
    gap: 40px; /* 增大文章与文章之间的间距 */
  }

  .news-grid .news-item {
    gap: 6px; /* 减小图片、时间、标题和内容之间的间距 */
  }

  .product-detail .related-list {
    grid-template-columns: 1fr;
  }

  .product-detail .thumbs {
    gap: 8px;
  }

  .product-detail .thumb {
    width: calc((100% - 24px) / 4);
    height: auto;
    aspect-ratio: 155 / 104;
  }

  .apps-case .case-pic .thumbs {
    gap: 8px;
  }

  .apps-case .case-pic .thumb {
    width: calc((100% - 24px) / 4);
  }

  .apps-related .grid {
    grid-template-columns: 1fr;
  }

  .rd-results .grid {
    grid-template-columns: 1fr;
  }

  .search-news-grid {
    grid-template-columns: 1fr;
  }

  .sub-section .title-wrap h2 {
    font-size: 24px;
  }
}

/* ---- 研发体系页面专属 banner ---- */
.page-banner.banner-rd .content {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: 0;
  gap: 20px;
}

.page-banner.banner-rd .content h1 {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 46px;
}

.page-banner.banner-rd .content .line {
  width: 1px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.4);
  margin: 0 10px;
}

.page-banner.banner-rd .content .sub {
  font-size: 16px;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  text-align: left;
}

.page-banner.banner-rd .content .sub p {
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .page-banner.banner-rd .content {
    flex-direction: column;
    align-items: center;
    padding-bottom: 30px;
    gap: 15px;
    text-align: center;
  }
  .page-banner.banner-rd .content h1 {
    font-size: 32px;
  }
  .page-banner.banner-rd .content .line {
    display: none;
  }
  .page-banner.banner-rd .content .sub {
    font-size: 14px;
    text-align: center;
  }
}

/* ========================================================
 * 移动端产品详情页底部悬浮 CTA bar
 * 仅在移动端 (≤1024px) 显示，提供留言/拨号直达入口
 * ======================================================== */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    gap: 10px;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #ececec;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
  }

  .mobile-cta-bar__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    min-width: 0;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    border-radius: 24px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-cta-bar__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .mobile-cta-bar__btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-cta-bar__btn--secondary {
    color: var(--color-primary);
    background: #fff;
    border: 1px solid var(--color-primary);
  }

  .mobile-cta-bar__btn--primary {
    color: #fff;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
  }

  .mobile-cta-bar__btn:active {
    opacity: 0.85;
  }

  /* 防止固定 bar 遮挡页面底部内容（如页脚、推荐产品） */
  body:has(.mobile-cta-bar) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
}
