/* =========================================
   移动设备专属样式 (Max Width: 767px)
========================================= */

body {
  font-size: 14px;
  transition: font-size 0.3s ease;
}

.screen1 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  max-height: 70vh;
  padding: 0 !important; /* 取消左右内边距，让 Banner 全宽显示，视野更大 */
  width: 100%;
  box-sizing: border-box;
}

/* 2. 重置 Banner 容器：利用 aspect-ratio 实现高度自适应 */
.screen1 .banner {
    width: 100%;
    /*设置宽高比（根据你原始图片的宽高比调整，如 16/9、16/10 或 2/1） */
    aspect-ratio: 2.2 / 1; /* 契合厂区全景图的适中比例 */
    height: auto !important; /* 清除电脑端可能设置的固定高度或 100vh */
    position: relative;
    overflow: hidden;
    border-radius: 0; /* 取消外层大圆角 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 可选：加一点淡阴影增加质感 */
}

/* 3. 优化图片展示：完整显示图片不裁剪 */
.screen1 .banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 核心：铺满容器，自动裁切上下无用空间 */
    object-position: center; /* 确保中间的厂区大门永远居中 */
    background-color: transparent;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* 显示当前激活的图片 */
.screen1 .banner img.active {
    opacity: 1;
}

.header-content .branding {
  flex-direction: row;
  align-items: center;
  transition: all 0.3s ease;
}

.header .header-content .branding-text .branding-sub {
  letter-spacing: 0.1em !important;
  line-height: 1.4;
  font-size: 1rem;
}

.header .header-content .branding .logo {
  width: clamp(50px, 3vw, 60px);
  height: auto;
  margin-right: 0.5rem;
  margin-top: 0;
  object-fit: contain;
}

.header-content .branding .branding-text {
  display: flex;
  flex-direction: column;
  align-items: center !important;
  text-align: center !important;
  margin-left: 0.3rem;
  max-width: 100%;
  height: auto;
}

.header .header-content .branding-text h1 {
  letter-spacing: 0.18em !important;
  white-space: nowrap;
  line-height: 1.4;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 0;
  transition: all 0.3s ease;
}

.navbar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0;
  margin: 0;
  width: 100%;
}

.navbar ul li {
  width: 48%;
  text-align: center;
  box-sizing: border-box;
  padding: 6px 0;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-right: none;
  transition: all 0.3s ease;
}

.navbar ul li:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.navbar ul li a {
  font-size: 1.1rem;
}

.header .header-content .branding-text .visually-hidden {
  font-size: 1.8rem;
}

.header .header-content .company-intro .intro-text {
  font-size: 1rem;
}

.screen1 p, .screen2 p, .screen3 p {
  max-width: 95%;
  width: auto;
}

/* 优化手机端下方描述文字 */
.banner-description {
    font-size: 13px;       /* 手机端字号适当缩小 */
    color: #666666;
    text-align: center;
    margin-top: 8px;      /* 紧贴 Banner，不要间距太大 */
    line-height: 1.4;
}

.screen2 .about-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;            /* 卡片与卡片之间的上下间距 */
  padding: 10px 15px;   /* 容器左右留边 */
  margin: 0 15px;
  width: calc(100% - 30px);
  transition: all 0.3s ease;
}

/*重置单个卡片：取消固定高度，高度随内容自适应*/
.screen2 .about-cards > div,       /* 匹配 about-cards 下的直接子元素卡片 */
.screen2 .about-cards .card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 12px;         /* 更加精致圆润的边角 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* 增加微微柔和的阴影 */
  flex: 1 1 100%;
  max-width: 95%;
  margin: 0 auto 15px auto;
  min-height: 0 !important;     /* 核心：清除最小高度限制 */
  height: auto !important;      /* 核心：覆盖电脑端的固定高度 */
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 限制卡片顶部图片高度，避免占用过多空间 */
.screen2 .about-cards .card img {
  width: 100%;
  height: 120px;         /* 压缩图片高度，为文字留出视觉焦点 */
  object-fit: cover;
}

.screen2 .about-cards .card .card-content {
  padding: 12px;
}

/* 卡片文字区域内边距与间距微调 */
.about-cards h3, 
.about-cards .title {
    font-size: 16px;
    font-weight: 700;
    margin: 12px 0 8px 0;
    text-align: center;
}

