/* ================= NAVBAR ====================== */
/* ================= MOBILE MENU ================= */
@media (max-width: 900px) {

    .hamburger { display: flex; }

    nav ul.nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;              /* 用 viewport，不是 100% */
        max-height: 100vh;
        overflow-y: auto;           /* ✅ 允许纵向滚动 */
        overscroll-behavior: contain;

        -webkit-overflow-scrolling: touch; /* iOS 顺滑滚动 */
        padding-top: 90px;
        padding-left: 20px;
        display: none;
        flex-direction: column;
        gap: 14px;
        transform: translateX(100%);
        transition: .3s ease;
        z-index: 20002;

        background: rgba(20, 20, 20, 0.55) !important; /* 深色但透明 */
        backdrop-filter: blur(22px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(180%) !important;

        border-radius: 25px 0 0 25px !important;
        padding-top: 95px !important;
        padding-left: 25px !important;

        /* 阴影加强（科技感重点） */
        box-shadow: -15px 0 40px rgba(0,0,0,0.45);
    }

    nav ul.nav-links.active {
        display: flex;
        transform: translateX(0);
    }

    nav ul.nav-links > li > a {
        padding: 12px 4px;
        border-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff !important;
        font-weight: 700;
        letter-spacing: .2px;
        border-radius: 12px;
        padding: 14px 4px;
    }

    nav ul.nav-links > li > a:hover {
        background: rgba(255,255,255,0.10);
    }

    /* MOBILE DROPDOWN — ONLY DOWN, NEVER RIGHT */
    ul.dropdown {
        position: static !important;
        width: 100%;
        opacity: 0;
        pointer-events: none;
        max-height: 0;
        overflow: hidden;
        background: rgba(35, 35, 35, 0.65);
        border-radius: 18px;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px);
        margin-left: 5px;
        padding: 0;
        margin-top: 0;
        transition: .25s ease;
    }

    .has-dropdown.open > ul.dropdown {
        opacity: 1 !important;
        pointer-events: auto !important;
        max-height: 999px !important;
        padding: 6px 0 !important;
        margin-top: 3px !important;
        background: rgba(255,255,255,0.07) !important;
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 8px 20px rgba(0,0,0,0.35) !important;
    }

    ul.dropdown li a {
        padding: 10px 20px;
        color: #f5f5f5;
        white-space: normal !important; /* ← 允许换行 */
        line-height: 1.3;
    }

    ul.dropdown li a:hover {
        background: rgba(255,255,255,0.12);
        color: white；
    }

    .nav-links li.has-dropdown > ul.dropdown > li > a {
        padding-left: 32px !important;
    }

    .nav-links li.has-dropdown > ul.dropdown > li.has-dropdown > ul.dropdown a {
        padding-left: 50px !important;
    }
}

/* ----------------- Footer ----------------- */
/* Phones <768px */
@media screen and (max-width: 767px) {
  .footer-content { flex-direction: column; align-items: center; text-align: center; }
  .footer-right { flex-direction: column; align-items: center; gap: 20px; }
  .footer-nav { align-items: center; text-align: center; }
  .footer-nav.accurus-link a { text-align: center; }
}

/* ================= Mobile ================= */

