/* --- 全局变量与重置 --- */
:root {
    --primary-color: #2c5e2e;
    /* 深绿色，代表茶叶 */
    --secondary-color: #8c7b6c;
    /* 棕色，代表茶汤/木质 */
    --accent-color: #d4a024;
    /* 金色，用于点缀 */
    --bg-light: #f9f7f2;
    /* 米白色背景 */
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- 布局容器 --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 头部导航 --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 5px 15px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 200px;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 16px;
}

/* --- Hero 区域 --- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://picsum.photos/seed/tea-plantation/1600/900') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 56px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 22px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #1e421f;
    transform: translateY(-2px);
}

/* --- 商品展示区 --- */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--text-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-customizable {
    font-size: 11px;
    color: #07C160;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: inline-block;
    padding: 2px 6px;
    background-color: rgba(7, 193, 96, 0.1);
    border-radius: 3px;
    margin-left: 8px;
}

.product-not-customizable {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    display: inline-block;
    padding: 2px 6px;
    background-color: rgba(153, 153, 153, 0.1);
    border-radius: 3px;
    margin-left: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    background-color: var(--secondary-color);
}

.btn-sm:hover {
    background-color: #6d5f53;
}

/* --- 关于我们 --- */
.about-section {
    background-color: #fff;
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
    text-align: justify;
}

.about-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* --- About 轮播图 --- */
.about-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.about-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.about-carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.about-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* About 轮播控制按钮 */
.about-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 5;
    transition: background 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-carousel-control:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.about-prev-btn {
    left: 10px;
}

.about-next-btn {
    right: 10px;
}

/* About 轮播指示点 */
.about-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.about-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.about-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.about-dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 移动端 about 轮播适配 */
@media (max-width: 768px) {
    .about-carousel {
        min-height: 250px;
    }

    .about-carousel-control {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .about-prev-btn {
        left: 5px;
    }

    .about-next-btn {
        right: 5px;
    }

    .about-dot {
        width: 8px;
        height: 8px;
    }
}

/* --- 页脚 --- */
footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 14px;
}

/* --- 商品详情模态框 --- */
.modal {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: #000;
}

.modal-image {
    flex: 1;
    background-color: #f0f0f0;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.modal-tag {
    display: inline-block;
    background-color: #e8f5e9;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 15px;
    width: fit-content;
}

.modal-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.modal-price {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-description {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.8;
}

.modal-specs {
    margin-bottom: 30px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.spec-label {
    color: var(--text-light);
}

.spec-value {
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        height: auto;
        min-height: 60px;
        padding: 10px;
        gap: 10px;
    }

    .mobile-menu-btn {
        display: flex;
        order: 1;
    }

    .logo {
        order: 2;
        font-size: 20px;
    }

    .lang-dropdown {
        order: 3;
    }

    .search-box {
        order: 4;
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }

    .search-box input {
        width: 100%;
        max-width: 300px;
    }

    .nav-links {
        gap: 15px;
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        flex: none;
        width: 100%;
        min-height: 250px;
    }

    .modal-content {
        flex-direction: column;
        height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        height: 250px;
        flex: none;
    }
}

/* --- 轮播图样式 --- */

/* 重置原有的 hero 样式以适应轮播 */
.hero {
    position: relative;
    width: 100%;
    height: 600px;
    /* 增加高度以适应轮播图 */
    overflow: hidden;
    background-color: #000;
    /* 图片加载前的背景色 */
}

/* 轮播图容器 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 单个幻灯片 */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 激活状态的幻灯片 */
.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* 幻灯片背景图 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6);
    /* 压暗背景以突出文字 */
}

/* 幻灯片内容容器 */
.hero-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
}

