/*
 * Kangbao responsive stylesheet
 * Based on the current online /dist/css/responsive.css.
 * Load after styles.css and each channel page stylesheet.
 */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 1024px) {
  .shell,
  .container,
  .header-inner,
  .hero-content,
  [class$="-shell"] {
    width: calc(100% - 40px);
    max-width: none;
    margin-inline: auto;
  }

  /* Online shared header */
  .header,
  .site-header {
    height: 72px;
  }

  .header__inner,
  .header-inner {
    height: 72px;
  }

  .logo,
  .brand {
    width: min(190px, 58vw);
  }

  .logo img,
  .brand img {
    width: 100%;
    height: 56px;
    object-fit: contain;
    object-position: left center;
  }

  .menu,
  .menu-toggle {
    display: block;
    flex: 0 0 44px;
  }

  .nav,
  .main-nav {
    position: absolute;
    z-index: 1001;
    top: 100%;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 68px);
    padding: 12px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, .985);
  }

  .nav__item,
  .main-nav > a {
    width: 100%;
  }

  .nav__item {
    min-height: 48px;
    flex-wrap: wrap;
  }

  .nav__item > a {
    min-width: 0;
    flex: 1;
  }

  .nav__toggle {
    flex: 0 0 44px;
  }

  .subnav {
    position: static;
    width: 100%;
    max-width: none;
    box-shadow: none;
  }

  /* Homepage */
  .hero,
  .hero-swiper,
  .hero-swiper .swiper-wrapper,
  .hero-slide {
    height: clamp(460px, 118vw, 620px);
  }

  .hero-bg {
    width: 100%;
    max-width: 100%;
    transform: none;
    object-position: 62% center;
  }

  .hero-slide.swiper-slide-active .hero-bg {
    transform: scale(1.025);
  }

  .hero-content {
    padding-top: 110px;
  }

  .hero h1,
  .hero h2 {
    max-width: min(82vw, 580px);
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.3;
  }

  .hero p {
    max-width: min(82vw, 560px);
    font-size: clamp(16px, 3.8vw, 21px);
    line-height: 1.8;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero-actions .btn {
    min-width: 0;
    width: min(220px, 100%);
    height: 54px;
    padding-inline: 22px;
    font-size: 17px;
  }

  .intro-grid,
  .about-grid,
  .news-grid,
  .contact-grid,
  .base-grid {
    grid-template-columns: minmax(0, 1fr);
    gap:30px;
  }

  .intro-grid > *,
  .about-grid > *,
  .news-grid > *,
  .contact-grid > *,
  .base-grid > * {
    min-width: 0;
  }

  .product-grid,
  .culture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-carousel {
    width: 100%;
    overflow: hidden;
  }

  .timeline {
    width: 100%;
    justify-content: flex-start;
    gap: 24px;
    padding-inline: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .timeline::-webkit-scrollbar {
    display: none;
  }

  .timeline li {
    flex: 0 0 120px;
    min-width: 120px;
    scroll-snap-align: center;
  }

  .timeline-track {
    right: auto;
    left: 80px;
    width: max(620px, calc(100% - 160px));
  }

  /* Internal page heroes */
  .kb-about-hero,
  .kb-products-hero,
  .kb-production-hero,
  .kb-base-hero,
  .kb-culture-hero,
  .kb-contact-hero {
    height: clamp(440px, 72vw, 600px);
  }

  .kb-about-hero img,
  .kb-products-hero img,
  .kb-production-hero img,
  .kb-base-hero img,
  .kb-culture-hero img,
  .kb-contact-hero img {
    height: 100%;
    object-fit: cover;
  }

  /* About */
  .kb-about-profile__grid,
  .kb-about-message__grid {
    grid-template-columns: minmax(0, 1fr);
    gap:30px;
  }

  .kb-about-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kb-about-honors .swiper,
  .kb-about-honors__swiper {
    width: 100%;
    overflow: hidden;
  }

  /* Product center and production environment */
  .kb-products-categories,
  .kb-production-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kb-products-grid,
  .kb-production-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Product detail */
  .kb-detail-overview,
  .kb-detail-description__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-detail-overview > *,
  .kb-detail-description__inner > * {
    min-width: 0;
  }

  .kb-detail-overview__media,
  .kb-detail-description__media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    margin:0;
  }

  .kb-detail-description__media {
    grid-row: 1;
  }

  .kb-detail-related-swiper {
    width: 100%;
    overflow: hidden;
  }

  /* Source base */
  .kb-base-categories {
    width: 100%;
    flex-wrap: wrap;
  }

  .kb-base-categories a {
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
  }

  .kb-base-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-base-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Culture and contact */
  .kb-culture-item,
  .kb-culture-item--reverse {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .kb-contact-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .kb-contact-info,
  .kb-contact-message,
  .kb-contact-details {
    width: auto;
    min-width: 0;
  }

  .kb-contact-divider {
    display: none;
  }

  /* News */
  .kb-news-li {
    grid-template-columns: minmax(220px, 32%) minmax(0, 1fr) 112px;
  }

  .kb-news-detail-overview,
  .kb-news-detail-group,
  .kb-news-detail-content {
    max-width: 100%;
  }

  .kb-news-detail-content img,
  .kb-news-detail-content video,
  .kb-news-detail-content table {
    max-width: 100% !important;
  }

  .kb-news-detail-content table {
    display: block;
    overflow-x: auto;
  }

  .kb-news-detail-fanye {
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  }

  /* All footer variants */
  .footer__top,
  .footer-main,
  .kb-about-footer__top,
  .kb-products-footer__main,
  .kb-detail-footer__main,
  .kb-production-footer__top,
  .kb-base-footer__main {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__links,
  .footer-links,
  .kb-about-footer__links,
  .kb-products-footer__links,
  .kb-detail-footer__links,
  .kb-production-footer__links,
  .kb-base-footer__links,
  .kb-culture-footer__links,
  .kb-contact-footer__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .shell,
  .container,
  .header-inner,
  .hero-content,
  [class$="-shell"] {
    width: calc(100% - 32px);
  }

  .header,
  .site-header,
  .header__inner,
  .header-inner {
    height: 68px;
  }

  .nav,
  .main-nav {
    top: 68px;
    max-height: calc(100dvh - 68px);
  }

  .logo,
  .brand {
    width: min(176px, 56vw);
  }

  .logo img,
  .brand img {
    height: 52px;
  }
  .intro-copy>p{
    margin:0 0 30px;
  }
  .section-title h2{font-size:28px}
  .feature-grid h3{font-size: 18px;}
  .feature-grid p{font-size: 14px;}

  /* Homepage */
  .hero,
  .hero-swiper,
  .hero-swiper .swiper-wrapper,
  .hero-slide {
    height: 500px;
  }

  .hero-content {
    padding-top: 34%;
  }

  .hero h1,
  .hero h2 {
    max-width: 84vw;
    font-size: clamp(28px, 4.5vw, 40px);
  }

  .hero p {
    max-width: 84vw;
    margin: 14px 0 22px;
    font-size: 15px;
  }

  .hero-actions {
    width: 100%;
    flex-flow: row wrap;
    gap: 10px;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 138px;
    max-width: calc(50% - 5px);
    height: 46px;
    padding-inline: 16px;
    font-size: 15px;
    white-space: nowrap;
  }

  .hero-arrow {
    display: none;
  }

  .hero-pagination {
    bottom: 24px !important;
  }

  .intro-copy h2{font-size: 28px;}
  .section {
    padding: 20px 0;
  }
  .section-title{
    margin-bottom: 24px;
  }
  .values h3{font-size: 18px;}
  .timeline b{font-size:20px}
  .timeline span{font-size: 14px;}
  .feature-banner h3{
    font-size: 20px;
  }
  .feature-banner p{font-size: 14px;}
  .feature-banner a{font-size: 14px;padding:5px 15px;width:120px;}
  #culture, .contact{padding:30px 0;}
  .contact{margin-top: 20px;}

  .media-card {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .media-card video {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }

  .kb-base-gallery{padding:30px 0;}

  
  .feature-grid,
  .values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .feature-grid article,
  .values article {
    min-width: 0;
    align-items: flex-start;
  }

  .feature-grid svg,
  .feature-grid img {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
  }

  .product-grid,
  .culture-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .about-image,
  .lead-news .image-hover {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .timeline {
    gap: 8px;
    padding: 34px calc(50% - 60px) 4px;
  }

  .timeline-track {
    left: 50%;
    width: 620px;
    transform: translateX(-60px);
  }

  .feature-banner {
    height: auto;
    min-height: 280px;
  }

  .news-list article a,
  .news-list article {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
  }

  .news-list img {
    width: 110px;
    height: 92px;
    object-fit: cover;
  }

  .news-list h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .news-list p {
    display: none;
  }

  .contact-info p {
    overflow-wrap: anywhere;
    font-size: 14px;
  }

  .message-form {
    width: 100%;
    padding: 20px 16px;
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Internal heroes and breadcrumbs */
  .kb-about-hero,
  .kb-products-hero,
  .kb-production-hero,
  .kb-base-hero,
  .kb-culture-hero,
  .kb-contact-hero {
    height: 300px;
  }

  .kb-about-hero h1,
  .kb-products-hero h1,
  .kb-production-hero h1,
  .kb-base-hero h1,
  .kb-culture-hero h1,
  .kb-contact-hero h1 {
    max-width: 100%;
    font-size: clamp(36px, 5vw, 46px);
    line-height: 1.25;
    white-space: normal;
  }
  .kb-about-profile__photo img{min-height:auto}

  .kb-about-hero strong,
  .kb-products-hero strong,
  .kb-production-hero strong,
  .kb-base-hero strong,
  .kb-culture-hero strong,
  .kb-contact-hero strong {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
  }
  .kb-production-gallery{padding-bottom:0;}

  .kb-about-hero p,
  .kb-products-hero p,
  .kb-production-hero p,
  .kb-base-hero p,
  .kb-culture-hero p,
  .kb-contact-hero p {
    max-width: 88vw;
    font-size: 16px;
    line-height: 1.8;
  }

  .kb-about-breadcrumb,
  .kb-products-breadcrumb,
  .kb-detail-breadcrumb,
  .kb-production-breadcrumb,
  .kb-base-breadcrumb,
  .kb-culture-breadcrumb,
  .kb-contact-breadcrumb {
    height: auto;
    min-height: 72px;
    padding-block: 16px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }
  .kb-about-heading h2{font-size:24px}


  /* About */
  .kb-about-stats {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 20px;
  }

  .kb-about-stats article {
    padding-inline: 0;
    border-right: 0;
    border-bottom: 1px solid #d9e8df;
    padding: 10px 0;
  }
  .kb-about-stats strong{font-size: 24px;}
  .kb-about-profile{padding-bottom:30px}
  .kb-about-message{
    min-height: auto;
    padding:30px 0;
  }

  .kb-about-honors{
    min-height: auto;
    padding: 30px 0;
  }

  .kb-about-honors__stage{
    padding:0;
  }
  .kb-about-honors__pagination{display: none;}

  .kb-about-stats article:last-child {
    border-bottom: 0;
  }

  /* Product and production lists */
  .kb-products-categories,
  .kb-production-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kb-products-categories a,
  .kb-production-categories a {
    width: 100%;
    height: 56px;
    padding-inline: 8px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.35;
    text-align: center;
  }

  .kb-products-grid,
  .kb-production-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .kb-products-card {
    grid-template-rows: auto auto;
  }

  .kb-products-card__image,
  .kb-production-card__open {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .kb-products-card__body {
    height: auto;
    min-height: 122px;
  }

  .kb-production-lightbox {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding-inline: 6px;
  }

  .kb-production-lightbox__content {
    max-width: calc(100vw - 92px);
  }

  /* Product detail */
  .kb-detail-overview__media,
  .kb-detail-description__media {
    aspect-ratio: 4 / 3;
  }

  .kb-detail-title h1,
  .kb-detail-title h2,
  .kb-detail-title--center h2 {
    font-size: 30px;
    line-height: 1.3;
  }

  .kb-detail-title span,
  .kb-detail-overview__content > p,
  .kb-detail-copy,
  .kb-detail-note {
    font-size: 16px;
    line-height: 1.85;
  }

  .kb-detail-facts {
    width: 100%;
    flex-wrap: wrap;
  }

  .kb-detail-facts li {
    flex: 1 1 50%;
    padding-inline: 12px;
  }

  .kb-detail-card {
    grid-template-rows: auto 112px;
  }

  .kb-detail-card__image {
    aspect-ratio: 4 / 3;
  }

  /* Source base */
  .kb-base-categories {
    gap: 10px;
  }

  .kb-base-categories a {
    flex-basis: calc(50% - 5px);
    width: auto;
    height: 56px;
    padding-inline: 8px;
    border-radius: 6px;
    font-size: 15px;
    text-align: center;
  }

  .kb-base-overview__media {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .kb-base-features {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .kb-base-features img {
    width: 52px;
    height: 52px;
  }

  .kb-base-features span {
    font-size: 14px;
    white-space: normal;
  }

  .kb-base-gallery__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .kb-base-gallery__large,
  .kb-base-gallery__stack {
    grid-column: auto;
    height: auto !important;
  }

  .kb-base-gallery__stack {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 16px;
  }

  .kb-base-gallery__grid a,
  .kb-base-gallery__stack a {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  /* Culture */
  .kb-culture-item,
  .kb-culture-item--reverse {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .kb-culture-item .kb-culture-copy,
  .kb-culture-item--reverse .kb-culture-copy {
    order: 1;
  }

  .kb-culture-item figure,
  .kb-culture-item--reverse figure {
    order: 2;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .kb-culture-copy h2 {
    font-size: 34px;
    line-height: 1.4;
  }

  /* Contact */
  .kb-contact-main {
    display: block;
  }

  .kb-contact-message {
    margin-top: 48px;
    padding-top: 42px;
    border-top: 1px solid #ddd;
  }

  .kb-contact-detail {
    gap: 14px;
  }

  .kb-contact-detail > img {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .kb-contact-detail strong {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .kb-contact-form__row {
    display: block;
  }

  .kb-contact-form button {
    width: 100%;
    min-width: 0;
  }

  /* News list */
  .kb-news-item ul,
  .kb-news-item li {
    margin: 0;
    padding-left: 0;
  }

  .kb-news-li {
display: block;
    padding-block: 16px;
  }

  /* .kb-news-li-pic {
    width: 110px;
    height: 92px;
  } */

  .kb-news-li-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .kb-news-li-desc,
  .kb-news-li-btn {
    display: none;
  }

  .kb-news-li-content h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .kb-news-li-date {
    grid-column: 2;
    font-size: 13px;
  }

  /* News detail */
  .kb-news-detail-overview h1,
  .kb-news-detail-overview h2 {
    font-size: 26px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .kb-news-detail-group {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .kb-news-detail-content {
    font-size: 16px;
    line-height: 1.9;
    overflow-wrap: anywhere;
  }

  .kb-news-detail-content img,
  .kb-news-detail-content video {
    width: auto !important;
    height: auto !important;
    margin-inline: auto;
  }

  .kb-news-detail-fanye {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom:30px;
  }

  .fanye-box,
  .fanye-btn {
    width: 100%;
    min-width: 0;
  }

  /* Footers */
  .footer__top,
  .footer-main,
  .kb-about-footer__top,
  .kb-products-footer__main,
  .kb-detail-footer__main,
  .kb-production-footer__top,
  .kb-base-footer__main {
    gap: 28px;
    padding-block: 36px;
  }

  .footer__links,
  .footer-links,
  .kb-about-footer__links,
  .kb-products-footer__links,
  .kb-detail-footer__links,
  .kb-production-footer__links,
  .kb-base-footer__links,
  .kb-culture-footer__links,
  .kb-contact-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 12px;
  }

  .footer__links > div,
  .footer-links > div,
  [class$="-footer__links"] > div {
    min-width: 0;
    padding-left: 14px;
  }

  .footer__brand img{
    width:180px;
    height: auto;
  }


  .footer__bottom,
  .copyright .container,
  .kb-about-footer__bottom,
  .kb-products-footer__bottom .kb-products-shell,
  .kb-detail-footer__bottom .kb-detail-shell,
  .kb-production-footer__bottom,
  .kb-base-footer__bottom .kb-base-shell,
  .kb-culture-footer__bottom > div,
  .kb-contact-footer__bottom > div {
    height: auto;
    min-height: 0;
    padding-block: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    line-height: 1.7;
  }

  .backtop,
  .back-top,
  [class$="-backtop"] {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 360px) {
  .feature-grid,
  .values,
  .kb-products-categories,
  .kb-production-categories,
  .footer__links,
  .footer-links,
  .kb-about-footer__links,
  .kb-products-footer__links,
  .kb-detail-footer__links,
  .kb-production-footer__links,
  .kb-base-footer__links,
  .kb-culture-footer__links,
  .kb-contact-footer__links {
    grid-template-columns: minmax(0, 1fr);
  }

  .kb-base-categories a {
    flex-basis: 100%;
  }

  .hero-actions .btn {
    min-width: 0;
    max-width: 100%;
  }
}

@media (hover: none) and (pointer: coarse) {
  .image-hover:hover img,
  .product-card:hover img,
  .culture-card:hover img,
  [class*="gallery"] a:hover img {
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  [class$="-reveal"] {
    opacity: 1 !important;
    transform: none !important;
  }
}