@media screen and (max-width: 768px) {
  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left {
    max-width: none;
  }

  .footer-right {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

/* ====================== HOME ========================== */
@media (max-width: 480px) {
    .opening-container {
        min-height: 100vh;
    }
}

/* ====================== About Us ====================== */
/* ==================== Who We Are ====================== */
@media (max-width: 768px) {
	.left-container {
		flex: 1 1 100%; /* Full width on smaller screens */
		max-width: 100%; /* Ensure it fills the container */
	}
}

@media (max-width: 768px) {
	.right-container img {
		max-width: 100%; /* On smaller screens, make the image fill the container */
		max-height:100%;
	}
}

/* ====================== Vision ========================= */
@media (max-width: 860px) {
	.vision-container {
		flex-direction: column;
		text-align: center;
	}
	
	.right-container-vision h3 {
		font-size: 24px;
	}

	.right-container-vision p {
		font-size: 16px;
	}
}

/* ====================== Mision ========================= */
@media (max-width: 768px) {
	.mission-container {
		flex-direction: column-reverse;
		text-align: center;
	}

	.left-container-mission h3 {
		font-size: 24px;
	}

	.left-container-mission p {
		font-size: 16px;
	}
}

/* ===================== LEADERSHIP – MOBILE FINAL FIX ===================== */
@media (max-width: 768px) {

  .bio-panel {
    position: fixed;
    inset: 0;  
    overflow-y: auto;              /* top right bottom left = 0 */
    width: 100%;
    height: 100%;
    max-height: 100vh;

    padding: 24px 20px 40px;
    padding-top: 72px; /* 专门留给 close */    overflow-y: auto;

    background: #fff;
    z-index: 30000;          /* 必须 > navbar */

    border-radius: 0;
    box-shadow: none;

    transform: translateY(100%);
    transition: transform 0.35s ease;
  }

  .bio-panel.active {
    transform: translateY(0);
  }

  /* 人物照片：不再裁切 */
  #bio-img {
    width: 100%;
    max-width: 260px;
    height: auto;
    max-height: none;        /* ❗关键：解除高度限制 */
    margin-bottom: 16px;
  }

  /* Close button 永远在最上层 */
  .bio-close {
    position: sticky;
    top: 5px;
    align-self: flex-end;
    margin-left: auto;
    z-index: 5;
    background: transparent;
    right: 16px;
    font-size: 30px;
  }

  .bio-panel {
  overscroll-behavior: contain;
  }
}

/* ====================== OUR JOURNEY MOBILE FIX ====================== */
@media (max-width: 768px) {
  .modal-header {
    height: 130px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .modal-header h2 {
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .modal-header .year {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.6);
    border-radius: 999px;
    font-size: 13px;
  }

  .journey-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
  }

  .journey-images img {
    width: 100%;
    max-width: 320px;      /* 防止太大 */
    margin: 0 auto;        /* 居中 */
    border-radius: 12px;   /* 视觉更柔 */
  }

  .modal-nav {
    display: none !important;
  }

  .swipe-hint {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    font-size: 13px;
    color: #b6d7da;
    opacity: 0.75;
    text-align: center;
    pointer-events: none;

    animation: swipePulse 2s ease-in-out infinite;
  }

  @keyframes swipePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

  .journey-close {
    width: 28px;
    height: 28px;
    line-height: 28px;

    font-size: 16px;
    font-weight: 600;

    background: rgba(255, 255, 255, 0.6);
    color: #333;

    border-radius: 50%;
    backdrop-filter: blur(6px);

    position: absolute;
    top: 12px;
    right: 12px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    opacity: 0.75;

    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .journey-close:active {
    opacity: 1;
    transform: scale(0.95);
  }

  .journey-modal,
  .modal-content {
    overscroll-behavior: contain; /* 🔥 阻断 scroll 向上传递 */
  }

}
/* ====================== AWARDS MOBILE FIX ====================== */
@media (max-width: 768px) {

  /* 阻止整页被撑爆 */
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Awards 外层不能撑大页面 */
  .awards-wrapper {
    width: 100%;
    overflow-x: hidden;
  }

  /* 横向滚动只在 awards 内发生 */
  .awards-loop {
    max-width: 100vw;
  }

  /* 单个 award 在 mobile 缩小 */
  .award {
    width: 80vw;
    max-width: 320px;
  }
}

/* ====================== Where We Are ============================ */
/* Right: Google Maps embed */
@media (max-width: 768px) {

  /* =========================
   MOBILE – Penang Section
========================= */
  /* 整个 section 改成直排 */
  #section1 .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* 标题在最上 */
  #section1 .left-container {
    order: 1;
    text-align: center;
  }

  /* 图片第二 */
  #section1 .left-image,
  #section1 .location-image {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  #section1 .left-image img,
  #section1 .location-image img {
    max-width: 100%;
    border-radius: 12px;
  }

  /* 文字最后 */
  #section1 .right-container {
    order: 3;
    padding: 0 16px;
  }

  #section1 .right-container p {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
  }

  /* =========================
   MOBILE – SUZHOU Section
========================= */
  /* 整体改成直排 */
  .container2 {
    flex-direction: column;
  }

  /* 标题 + 图片先出现 */
  .right-container2 {
    order: 1;
    width: 100%;
    text-align: center;
    margin-bottom: 16px;
  }

  .right-container2 h2 {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .right-image2 img {
    max-width: 100%;
    height: auto;
    margin: 12px auto 0;
    display: block;
  }

  /* 文字说明排在下面 */
  .left-container2 {
    order: 2;
    width: 100%;
  }

  .left-text2 {
    padding: 0 10px;
    text-align: justify;
  }

    .container-4 {
        flex-direction: column;
    }

    .right-container-4 iframe {
        min-height: 250px;
    }

    .desktop-spacer {
    display: none;
  }
}


