/* ============================================
   华智精工科技 - 响应式样式 v2
   ============================================ */

.product-click-target { cursor: pointer; }
.product-click-target:focus-visible {
  outline: 3px solid rgba(var(--c-primary-rgb),0.7);
  outline-offset: -3px;
}

/* ---- Large Desktop (1400px+) ---- */
@media (max-width: 1400px) {
  .container { max-width: 1200px; }
  .nav-link { padding: 8px 14px; font-size: 14px; }
  .header-inner { gap: 16px; }
}

/* ---- Desktop (1200px) ---- */
@media (max-width: 1200px) {
  :root { --container: 100%; }

  .hero-title { font-size: 48px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .page-products .products-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .partners-grid { grid-template-columns: repeat(4, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-link { padding: 8px 10px; font-size: 13px; }
  .header-phone { font-size: 13px; padding: 6px 10px; }
  .header-inner { gap: 12px; }

  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-grid .news-card.featured { grid-column: span 2; grid-row: span 1; }

  .about-home-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-home-visual img { height: 360px; }

  .faq-layout { grid-template-columns: 1fr; }
  .faq-sidebar { position: static; }
}

/* ---- Tablet (992px) ---- */
@media (max-width: 992px) {
  :root { --header-h: 64px; }

  .nav, .header-actions .search-btn, .header-actions .header-phone { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-toggle span { background: var(--header-ink); }

  .header-actions .btn { display: none; }

  .nav-mobile {
    display: block;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    height: calc(100dvh - var(--header-h));
    width: 100%;
    max-width: 100vw;
    background: var(--c-nav-accent);
    color: var(--c-nav-on-accent);
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    padding: 16px 20px;
  }
  .header.menu-open {
    --header-ink: var(--c-nav-on-accent);
    --header-focus: var(--c-nav-on-accent);
    background: var(--c-nav-accent);
    border-bottom-color: var(--c-nav-glass-border);
  }
  .nav-mobile.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
  .nav-mobile .nav-item {
    border-bottom: 1px solid var(--c-nav-glass-border);
    padding-bottom: 0;
    margin-bottom: 0;
    position: relative;
  }
  .nav-mobile .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--c-nav-on-accent);
    width: 100%;
    box-sizing: border-box;
  }
  .header .nav-mobile .nav-link { color: var(--c-nav-on-accent); }
  .header .nav-mobile .nav-link:hover,
  .header .nav-mobile .nav-link:focus-visible,
  .header .nav-mobile .nav-link.active {
    background: var(--c-nav-surface);
    color: var(--c-nav-accent);
  }
  .header .nav-mobile a:focus-visible {
    outline: 2px solid var(--c-nav-on-accent);
    outline-offset: 3px;
  }
  .nav-mobile .nav-link::after { display: none; }
  .nav-mobile .nav-item > .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: var(--c-nav-glass-hero);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    margin: 0;
    padding: 8px 0 12px 16px;
    display: none;
    min-width: auto;
    pointer-events: auto;
  }
  .nav-mobile .nav-item.expanded > .nav-dropdown {
    display: block;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-mobile .nav-dropdown a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--c-nav-on-accent);
    border-radius: 4px;
    margin-bottom: 4px;
  }
  .header .nav-mobile .nav-dropdown a:hover,
  .header .nav-mobile .nav-dropdown a:focus-visible,
  .header .nav-mobile .nav-dropdown a.is_hover {
    background: var(--c-nav-surface);
    color: var(--c-nav-accent);
  }

  .hero { min-height: 560px; }
  .hero-title { font-size: 36px; }
  .hero-desc { font-size: 16px; }
  .hero-buttons { flex-direction: column; gap: 12px; }
  .hero-buttons .btn { width: fit-content; }

  .section-title { font-size: 28px; }
  .section-desc { font-size: 15px; }

  .news-grid { grid-template-columns: 1fr; }
  .news-grid .news-card.featured { grid-column: span 1; }

  .products-layout { grid-template-columns: 1fr; }
  .products-sidebar { position: static; display: block; }
  .products-list-grid { grid-template-columns: repeat(2, 1fr); }

  .product-detail-top { grid-template-columns: minmax(0, 1fr); }
  .product-detail-top > *,
  .product-gallery,
  .gallery-swiper,
  .gallery-swiper .swiper-wrapper,
  .gallery-swiper .swiper-slide {
    min-width: 0;
    max-width: 100%;
  }
  .gallery-main img { height: 360px; }

  .news-detail-layout { grid-template-columns: 1fr; }
  .about-intro { grid-template-columns: 1fr; gap: 40px; }
  .about-intro-img .float-card { bottom: 16px; left: 16px; max-width: calc(100% - 32px); padding: 16px 20px; }

  .contact-info-grid { grid-template-columns: 1fr; }
  .contact-main { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; gap: 24px; }

  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding: 0 0 30px 50px; margin-left: 0; }
  .timeline-item:nth-child(even) { margin-left: 0; padding: 0 0 30px 50px; }
  .timeline-item::before, .timeline-item:nth-child(even)::before { left: 12px; right: auto; }

  .about-home-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-home-highlights { grid-template-columns: 1fr; }
  .about-home-visual img { height: 320px; }
  .about-home-deco { display: none; }

  /* Better mobile menu behavior on tablets */
  .nav-mobile { -ms-overflow-style: none; scrollbar-width: none; }
  .nav-mobile::-webkit-scrollbar { display: none; }

  /* Horizontal reveal transforms expand the layout viewport on mobile. */
  .reveal-left,
  .reveal-right { transform: translateY(24px); }
  .reveal-left.is-visible,
  .reveal-right.is-visible { transform: translateY(0); }
}