/* 激活状态的内容 */
.hero-slide.active .hero-content {
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

/* 非激活状态的内容 - 重置为初始状态 */
.hero-slide:not(.active) .hero-content {
    opacity: 0;
    transform: translateY(20px);
    animation: none;
}

/* 文字浮现动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 轮播控制按钮 */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-control:hover {
    background: rgba(255, 255, 255, 0.4);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 轮播指示点 */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* --- 通用区块样式 --- */
.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: #f9f9f9;
}

/* --- 证书展示区 --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.cert-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    padding: 20px;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cert-img-wrapper {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #eee;
}

.cert-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.cert-info h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.cert-info p {
    font-size: 14px;
    color: var(--text-light);
}

/* --- 联系我们区域 --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-item .icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.info-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 94, 46, 0.1);
}

.contact-form .btn {
    width: 100%;
    border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-form {
        width: 100%;
        margin-top: 20px;
    }
    
    /* 移动端专用表单区域 */
    .mobile-only {
        display: block;
        background: var(--bg-light);
        padding: 40px 0;
        margin-top: 0;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-form {
        background: var(--white);
        padding: 25px;
        border-radius: 12px;
        box-shadow: var(--shadow);
        margin-top: 20px;
    }
    
    .mobile-form .form-group {
        margin-bottom: 18px;
    }
    
    .mobile-form input,
    .mobile-form textarea {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 16px;
        font-family: inherit;
        transition: var(--transition);
        background: #f9f9f9;
    }
    
    .mobile-form input:focus,
    .mobile-form textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        background: var(--white);
        box-shadow: 0 0 0 3px rgba(44, 94, 46, 0.1);
    }
    
    .mobile-form .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        background: var(--primary-color);
        border: none;
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .mobile-form .btn:hover {
        background: #1e421f;
        transform: translateY(-2px);
    }
    
    /* 移动端表单标题样式 */
    #mobile-contact-form .section-title {
        margin-bottom: 25px;
    }
    
    #mobile-contact-form .section-title h2 {
        font-size: 24px;
        color: var(--primary-color);
        margin-bottom: 8px;
    }
    
    #mobile-contact-form .section-title p {
        color: var(--text-light);
        font-size: 15px;
    }
    
    
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* --- 业务体系展示区样式 --- */
.section-padding {
    padding: 80px 0;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.business-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    position: relative;
}

.business-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.business-img {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.business-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.business-card:hover .business-img img {
    transform: scale(1.08);
}

.business-info {
    padding: 30px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.business-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.business-info p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 15px;
}

/* 针对不同业务类型的按钮颜色定制 */
.business-card-wholesale .btn {
    background-color: var(--secondary-color);
}

.business-card-wholesale .btn:hover {
    background-color: #6d5f53;
}

.business-card-retail .btn {
    background-color: var(--primary-color);
}

.business-card-retail .btn:hover {
    background-color: #1e421f;
}

.business-card-milktea .btn {
    background-color: var(--accent-color);
    color: #fff;
}

.business-card-milktea .btn:hover {
    background-color: #b88a1b;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .business-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 分页样式 --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 20px;
    padding-bottom: 20px;
}

.pagination-btn {
    padding: 8px 16px;
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-light);
}

.pagination-info span {
    font-weight: bold;
    color: var(--text-dark);
    margin: 0 2px;
}

/* 语言切换按钮 */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    margin-right: 20px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-weight: bold;
    transition: var(--transition);
    padding: 2px 5px;
}

.lang-btn:hover {
    color: var(--primary-color);
}

.lang-btn.active {
    color: var(--primary-color);
    text-decoration: underline;
}



.lang-selected:hover {
    background-color: #f5f5f5;
}


/* 展开状态下箭头旋转 */
.lang-dropdown.open .lang-selected .arrow {
    transform: rotate(180deg);
}


/* 展开状态 */
.lang-dropdown.open .lang-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- 社交媒体样式 --- */
.social-media-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* 针对不同品牌的特定颜色（可选） */
.social-icon:hover.fa-facebook-f {
    background-color: #1877F2;
}

.social-icon:hover.fa-youtube {
    background-color: #FF0000;
}

.social-icon:hover.fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon:hover.fa-weixin {
    background-color: #07C160;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* 响应式断点 */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 20px;
        transition: 0.3s;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
    }

    .contact-info {
        width: 100%;
    }
    .contact-form {
        width: 100%;
        margin-bottom: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
        /* 防止iOS自动缩放 */
        padding: 12px;
    }
}

img {
    max-width: 100%;
    height: auto;
}