/* ====================== Product ============================ */
@media (max-width: 1024px) {
	.product-series .container {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}
}

@media (max-width: 768px) {
	.product-series .container {
		grid-template-columns: 1fr; 
		padding: 10px; 
	}

	.series-item {
		padding: 15px;
	}

	.series-item img {
		border-radius: 5px; 
	}

	.series-item p {
		font-size: 14px; 
	}
}

/* ====================== Product – Mobile FINAL FIX ====================== */
@media (max-width: 768px) {

  .product-section .product-card {
    flex-direction: column;
    align-items: stretch;
  }

  /* 🔥 强制顺序 */
  .product-section .product-image-slider {
    order: 1;
    width: 100%;
    height: auto;
    margin-bottom: 16px;
  }

  .product-section .product-info {
    order: 2;
    width: 100%;
  }

  .product-section .product-image-slider img {
    max-height: 220px;
  }
}

/* ====================== Solution ============================ */
	@media (max-width: 768px) {

  /* 所有 solution 页面通用 */
  .container {
    flex-direction: column;
    margin-top: 70px 0;
  }

  /* 图片统一在上 */
  .container-left img,
  .container-right img {
    order: 1;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
  }

  /* 文字统一在下 */
  .container-left:not(:has(img)),
  .container-right:not(:has(img)) {
    order: 2;
  }
		.page-title-inner h1 {
			font-size: 2.2rem;
		}
		.page-title-inner p {
			font-size: 1rem;
		}
		.container-right.images {
			justify-content: center;
		}
	}

/* ====================== Careers ============================ */
@media (max-width: 768px) {
    .why-join-us-container {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1.25rem;
  }

  .why-join-us-container img {
    max-width: 100%;
  }

  .why-join-us-container p {
    text-align: left;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ====================== News ============================ */
@media (max-width: 600px) {
    .modal-main-image,
    .modal-main-video {
        width: 85%;
        max-height: 260px;
    }
    .modal-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .close-btn {
      top: 5px;
      opacity: 0.65;              /* 👈 半透明 */
      background: rgba(255,255,255,0.7); /* 柔一点的底 */
      backdrop-filter: blur(4px); /* 高级感（可选） */
      font-size: 20px;
      font-weight: bold;
    }
    .close-btn:hover {
      opacity: 0.9;               /* hover 时再清楚一点 */
    }
}

/* ====================== Events ============================ */
@media (max-width: 768px) {
  .event-gallery img {
    width: calc(50% - 12px);
  }
}

@media (max-width: 480px) {
  .event-gallery img {
    width: 100%;
  }
}

/* ====================== Contact Us ============================ */
@media (max-width: 768px) {

  .enquiry-container {
    flex-direction: column;   /* ⭐ 关键 */
    align-items: center;      /* ⭐ 真正居中 */
    padding: 0 16px 120px;    /* 防止左右再撑爆 */
  }

  .enquiry-box {
    width: 100%;
    max-width: 360px;         /* 控制卡片宽度，好看 */
  }
    .contact-close-btn {
    opacity: 0.65;   /* 你之前说想要半透明，这里顺便给你 */
  }

}

/* ================= BODY RESET (MOBILE) ================= */
@media (max-width: 768px) {

  body {
    padding-top: 60px;   /* 保留给 navbar */
    padding-left: 0;
    padding-right: 0;
  }

    .page-title {
    padding: 50px 16px 30px;   /* 原本 100px → 50px */
  }
}
