/* 全局样式与变量 */
:root {
    --primary-color: #0f3272; /* 主色调深蓝 */
    --secondary-color: #1f4b8c; /* 辅助蓝 */
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f6f8;
    --accent-color: #3f7bbd; /* 按钮蓝 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}



html {
    scroll-behavior: smooth; /* 平滑滚动 */
}

/* ===== 子公司横幅：共用外观 ===== */
.subsidiary-banner-pc,
.subsidiary-banner {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 22px 0;
    font-size: 18px;
    letter-spacing: 1px;
    overflow: hidden;
}

/* 默认（1199px 及以下）：隐藏 PC 版，显示手机版 */
.subsidiary-banner-pc {
    display: none;
}

.subsidiary-banner {
    display: block;
}

.container-mobile {
    display: none;   /* 电脑端隐藏，1199px 以下才显示 */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

body {
    color: var(--text-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 電腦版容器：1199px 以下會被隱藏 */
.container-pc {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部与导航 */
header {
    position: relative;
    width: 100%;
    background-color: #eef2f7;
    overflow: hidden;
    min-height: 600px;
    height: 100vh;
    height: 100dvh;
}

/* ===== Banner 轮播 ===== */
.banner-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
    /* 文案所在的居中栏宽度，可按需调整 */
    --banner-box: 1000px;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    /* 淡出快于淡入，减少两张大标题文字重叠 */
    transition: opacity 0.5s ease-in;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
    transition: opacity 0.9s ease-in;
}

/* ===== Banner 上的文案 ===== */
/* 文案排在一个居中的固定宽度栏内：右图文字贴栏的右缘，左图文字贴栏的左缘 */
/* 栏宽由 --banner-box 控制（默认 1000px），字号使用固定像素，不随缩放变化 */
.banner-slide:nth-child(1) {
    background-image: url('../images/banner1.webp');
    background-size: cover;

    --text-right: 0px;        /* 距居中栏右缘 */
    --btn-right: -4px;        /* 按钮比文字右移 4px */
    --h2-top: 23.38%;         /* 标题文字顶部 243px */
    --h2-size: 48px;          /* 标题字高 48px */
    --h2-lh: 48px;            /* 标题行高（用于计算行间距） */
    --h2-tracking: 0;         /* 标题字间距 */
    --p-size: 24px;           /* 副标题字高 24px */
    --p-lh: 24px;             /* 副标题行高（用于计算行间距） */
    --banner-text-color: #003070;
    --banner-btn-color: #003070;

    /* ===== 行间距（电脑端固定像素，不随视口高度变化）===== */
    /* 标题底部 → 副标题顶部的固定间距 */
    --gap-title-p: 30px;
    /* 副标题底部 → 按钮顶部的固定间距 */
    --gap-p-btn: 28px;
}

.banner-slide:nth-child(2) {
    background-image: url('../images/banner2.webp');
    background-size: cover;
    --text-left: 0px;         /* 距居中栏左缘 */
    --btn-left: 4px;          /* 按钮比文字右移 4px */
    --h2-top: 23.38%;         /* 标题文字顶部 243px */
    --h2-size: 48px;          /* 标题字高 48px */
    --h2-lh: 48px;            /* 标题行高（用于计算行间距） */
    --h2-tracking: 0;         /* 原图标题字面略宽，补字间距 */
    --p-size: 24px;           /* 副标题字高 24px */
    --p-lh: 24px;             /* 副标题行高（用于计算行间距） */
    --banner-text-color: #003070;
    --banner-btn-color: #003070;

    /* ===== 行间距（电脑端固定像素，不随视口高度变化）===== */
    /* 标题底部 → 副标题顶部的固定间距 */
    --gap-title-p: 30px;
    /* 副标题底部 → 按钮顶部的固定间距 */
    --gap-p-btn: 28px;
}

.banner-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

/* 三行内容逐项绝对定位，避免行高/外边距带来的累积误差 */
.banner-content h2,
.banner-content p,
.banner-content .btn-primary {
    position: absolute;
    margin: 0;
}

/* 居中栏的左右边缘位置（栏宽 --banner-box，视口过窄时自动贴边） */
.banner-slide:nth-child(1) .banner-content h2,
.banner-slide:nth-child(1) .banner-content p {
    right: max(0px, calc(50% - var(--banner-box) / 2 + var(--text-right)));
    left: auto;
}

.banner-slide:nth-child(1) .banner-content .btn-primary {
    right: max(0px, calc(50% - var(--banner-box) / 2 + var(--btn-right)));
    left: auto;
}

.banner-slide:nth-child(2) .banner-content h2,
.banner-slide:nth-child(2) .banner-content p {
    left: max(0px, calc(50% - var(--banner-box) / 2 + var(--text-left)));
    right: auto;
}

.banner-slide:nth-child(2) .banner-content .btn-primary {
    left: max(0px, calc(50% - var(--banner-box) / 2 + var(--btn-left)));
    right: auto;
}

.banner-content h2 {
    top: var(--h2-top);
    font-size: var(--h2-size);
    line-height: 1em;
    letter-spacing: var(--h2-tracking, 0);
    color: var(--banner-text-color);
}

/* 副标题：紧接标题下方，间距为固定像素 */
.banner-content p {
    top: calc(var(--h2-top) + var(--h2-lh, 49px) + var(--gap-title-p, 30px));
    font-size: var(--p-size);
    line-height: 1em;
    color: var(--banner-text-color);
}

/* 按钮：紧接副标题下方，间距为固定像素 */
.banner-content .btn-primary {
    top: calc(var(--h2-top) + var(--h2-lh, 49px) + var(--gap-title-p, 30px) + var(--p-lh, 24px) + var(--gap-p-btn, 28px));
    pointer-events: auto;
    background-color: var(--banner-btn-color);
    font-size: 18px;
    line-height: 1.2;
    padding: 0.62em 2.65em;
    border-radius: 0.5em;
    box-shadow: 0 4px 14px rgba(11, 34, 76, 0.25);
}

/* ===== Banner 文案入场动画：每张幻灯片激活时播放一次 ===== */
@keyframes bannerFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 默认隐藏，激活时由动画淡入上移 */
.banner-content h2,
.banner-content p,
.banner-content .btn-primary {
    opacity: 0;
}

.banner-slide.active .banner-content h2 {
    animation: bannerFadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards;
}

.banner-slide.active .banner-content p {
    animation: bannerFadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
}

.banner-slide.active .banner-content .btn-primary {
    animation: bannerFadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s forwards;
}

/* 尊重系统的“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
    .banner-content h2,
    .banner-content p,
    .banner-content .btn-primary {
        opacity: 1;
        animation: none;
    }
}

/* 768–1166px：位置继续沿用上面的百分比，字号保持固定不变 */

/* 小屏：图片文字已被裁出可视区，文案改为常规排版保证可读 */
@media (max-width: 767px) {
    header {
        min-height: 460px;
    }

    .banner-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 90px 6% 24px;
    }
    .banner-content h2,
    .banner-content p,
    .banner-content .btn-primary {
        position: static;
        left: auto;
        right: auto;
        top: auto;
    }
    .banner-content h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    .banner-content p {
        font-size: 13px;
        margin-bottom: 14px;
    }
    .banner-content .btn-primary {
        font-size: 13px;
        padding: 0.6em 2em;
    }
}

/* 窄屏时保持底部对齐 */
@media (max-width: 1166px) {
    .banner-slide {
        background-position: center bottom;
    }
}

/* 轮播指示器（圆点） */
.banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 12;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.banner-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.banner-dots button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.banner-dots button.active {
    background-color: #fff;
    transform: scale(1.25);
}

/* 左右切换箭头 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
}

header:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background-color: rgba(11, 34, 76, 0.75);
}

.banner-arrow.prev {
    left: 24px;
}

.banner-arrow.next {
    right: 24px;
}

.banner-arrow svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 600px) {
    .banner-arrow {
        display: none;
    }
    .banner-dots {
        bottom: 16px;
    }
}

/* 顶部导航栏 */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 20px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 500px;
    height: 64px;
    background: url(../images/logo.webp) no-repeat center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-style: italic;
    font-size: 24px;
}

.logo-icon-foot {
    width: 500px;
    height: 64px;
    background: url(../images/logo-foot.webp) no-repeat center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-style: italic;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
}

.nav-links li a:hover::after,
.nav-links li.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* =========================================================
   語言選擇器
   ========================================================= */
.lang-switch {
    position: relative;
    flex: 0 0 auto;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid rgba(15, 50, 114, 0.35);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.75);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s;
    white-space: nowrap;
}

.lang-btn:hover,
.lang-switch.open .lang-btn {
    background-color: #fff;
    border-color: var(--primary-color);
}

.lang-btn svg {
    flex: 0 0 auto;
}

/* 下拉選單（默認隱藏） */
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    min-width: 120px;
    padding: 6px 0;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 20;
}