/* 移动端特定优化 */
@media (max-width: 768px) {
    .about-carousel-slide img {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
        /* 基础字体调整 */
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .section-padding {
        padding: 40px 15px;
        /* 减少内边距 */
    }

    .container {
        padding: 0 15px;
    }
}

/* 移动端轮播图优化 */
@media (max-width: 768px) {
    /* 轮播图高度调整 */
    .hero {
        height: 100vh !important; /* 移动端占满屏幕 */
        min-height: 300px;
    }
    
    .hero-bg {
        height: 100%;
        object-fit: cover;
    }
    
    /* 隐藏轮播图中的"联系我们"按钮 */
    .hero-content .btn {
        display: none;
    }
    
    /* 字体逐渐浮现特效 - 只在激活的幻灯片中播放 */
    .hero-slide.active .hero-content h1,
    .hero-slide.active .hero-content p {
        animation: fadeInUp 1s ease-out forwards;
        opacity: 0;
        transform: translateY(20px);
    }
    
    .hero-slide.active .hero-content h1 {
        animation-delay: 0.3s;
    }
    
    .hero-slide.active .hero-content p {
        animation-delay: 0.6s;
    }
    
    /* 非激活状态的内容 - 重置为初始状态 */
    .hero-slide:not(.active) .hero-content h1,
    .hero-slide:not(.active) .hero-content p {
        opacity: 0;
        transform: translateY(20px);
        animation: none;
    }
    
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* 移动端内容区域 */
    .hero-content {
        padding: 0 20px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 15px;
        max-width: 100%;
        /* 限制描述文本行数 */
        display: -webkit-box;
        -webkit-line-clamp: 2; /* 限制为2行 */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 移动端按钮样式 */
    .btn-mobile {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 10px;
    }

    /* 轮播控制按钮调整 */
    .slider-control {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    /* 指示点调整 */
    .indicator {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


/* 语言下拉菜单基础样式 */
.lang-dropdown {
    position: relative;
    margin-left: 15px;
    z-index: 1001;
}

.lang-selected {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    color: var(--text-dark);
}

.lang-selected .arrow {
    margin-left: 5px;
    transition: transform 0.3s;
}

/* 移动端按钮样式 */
@media (max-width: 768px) {
    .btn-mobile {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 10px;
    }
    
    /* 轮播控制按钮调整 */
    .slider-control {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* 指示点调整 */
    .indicator {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


/* 语言下拉菜单基础样式 */
.lang-dropdown {
    position: relative;
    margin-left: 15px;
    z-index: 1001;
}

.lang-selected {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    color: var(--text-dark);
}

.lang-selected .arrow {
    margin-left: 5px;
    transition: transform 0.3s;
}

/* 桌面端语言菜单 */
.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 120px;
    padding: 5px 0;
    display: none;
    z-index: 1000;
}

.lang-menu li {
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.lang-menu li:hover {
    background: #f5f5f5;
}

.lang-menu li.active {
    font-weight: bold;
    color: var(--primary-color);
}

/* 桌面端菜单打开状态 */
.lang-dropdown.open .lang-menu {
    display: block;
}

.lang-dropdown.open .arrow {
    transform: rotate(180deg);
}

/* 移动端语言菜单 */
@media (max-width: 768px) {
    .lang-dropdown {
        margin-left: 10px;
    }
    
    .lang-selected {
        padding: 5px;
    }
    
    .lang-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        padding: 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .lang-menu li {
        padding: 15px 10px;
        border-bottom: 1px solid #eee;
    }
    
    /* 移动端菜单打开状态 */
    .lang-dropdown.mobile-open .lang-menu {
        right: 0;
    }
    
    /* 添加遮罩层，使用::after伪元素 */
    .lang-dropdown.mobile-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
}

/* 移动端语言菜单关闭按钮 */
.lang-menu-close {
    display: none;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .lang-menu-close {
        display: block;
    }
    
    .lang-menu-close i {
        margin-right: 5px;
    }
}

/* 移动端固定联系按钮样式 */
.mobile-contact-btn {
    display: none !important; /* 使用!important确保不被覆盖 */
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.mobile-contact-btn:hover {
    background-color: #1e421f;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-contact-btn {
        display: flex !important; /* 使用!important确保在移动端显示 */
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cert-card {
        padding: 10px;
    }

    .cert-img-wrapper {
        height: 120px; /* 原来180太高 */
    }

    .cert-info h4 {
        font-size: 14px;
    }

    .cert-info p {
        font-size: 12px;
        line-height: 1.4;

        /* 最多2行，防止撑高 */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