/* ---- Mobile (768px) ---- */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-sm { padding: 40px 0; }

  /* Compact homepage rhythm */
  .home .features-section,
  .home .products-showcase,
  .home .solution-section,
  .home .news-preview,
  .home .about-home { padding: 52px 0; }
  .home .stats-section,
  .home .partners-section { padding: 44px 0; }
  .home .section-header { margin-bottom: 28px; }
  .home .products-showcase .products-tabs { margin-bottom: 26px; }
  .home .products-showcase .text-center { margin-top: 30px !important; }

  .hero { min-height: 520px; }
  .hero-title { font-size: 30px; }
  .hero-desc { font-size: 15px; margin-bottom: 28px; }

  .section-title { font-size: 24px; }
  .section-tag { font-size: 12px; padding: 5px 16px; }

  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .features-grid .feature-card {
    min-width: 0;
    padding: 18px 14px;
    border-radius: 16px;
    text-align: left;
    box-shadow: var(--shadow-card);
  }
  .features-grid .feature-icon {
    width: 44px;
    height: 44px;
    margin: 0 0 12px;
    border-radius: 12px;
    font-size: 21px;
  }
  .features-grid .feature-card h3 {
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
  }
  .features-grid .feature-card p {
    font-size: 12px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .products-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .products-sidebar { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-number { font-size: 32px; }
  .partners-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .partner-item { padding: 8px 8px 12px; gap: 10px; }
  .partner-logo { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; }
  .partner-name { font-size: 12px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }

  /* Mobile news grid: 2 columns to reduce page length */
  .news-grid,
  .news-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  /* Compact cards keep long product/news pages usable on phones. */
  .products-grid .product-img,
  .products-list-grid .product-img {
    height: clamp(120px, 34vw, 180px);
  }
  .products-grid .product-info,
  .products-list-grid .product-info { padding: 14px; }
  .products-grid .product-info h3,
  .products-list-grid .product-info h3 {
    min-height: 2.9em;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .products-grid .product-info p,
  .products-list-grid .product-info p { display: none; }
  .products-grid .product-meta,
  .products-list-grid .product-meta {
    gap: 8px;
    padding-top: 10px;
  }
  .products-grid .product-price,
  .products-list-grid .product-price,
  .products-grid .product-link,
  .products-list-grid .product-link { font-size: 12px; }
  .products-grid .product-link,
  .products-list-grid .product-link { white-space: nowrap; }

  .news-grid .news-img,
  .news-list-grid .news-img,
  .news-grid .news-card.featured .news-img {
    height: clamp(112px, 32vw, 170px);
  }
  .news-grid .news-content,
  .news-list-grid .news-content { padding: 12px; }
  .news-grid .news-card h3,
  .news-list-grid .news-card h3,
  .news-grid .news-card.featured h3 {
    min-height: 2.8em;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }
  .news-grid .news-card p,
  .news-list-grid .news-card p { display: none; }
  .news-grid .news-meta,
  .news-list-grid .news-meta {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 11px;
    line-height: 1.4;
  }
  .news-list-grid .news-meta span:first-child { display: none; }
  .news-grid .news-date,
  .news-list-grid .news-date {
    top: 8px;
    right: 8px;
    padding: 6px 9px;
    border-radius: 8px;
  }
  .news-grid .news-date .day,
  .news-list-grid .news-date .day { font-size: 17px; }
  .news-grid .news-date .month,
  .news-list-grid .news-date .month { font-size: 10px; }
  .news-grid .news-category,
  .news-list-grid .news-category {
    margin-bottom: 8px;
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Mobile about highlights: 2 columns */
  .about-home-highlights { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .about-highlight { padding: 12px; }

  /* Mobile value cards: 2 columns */
  .value-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .footer-grid { grid-template-columns: 1fr; }
  /* Mobile footer: only keep copyright and filing info */
  .footer-col:not(:first-child) { display: none; }
  .footer-col:first-child { text-align: center; }
  .footer-logo { justify-content: center; }
  .footer-social { justify-content: center; }
  .footer-desc { display: none; }
  .footer-contact-row { flex-direction: column; gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; }
  .footer-bottom-links a,
  .footer-bottom-links .footer-link-placeholder { display: none; }

  /* Desktop floating actions cover narrow two-column cards. */
  .floating-sidebar { display: none; }

  /* Homepage product tabs remain an intentional swipe rail. */
  .products-tabs-wrap { flex-direction: column; align-items: stretch; gap: 16px; }
  .products-showcase .products-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    width: 100%;
    justify-content: flex-start;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
  }
  .products-showcase .products-tabs::-webkit-scrollbar { display: none; }
  .products-showcase .products-tabs .product-tab {
    white-space: nowrap;
    flex-shrink: 0;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* List-page categories are all visible, with no hidden overflow. */
  .products-tabs-wrap .products-tabs {
    width: 100%;
    padding: 0;
    gap: 8px;
    overflow: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    background: transparent;
    border: 0;
  }
  .products-tabs-wrap .products-tabs .product-tab {
    flex: 0 1 auto;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--c-brand-100);
    border-radius: 10px;
    background: var(--c-brand-50);
    color: #525252;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: none;
  }
  .products-tabs-wrap .products-tabs .product-tab.active {
    border-color: var(--c-primary);
    background: var(--gradient-primary);
    color: var(--c-on-primary);
    box-shadow: var(--shadow-button-hover);
  }
  
  /* Mobile list search bar */
  .list-search-bar { margin: 20px 0 28px; }
  .search-bar-inner {
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  .search-bar-icon { display: none; }
  .search-bar-input {
    width: 100%;
    order: 1;
    padding: 10px 0;
  }
  .search-bar-btn {
    order: 2;
    flex: 1;
    padding: 12px 20px;
  }
  .search-bar-count {
    order: 3;
    width: 100%;
    text-align: center;
    padding-left: 0;
    border-left: none;
    padding-top: 8px;
    border-top: 1px solid var(--c-border);
  }

  /* Mobile FAQ nav: horizontal scroll */
  .faq-nav-wrap { flex-direction: column; align-items: stretch; }
  .faq-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    justify-content: flex-start;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .faq-nav::-webkit-scrollbar { display: none; }
  .faq-nav-item { white-space: nowrap; flex-shrink: 0; }
  .faq-search-box { min-width: 100%; }

  .page-banner { height: 260px; }
  .page-banner h1,
  .page-banner-title { font-size: 30px; }
  .page-banner p { font-size: 15px; }

  .product-specs ul { grid-template-columns: 1fr; }
  .product-detail-page { padding: 36px 0 56px; }
  .gallery-swiper { border-radius: 16px; touch-action: pan-y; }
  .gallery-swiper .swiper-wrapper,
  .gallery-swiper .swiper-slide {
    height: clamp(210px, 68vw, 300px);
    aspect-ratio: 4 / 3;
  }
  .gallery-swiper-prev,
  .gallery-swiper-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  /* Related products become a compact horizontal snap carousel. */
  .related-products { margin-top: 44px; }
  .related-products h2 {
    margin-bottom: 20px;
    font-size: 22px;
    text-align: left;
  }
  .related-products .products-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(236px, 78vw);
    gap: 14px;
    padding: 2px 2px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--c-primary) var(--c-border);
  }
  .related-products .products-grid::-webkit-scrollbar { height: 4px; }
  .related-products .products-grid::-webkit-scrollbar-track {
    background: var(--c-border);
    border-radius: 4px;
  }
  .related-products .products-grid::-webkit-scrollbar-thumb {
    background: var(--c-primary);
    border-radius: 4px;
  }
  .related-products .product-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .related-products .product-img { height: 156px; }
  .related-products .product-info { padding: 16px; }
  .related-products .product-info h3 {
    min-height: auto;
    font-size: 15px;
  }
  .product-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .product-tabs::-webkit-scrollbar { display: none; }
  .product-tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .news-article h1 { font-size: 24px; }
  .news-content { font-size: 15px; }

  .about-intro-text h2 { font-size: 26px; }
  .values-grid { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form-box { padding: 28px; }

  .cta-text h2 { font-size: 24px; }

  .faq-question { padding: 16px 18px; font-size: 15px; }
  .faq-answer { padding: 0 18px; }
  .faq-item.active .faq-answer { padding: 0 18px 18px; }
  .faq-cat-title { font-size: 18px; }
  .faq-contact-banner { padding: 28px 20px; }
  .faq-contact-inner { flex-direction: column; text-align: center; }
  .faq-contact-actions { flex-direction: column; width: 100%; }
  .faq-contact-actions .btn { width: 100%; justify-content: center; }

  .products-tabs { gap: 8px; }
  .product-tab { padding: 8px 18px; font-size: 13px; }
  .products-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Small Mobile (480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 12px; padding: 6px 14px; }

  .stat-number { font-size: 32px; }
  .stat-label { font-size: 13px; }

  .section-title { font-size: 21px; }
  .section-desc { font-size: 14px; }

  .value-card { padding: 30px 20px; }
  .value-icon { width: 56px; height: 56px; font-size: 26px; }
  .features-grid .feature-card { padding: 16px 12px; }

  .product-info h3 { font-size: 14px; }
  .news-card h3,
  .news-card.featured h3 { font-size: 14px; }

  .gallery-main img { height: 260px; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }

  .page-banner h1,
  .page-banner-title { font-size: 24px; }
  .breadcrumb { font-size: 13px; }

  .timeline-item, .timeline-item:nth-child(even) { padding-left: 40px; }
  .timeline-content { padding: 20px; }

  .contact-form-box { padding: 20px; }
  .contact-info-card { padding: 28px 20px; }

  .footer-bottom-links { gap: 12px; font-size: 12px; }

  .about-home-text h2 { font-size: 24px; }
  .about-home-badge { padding: 14px 18px; }
  .about-home-badge .badge-num { font-size: 22px; }

  .products-grid,
  .products-list-grid,
  .news-grid,
  .news-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card p,
  .news-card p { display: none; }
}
/* ---- Case center ---- */
@media (max-width: 1100px) {
  .page-cases .case-intro { gap: 34px; }
  .page-cases .case-toolbar { align-items: flex-start; flex-direction: column; }
  .page-cases .case-search { width: 100%; max-width: 360px; }
  .page-cases .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .page-cases .case-archive { padding: 56px 0 64px; }
  .page-cases .case-intro { display: block; margin-bottom: 28px; }
  .page-cases .case-intro h2 { font-size: 30px; }
  .page-cases .case-intro > p { margin-top: 16px; font-size: 14px; }
  .page-cases .case-toolbar { padding: 14px; gap: 14px; }
  .page-cases .case-filters { gap: 7px; }
  .page-cases .case-filter { min-height: 34px; padding: 0 10px; font-size: 12px; }
  .page-cases .case-grid { grid-template-columns: 1fr; gap: 18px; }
  .page-cases .case-card-body { min-height: 0; padding: 20px; }
}

@media (max-width: 480px) {
  .page-cases .case-page-banner .page-banner-content p:last-child { font-size: 13px; }
  .page-cases .case-filters { gap: 6px; }
  .page-cases .case-filter { padding: 0 9px; }
  .page-cases .case-card h3 { font-size: 19px; }
}

/* ---- Case detail ---- */
@media (max-width: 1100px) {
  .page-case-detail .case-detail-intro { grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); gap: 40px; }
  .page-case-detail .case-steps-wrap { gap: 38px; }
  .page-case-detail .case-metrics { gap: 34px; }
}

@media (max-width: 900px) {
  .page-case-detail .case-detail-intro,
  .page-case-detail .case-steps-wrap,
  .page-case-detail .case-metrics { grid-template-columns: 1fr; }
  .page-case-detail .case-detail-copy { max-width: 680px; }
  .page-case-detail .case-detail-image { max-width: 720px; }
  .page-case-detail .case-steps-wrap { gap: 28px; }
}

@media (max-width: 768px) {
  .page-case-detail .case-detail-hero { padding: 46px 0 54px; }
  .page-case-detail .case-detail-copy h1 { font-size: 33px; }
  .page-case-detail .case-detail-copy > p:not(.case-detail-label) { font-size: 14px; }
  .page-case-detail .case-facts { margin-top: 28px; }
  .page-case-detail .case-facts div { padding: 13px 10px; }
  .page-case-detail .case-detail-image { box-shadow: var(--shadow-card-panel); }
  .page-case-detail .case-detail-body { padding: 56px 0 62px; }
  .page-case-detail .case-detail-layout { grid-template-columns: 1fr; gap: 18px; }
  .page-case-detail .case-detail-section { min-height: 0; padding: 28px 24px; }
  .page-case-detail .case-detail-section h2,
  .page-case-detail .case-steps-wrap h2,
  .page-case-detail .case-metrics h2,
  .page-case-detail .related-cases-section h2 { font-size: 24px; }
  .page-case-detail .case-steps-wrap { margin-top: 44px; padding: 36px 0; }
  .page-case-detail .case-steps { gap: 10px; }
  .page-case-detail .case-steps li { min-height: 118px; padding: 16px 14px; }
  .page-case-detail .case-steps p { font-size: 13px; }
  .page-case-detail .case-metrics { margin-top: 46px; }
  .page-case-detail .related-cases-section { padding: 56px 0 64px; }
  .page-case-detail .related-cases { grid-template-columns: 1fr; gap: 16px; }
  .page-case-detail .related-case-card { display: grid; grid-template-columns: 42% 1fr; }
  .page-case-detail .related-case-image { height: 100%; aspect-ratio: auto; }
}

@media (max-width: 480px) {
  .page-case-detail .case-detail-copy h1 { font-size: 29px; }
  .page-case-detail .case-facts { grid-template-columns: 1fr; }
  .page-case-detail .case-steps { grid-template-columns: 1fr; }
  .page-case-detail .case-steps li { min-height: 0; }
  .page-case-detail .case-metrics-list { grid-template-columns: 1fr; }
  .page-case-detail .case-metrics-list > div { min-height: 0; }
  .page-case-detail .related-case-card { display: block; }
  .page-case-detail .related-case-image { aspect-ratio: 1.66 / 1; }
}

/* ---- Print ---- */
@media print {
  .header, .footer, .floating-sidebar, .hero-swiper-pagination, .hero-scroll { display: none !important; }
}
/* Mobile experience refinement: real touch, compact layouts and cleaner controls */
@media (max-width: 992px) {
    .header .mobile-toggle span {
        background-color: var(--header-ink);
        background-image: none;
        forced-color-adjust: none;
    }
    /* Hide the middle bar when the navigation trigger is in its close state. */
    .header .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    /* Allow vertical page scrolling while reserving horizontal gestures for the hero. */
    .hero,
    .hero-slider,
    .hero-slide {
        touch-action: pan-y;
        overscroll-behavior-x: contain;
    }
    .hero-swiper-prev,
    .hero-swiper-next {
        width: 42px;
        height: 42px;
    }
    .hero-swiper-prev { left: 14px; }
    .hero-swiper-next { right: 14px; }

    /* About: keep the editorial rhythm compact on a phone. */
    .about-hero,
    .values-section,
    .timeline-section,
    .team-section,
    .cert-section,
    .cta-section {
        padding-top: 44px !important;
        padding-bottom: 44px !important;
    }

    .about-hero .section-header,
    .values-section .section-header,
    .timeline-section .section-header,
    .team-section .section-header,
    .cert-section .section-header,
    .cta-section .section-header {
        margin-bottom: 26px !important;
    }

    /* News detail: remove card padding that was narrowing the article twice. */
    .news-article .news-content {
        width: 100%;
        max-width: none;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    /* Search is intentionally input-only on mobile. */
    .search-bar-inner {
        display: flex;
        flex-wrap: nowrap !important;
        align-items: center;
        min-height: 52px;
        padding: 6px 16px !important;
        gap: 0 !important;
        border: 1px solid rgba(var(--c-primary-deep-rgb),.12);
        border-radius: 15px;
        background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
        box-shadow: 0 8px 24px rgba(var(--c-primary-deep-rgb),.08);
    }

    .search-bar-input {
        order: initial !important;
        width: auto !important;
        min-width: 0;
        flex: 1 1 auto;
        padding: 10px 0 !important;
        border: 0;
        background: transparent;
        font-size: 14px;
        line-height: 1.5;
    }

    .search-bar-input:focus {
        outline: none;
    }

    .search-bar-inner:focus-within {
        border-color: rgba(var(--c-primary-dark-rgb),.42);
        box-shadow: 0 0 0 3px rgba(var(--c-primary-dark-rgb),.09), 0 10px 28px rgba(var(--c-primary-deep-rgb),.1);
    }

    .search-bar-icon,
    .search-bar-btn,
    .search-bar-count {
        display: none !important;
    }

    /* The compact mobile footer contains legal information only. */
    .footer {
        padding-top: 0 !important;
    }

    .footer-bg,
    .footer-grid,
    .footer-bottom-links {
        display: none !important;
    }

    .footer-bottom {
        min-height: 0;
        margin-top: 0 !important;
        padding: 18px 0 !important;
        justify-content: center;
        border-top: 0 !important;
        text-align: center;
    }

    .footer-bottom > :not(:first-child) {
        display: none !important;
    }

    .footer-bottom > :first-child {
        width: 100%;
        color: var(--c-on-footer);
        font-size: 12px;
        line-height: 1.8;
    }
}

/* ========================================
   Mobile FAQ Width Optimization
   ======================================== */
@media (max-width: 768px) {
  .faq-page .container {
    padding: 0 10px;
  }
  .faq-category {
    padding: 20px 14px;
    border-radius: 14px;
    margin-bottom: 28px;
  }
  .faq-cat-title {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .faq-question {
    padding: 16px 14px;
    font-size: 14px;
  }
  .faq-item.active .faq-answer {
    padding: 0 14px 16px;
    font-size: 14px;
  }
  .faq-nav-wrap {
    padding: 16px 10px;
    margin-bottom: 24px;
  }
  .faq-nav {
    gap: 8px;
    margin-bottom: 14px;
  }
  .faq-nav-item {
    padding: 8px 12px;
    font-size: 13px;
  }
  .faq-search-box {
    max-width: 100%;
  }
  .faq-contact-inner {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .faq-page .container {
    padding: 0 8px;
  }
  .faq-category {
    padding: 16px 12px;
  }
  .faq-question {
    padding: 14px 12px;
    font-size: 13px;
  }
  .faq-item.active .faq-answer {
    padding: 0 12px 14px;
    font-size: 13px;
  }
}