.lang-switch.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu li a {
    display: block;
    padding: 9px 16px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.lang-menu li a:hover {
    background-color: rgba(63, 123, 189, 0.12);
}

/* 當前語言高亮 */
.lang-menu li a.active {
    font-weight: bold;
    color: var(--accent-color);
}

/* 電腦版語言選擇：位於導航鏈接右側 */
.desktop-lang {
    margin-left: 30px;
}

.desktop-lang .lang-menu {
    right: 0;
    left: auto;
}

/* 手機版語言選擇：位於頂部左側 */
.mobile-lang {
    display: none;
}

/* 三横线菜单按钮（桌面版隱藏，手機版顯示） */
.nav-toggle {
    display: none;
    width: 42px;
    height: 38px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background-color: var(--primary-color);
    transition: transform 0.3s, opacity 0.3s;
}

/* 展開時三横變成叉 */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 头部主体内容 */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.hero-text {
    flex: 1;
    max-width: 500px;
    margin-top: -50px;
}

.hero-text h2 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    transform: scale(1.1);
}

.cert-icons {
    position: absolute;
    bottom: 30px;
    left: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.cert-icons span {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

/* 通用区块标题 */
.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #d1a863;
    margin: 10px auto 0;
}

/* ===== 区块标题出入场动画（滚动进入/离开视口时触发） ===== */
/* 未进入视口时的初始状态；进入后 .in-view 淡入上移，离开后淡出下移回原态 */
.section-title.anim-title {
    opacity: 0;
    transform: translateX(-50%) translate3d(0, 28px, 0);
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.section-title.anim-title.in-view {
    opacity: 1;
    transform: translateX(-50%) translate3d(0, 0, 0);
}

/* 下划线：入场时延迟展开，出场时立即收起 */
.section-title.anim-title::after {
    opacity: 0;
    transform: scaleX(0);
    transition:
        opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.section-title.anim-title.in-view::after {
    opacity: 1;
    transform: scaleX(1);
    transition-delay: 0.2s;
}

/* 关于我们标题居左（left:0，不做水平居中） */
.section-title.anim-title.title-left {
    left: 0;
    transform: translate3d(0, 28px, 0);
}

.section-title.anim-title.title-left.in-view {
    transform: translate3d(0, 0, 0);
}

/* 尊重系统的“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
    .section-title.anim-title,
    .section-title.anim-title.in-view {
        opacity: 1;
        transform: translateX(-50%);
        transition: none;
    }
    .section-title.anim-title.title-left {
        transform: none;
    }
    .section-title.anim-title::after,
    .section-title.anim-title.in-view::after {
        opacity: 1;
        transform: scaleX(1);
        transition: none;
    }
}

/* ===== 内容出入场动画（段落/按钮/图片/卡片，滚动触发） ===== */
.anim-item {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.anim-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 产品卡片：保留 hover 上浮，附带 box-shadow 过渡 */
.product-card.anim-item {
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.3s ease;
}

.product-card.anim-item.in-view:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 按钮：保留 hover 颜色过渡 */
.btn-outline.anim-item {
    transition:
        opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
        background-color 0.3s ease, color 0.3s ease;
}

/* 产品卡片依次错开出现（入场延迟，出场即时） */
.product-grid .product-card.anim-item.in-view:nth-child(2) {
    transition-delay: 0.15s;
}
.product-grid .product-card.anim-item.in-view:nth-child(3) {
    transition-delay: 0.3s;
}

/* 尊重系统的“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
    .anim-item,
    .anim-item.in-view {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .product-card.anim-item.in-view:hover {
        transform: translateY(-5px);
    }
}

/* 关于我们 */
#about {
    padding: 80px 0;
    background-color: #fff;
    background: url(../images/aboutus-bg.webp);
}

.about-content {
    display: flex;
    gap: 50px;
    /*水平居中 align-items: center;*/
    padding: 0px;
    margin: 0px;
}

/* 修改：视频容器样式 */
.about-video {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    background: url(../images/office.webp);
    background-size: cover;
    width: 600px;
    height: 452px;
    margin-top: 6px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 16px;
    text-align: justify;
}

.btn-outline {
    display: inline-block;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 组织架构 */
#structure {
    padding: 80px 0;
    background-color: #f2f2f4;
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0px;
}

/* picture 為 img 的包裝層，需去掉自身樣式以免影響排版 */
.org-chart picture {
    display: block;
    max-width: 100%;
}

.org-chart img {
    display: block;
    max-width: 100%;
    height: auto;
}

.org-top::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    width: 2px;
    height: 40px;
    background-color: #ccc;
}

.org-middle-wrapper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
    margin-bottom: 40px;
}

.org-middle-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background-color: #ccc;
}