.about-cards p {
    font-size: 13px;
    line-height: 1.5;
    color: #666666;
    text-align: center;
    padding: 0 15px;      /* 正文左右留白 */
    margin-bottom: 12px;
}

/* 底部链接微调 */
.about-cards a,
.about-cards .link-text {
    font-size: 12px;
    color: #333333;
    text-align: center;
    margin-bottom: 15px;   /* 紧贴卡片底部，不再留出巨大空隙 */
    font-weight: 500;
}

#products {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 75vh;
  padding: 5px;
  overflow-y: auto;
}

#product-title .sidebar {
  flex: 1 1 30%;
  width: 30%;
  font-size: 0.8rem;
  padding: 5px;
  overflow-x: auto;
}

#product-title .scroll-container {
  height: 100%;
  overflow-y: auto;
}

.scroll-container .sub-menu {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: normal;
}

.sub-menu li {
  padding: 5px 0;
  margin: 2px 0;
}

#product-title .table-content {
  flex: 1;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  min-width: 70%;
}

#product-title .breadcrumb {
  font-size: 0.8rem;
  white-space: wrap;
  text-overflow: ellipsis;
}

.image-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.image-frame {
  flex: 0 1 100%;
  max-width: 100%;
  height: auto;
}

#product-title .image-frame img {
  width: 100%;
  height: auto;
  margin: 3px;
  object-fit: contain;
}

.certificate-container {
  flex: 0 0 100%;
  margin-bottom: 1rem;
}

.certificate-container img {
  width: 100%;
  max-width: 100%;
  height: auto;
  text-align: center;
  align-items: center;
  object-fit: contain;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.1);
}

.certificate-content-wrapper {
  flex-direction: column;
  gap: 10px;
}

.certificate-images {
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.scroll-container .nav-item > .toggle {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 5px 0;
}

.scroll-container .sub-menu > li {
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.3;
  padding: 4px 0;
}

.scroll-container .nav-item > .sub-menu {
  margin-left: 10px;
}

.scroll-container .sub-menu .sub-menu > li {
  font-size: 0.55rem;
  line-height: 1.2;
  padding: 3px 0;
}

.scroll-container .nav-item {
  margin-bottom: 10px;
}

#our-serve p {
  font-size: 0.9rem;
  text-align: justify;
  padding: 0 10px;
}

.certificate-images img {
  height: auto;
  max-width: 100%;
  object-fit: cover;
}

.services-images-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5em;
  padding: 1em;
  justify-items: stretch;
  align-content: stretch;
  align-items: stretch;
}

.services-images-grid img {
  height: 200px;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
}

#projects3 span { font-size: 1rem; }

#projects3 p, #case1 p, #case2 p, #case3 p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.project-case h4 {
  font-size: 1rem;
  margin-top: 0.5rem;
}

#case3 ul li { font-size: 0.9rem; }

.carousel-slide p {
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 0.5rem;
  text-align: left;
}

.project-images {
  display: grid;
  grid-template-columns: 1fr;
}

.project-images img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgb(0 0 0 / 0.1);
}

.more-customers h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

#customers p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 0 10px;
}

.customer-logos {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem;
  width: 90%;
  max-width: 95%;
}

.customer-logos img {
  width: 90px;
  max-width: 100%;
  height: auto;
  padding: 10px;
}

.screen7 {
  padding: 30px 15px;
  max-width: 100%;
}

.more-customers { margin-bottom: 1rem; }

.contact-us h2 {
  font-size: 1.5rem;
  line-height: 1.4;
}

#screen-eight .contact-us p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 90%;
  margin: 0 auto;
}

.contact-cards {
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}

.contact-card {
  width: 98%;
  margin: 0 auto;
  padding: 1rem;
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.contact-card p {
  font-size: 0.8rem;
  line-height: 1.4;
}

.contact-card a { font-size: 0.9rem; }

.screen8 .contact-card .contact-note {
  font-size: 1.1rem !important;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: #2c3e50 !important;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer {
  width: 100vw;
  padding: 1px 0;
}

#screen-nine .footer-content { padding: 0.875rem 10px; }
#screen-nine .footer-content .footer-bottom { font-size: 0.5rem; line-height: 1.4; }
#screen-nine .footer-content .footer-top { font-size: 0.4rem; margin-bottom: 8px; }
.section-divider { width: 90%; margin: 1.5rem auto; }

/* 修复手机端480px以下的Banner问题 */
@media (max-width: 480px) {
  .screen1 .banner {
    height: 55vh;
  }
}