.org-card {
    background: white;
    width: 30%;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

.org-card::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    width: 2px;
    height: 40px;
    background-color: #ccc;
}

.org-card h5 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.org-card .icon-placeholder {
    height: 60px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.org-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 5px;
}

.org-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.org-bottom span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.org-bottom span::after {
    content: '→';
    color: #d1a863;
    font-weight: bold;
}
.org-bottom span:last-child::after {
    content: '';
}

/* 产品展示 */
#products {
    padding: 80px 0;
    background-color: #fff;
    /* 背景图固定，不随区块滚动 */
    background-image: url('../images/product-bg.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

/* 移动端浏览器对 background-attachment: fixed 支持不佳，改为普通滚动 */
@media (max-width: 1199px) {
    #products {
        background-attachment: scroll;
    }
}

.product-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    flex: 2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    margin-bottom: 15px;
}

.product-features {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: #5bbcc2;
    padding: 8px 20px;
    border-radius: 20px;
}
.product-features span {
    color: white;
    font-size: 12px;
}

.product-name {
    font-size: 16px;
    color: var(--text-color);
    text-align: center;
    padding-bottom: 10px;
}

.btn-center {
    text-align: center;
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 0px;
    position: relative;
    background: url(../images/foot.webp) no-repeat center #0f3272;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px 40px 40px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: solid 1px #ccc;
}

.footer-logo .logo-text h1,
.footer-logo .logo-text p {
    color: white;
}

.footer-info p {
    font-size: 16px;
    opacity: 0.9;
}

.footer-qrcode {
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    background-color: white;
    padding: 0px;
    border-radius: 0px;
    margin-bottom: 10px;
}

.footer-qrcode p {
    font-size: 14px;
}

.footer-bottom {
    background-color: #07152e;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    color: #888;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 40px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background-color 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent-color);
}

.back-to-top-icon {
    display: block;
    width: 20px;
    height: 20px;
    color: #fff;          /* 跟随按钮颜色 */
    transition: transform 0.3s;
}

.back-to-top:hover .back-to-top-icon {
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .back-to-top {
        right: 15px;
        bottom: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* =========================================================
   手机版：视口宽度小于 1200px 时启用
   ========================================================= */
@media (max-width: 1199px) {
    /* ---------- 顶部导航 ---------- */
    .top-nav {
        padding: 12px 0;
    }

    .footer-qrcode {
        display: none;
    }

    .nav-content {
        position: relative;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        padding: 0 16px;
    }

    /* Logo 絕對定位置中，與三橫按鈕（靠右）不互相擠壓 */
    .logo-area {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: calc(100% - 220px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-icon {
        /* 元素為空 div，必須給固定寬度，否則 width:auto 會塌陷成 0 而看不到圖 */
        width: 289px;
        max-width: 100%;
        height: 44px;
        /* 手机版使用专用的紧凑 logo */
        background-image: url(../images/mobile-logo.webp);
    }

    /* 手機版語言選擇：置於頂部左側 */
    .mobile-lang {
        display: block;
        position: relative;
        z-index: 2;
        margin-right: auto;
    }

    /* 下拉選單靠左對齊，避免超出螢幕 */
    .mobile-lang .lang-menu {
        left: 0;
        right: auto;
        min-width: 112px;
    }

    .mobile-lang .lang-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* 電腦版語言選擇在手機版隱藏 */
    .desktop-lang {
        display: none;
    }

    /* 三横菜单按钮：置於頂部右側 */
    .nav-toggle {
        display: flex;
        flex: 0 0 auto;
        margin-left: auto;
        position: relative;
        z-index: 2;
    }

    /* 選單預設收起，點擊三横才展開 */
    .nav-links {
        position: absolute;
        top: 100%;
        right: 12px;
        left: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 0;
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
        /* 隱藏並可展開 */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links li a {
        display: block;
        font-size: 15px;
        padding: 11px 12px;
    }

    /* 收起時隱藏下劃線 */
    .nav-links li a::after {
        display: none;
    }

    .nav-links li a:hover::after,
    .nav-links li.active a::after {
        display: block;
    }

    /* ---------- Banner ---------- */
    /* 手机版 banner 图完整显示：header 高度跟隨圖片比例，背景用 contain 不裁切 */
    header {
        height: auto;
        aspect-ratio: 900 / 988;
        min-height: 480px;
    }

    /* 手机版使用专用的竖版 banner 图 */
    .banner-slide:nth-child(1) {
        background-image: url('../images/mobile-banner1.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .banner-slide:nth-child(2) {
        background-image: url('../images/mobile-banner2.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .banner-content {
        display: flex;
        flex-direction: column;
        /* 文字與按鈕水平居中 */
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        /* 頂部間距：避開導航(約99px)並留少量空隙 */
        padding: 90px 6% 24px;
    }

    .banner-content h2,
    .banner-content p,
    .banner-content .btn-primary {
        position: static;
        left: auto;
        right: auto;
        top: auto;
    }

    .banner-content h2 {
        font-size: 30px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .banner-content p {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 18px;
    }

    .banner-content .btn-primary {
        font-size: 14px;
        padding: 0.7em 2em;
    }

    .banner-arrow {
        display: none;
    }

    .banner-dots {
        bottom: 16px;
    }

    /* ---------- 產品展示：電腦版與手機版切換 ---------- */
    .container-pc {
        display: none;      /* 手機端隱藏電腦版容器 */
    }

    .container-mobile {
        display: block;     /* 手機端顯示手機版容器 */
    }

    /* ---------- 子公司横幅（手机端排版微调） ---------- */
    .subsidiary-banner {
        font-size: 14px;
        line-height: 1.7;
        padding: 16px 0;
        text-align: center;
    }

    /* ---------- 区块通用 ---------- */
    #about,
    #structure,
    #products {
        padding: 50px 0;
    }

    .container {
        padding: 0 20px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 28px;
    }

    /* ---------- 关于我们：上下堆叠 ---------- */
    .about-content {
        flex-direction: column;
        gap: 28px;
    }

    .about-video {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        margin-top: 0;
    }

    .about-text p {
        font-size: 15px;
        line-height: 1.8;
        margin-bottom: 14px;
    }

    .btn-outline {
        padding: 9px 24px;
        font-size: 13px;
    }

    /* ---------- 组织架构 ---------- */
    .org-chart {
        width: 100%;
    }

    .org-chart img {
        max-width: 100%;
        height: auto;
    }

    /* ---------- 产品展示 ---------- */
    .product-grid {
        flex-direction: column;
        gap: 24px;
        margin-bottom: 30px;
    }

    .product-card {
        width: 100%;
    }

    .product-card img {
        max-width: 100%;
        height: auto;
    }

    .product-name {
        font-size: 15px;
    }

    /* ---------- 页脚 ---------- */
    .footer-content {
        flex-direction: column;
        gap: 28px;
        padding: 32px 10px;
        text-align: center;
    }

    .footer-logo {
        flex-direction: column;
        gap: 8px;
        padding-bottom: 16px;
        width: 100%;
    }

    .logo-icon-foot {
        width: 100%;
        max-width: 320px;
        height: 44px;
    }

    .footer-info {
        align-items: center;
        gap: 10px;
    }

    .footer-info p {
        font-size: 14px;
    }

    .footer-qrcode img {
        width: 110px;
        height: 110px;
    }

    .footer-bottom {
        font-size: 12px;
        padding: 12px 16px;
    }
}

/* ---------- 平板版：660px ~ 1199px，產品卡片分兩列 ---------- */
@media (min-width: 660px) and (max-width: 1199px) {
    .product-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
        margin-bottom: 30px;
    }

    /* 每張卡片佔一列的一半寬度 */
    .product-card {
        flex: 0 0 calc(50% - 12px);
        width: auto;
        max-width: calc(50% - 12px);
    }

    .product-card img {
        max-width: 100%;
        height: auto;
    }

    .product-name {
        font-size: 15px;
    }
}

/* ---------- 窄屏版：1070px 以下，子公司橫幅逐行向上循環滾動 ---------- */
@media (max-width: 1070px) {
    .subsidiary-banner {
        padding: 0;
        overflow: hidden;
        display: block;
        align-items: center;
        justify-content: center;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .subsidiary-banner-width {
        width: 90%;
        max-width: 90%;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0 12px;
        text-align: center;
        box-sizing: border-box;
    }
}

/* ---------- 超窄屏（手机）进一步微调 ---------- */
@media (max-width: 480px) {
    .nav-links {
        gap: 8px 16px;
    }

    .nav-links li a {
        font-size: 14px;
    }

    /* 超窄屏：語言按鈕更緊湊，避免與居中 Logo 擠壓 */
    .mobile-lang .lang-btn {
        padding: 5px 8px;
        font-size: 12px;
        gap: 4px;
    }

    .mobile-lang .lang-btn svg {
        width: 15px;
        height: 15px;
    }

    .logo-area {
        max-width: calc(100% - 190px);
    }

    .logo-icon {
        width: 220px;
    }

    .banner-content h2 {
        font-size: 22px;
    }

    .banner-content p {
        font-size: 13px;
    }

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

    .container {
        padding: 0 16px;
    }

    .product-grid {
        gap: 20px;
    }

    .footer-logo .logo-text h1 {
        font-size: 17px;
    }
}

/* =========================================================
   最终覆盖：子公司横幅显示切换（放在文件末尾，确保优先级）
   ========================================================= */

/* PC 端（≥1199px）：显示 PC 横幅，强制隐藏手机横幅及其子元素 */
@media (min-width: 1199px) {
    html body .subsidiary-banner-pc {
        display: block !important;
    }

    html body .subsidiary-banner,
    html body .subsidiary-banner .subsidiary-banner-width,
    html body .subsidiary-banner .subsidiary-track,
    html body .subsidiary-banner .subsidiary-name,
    html body .subsidiary-banner .subsidiary-item {
        display: none !important;
    }
}

/* 手机端（≤1198px）：显示手机横幅，隐藏 PC 横幅 */
@media (max-width: 1198px) {
    html body .subsidiary-banner-pc {
        display: none !important;
    }

    html body .subsidiary-banner {
        display: block !important;
    }
}