/* ===== Google Fonts 导入 ===== */
@import url('https://fonts.googleapis.com/css2?family=Asul:wght@400;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Asul', 'Noto Sans SC', sans-serif;  /* Asul 作为主字体 */
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: #fee6ce;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(210, 180, 140, 0.1) 0px,
        rgba(210, 180, 140, 0.1) 2px,
        rgba(180, 150, 110, 0.1) 2px,
        rgba(180, 150, 110, 0.1) 4px
    );
}

/* 所有标题统一使用 Asul */
h1, h2, h3, h4, h5, h6,
.section-title,
.section-subtitle,
.main-nav a,
.footer-section h4,
.product-name,
.equipment-name,
.department strong {
    font-family: 'Asul', 'Noto Serif SC', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}


/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: #fee6ce; /* 纯木色背景 - 土褐色 */
    background-image: repeating-linear-gradient(
        45deg,
        rgba(210, 180, 140, 0.1) 0px,
        rgba(210, 180, 140, 0.1) 2px,
        rgba(180, 150, 110, 0.1) 2px,
        rgba(180, 150, 110, 0.1) 4px
    );
}

/* Main content - 直接贴在背景上，无边框和背景色 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    position: relative;
    z-index: 2;
}

/* 移除所有内容块的边框和背景色 */
.content-section {
    margin-bottom: 20px;
    padding: 15px 0; /* 只保留上下内边距，移除左右内边距 */
    background-color: transparent; /* 完全透明 */
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.page-section {
    margin-bottom: 20px;
    padding-top: 20px;
    scroll-margin-top: 60px;
}

/* Banner Container - 新增，用于放置两侧品牌图和中间横幅 */
.banner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white; /* 白色背景 */
    padding: 10px 20px;
    border-radius: 15px 15px 0 0;
    margin-bottom: 2px; /* 与导航栏的小间隙 */
}

.brand-left, .brand-right {
    flex: 0 0 150px; /* 固定宽度 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-image {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    /* 无边框 */
}

/* 修改 .banner-slider 样式 */
.banner-slider {
    flex: 1;
    height: 400px;
    overflow: hidden;
    position: relative;
    margin: 0 20px;
}

/* 添加静态图片样式 */
.banner-slider .static-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* .slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: slideAnimation 10s infinite;
}

.slide:nth-child(1) {
    animation-delay: 0s;
}

.slide:nth-child(2) {
    animation-delay: 5s;
}

@keyframes slideAnimation {
    0% { opacity: 0; }
    5% { opacity: 1; }
    45% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 0; }
} */

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation */
.main-nav {
    background-color: #5a3e1b;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0 0 15px 15px;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-item a {
    display: block;
    color: #f5efe6;
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-item a:hover,
.nav-item a.active {
    background-color: #8b6b40;
}

/* Dropdown Styles */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #8b6b40;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 0 0 5px 5px;
}

.dropdown-content a {
    color: #f5efe6;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: 1px solid #a8855a;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #b08d5c;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #f5efe6;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* Secondary Navigation - 已移除，但保留样式以防万一，但不使用 */
.secondary-nav {
    display: none;
}

.secondary-btn {
    display: none;
}

/* Main Content Titles */
/* 只隐藏 Homepage 的 section-title */
#homepage .section-title {
    display: none;
}

/* 其他页面的 section-title 正常显示 */
.page-section:not(#homepage) .section-title {
    display: block; /* 或者恢复原来的显示方式 */
    font-size: 36px;
    color: #5a3e1b;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #8b6b40;
    padding-bottom: 10px;
}

.section-subtitle {
    font-size: 24px;
    color: #5a3e1b;
    margin: 30px 0 20px;
    font-weight: bold;
    border-left: 5px solid #8b6b40;
    padding-left: 15px;
}

/* Alternating Content */
.alternating-content {
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 20px 0;
}

.alternating-content.left-right {
    flex-direction: row;
}

.alternating-content.right-left {
    flex-direction: row-reverse;
}

.text-content, .image-content, .video-content {
    flex: 1;
}

.text-content {
    text-align: left;
}

/* Image and Video Styles - 无边框 */
.image-content, .video-content {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    min-height: 200px;
    padding: 0; /* 移除内边距 */
}

img, video {
    max-width: 100%;
    height: auto;
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    display: block; /* 防止图片下方出现空隙 */
}

/* Product items */
.product-item {
    text-align: center;
    padding: 15px;
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none; /* 移除边框 */
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    margin-bottom: 10px;
    background-color: transparent; /* 移除背景色 */
}

/* Brand items - 已在横幅中使用，此处不再需要额外样式，但保留以防万一 */
.brand-item {
    display: none; /* 隐藏原有的品牌项 */
}

/* Step item images */
.step-item {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
    background-color: transparent; /* 移除背景色 */
    padding: 20px 0; /* 只保留垂直内边距 */
    border: none; /* 移除边框 */
}

.step-item img {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    background-color: transparent; /* 移除背景色 */
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-grid img {
    max-width: 100%;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    background-color: transparent; /* 移除背景色 */
}

.image-with-caption {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent; /* 移除背景色 */
    border: none; /* 移除边框 */
}

.image-with-caption p {
    margin-top: 10px;
    font-weight: bold;
    color: #5a3e1b;
}

/* Banner images */
.banner-image,
.full-width-image {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: scale-down;
    margin: 20px 0;
    background-color: transparent; /* 移除背景色 */
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.product-name {
    font-size: 14px;
    color: #5a3e1b;
    margin-top: 0;
}

.product-text {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.equipment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: transparent;
    padding: 10px;
    transition: transform 0.3s ease;
}

.equipment-item:hover {
    transform: translateY(-5px);
}

.equipment-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;  /* 控制图片和文字的距离 */
}

.equipment-name {
    font-size: 16px;  /* 稍微大一点 */
    color: #5a3e1b;
    margin: 5px 0 0 0;  /* 调整上边距 */
    text-align: center;
    line-height: 1.4;
}

/* Brands Container - 隐藏 */
.brands-container {
    display: none;
}

/* Team Departments */
.team-departments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.department {
    padding: 15px;
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    border-left: 3px solid #b08d5c;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.department strong {
    color: #b08d5c;
    display: block;
    margin-bottom: 5px;
}

/* Programme Items */
.programme-item {
    margin-bottom: 40px;
    padding: 25px 0; /* 只保留垂直内边距 */
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    border: none; /* 移除边框 */
}

.programme-item h3 {
    color: #5a3e1b;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #8b6b40;
    padding-bottom: 10px;
}

/* Contact Section */
.contact-content {
    margin-bottom: 30px;
}

.contact-info {
    background-color: transparent; /* 移除背景色 */
    padding: 0; /* 移除内边距 */
    border: none; /* 移除边框 */
}

.contact-info h3 {
    color: #5a3e1b;
    margin: 20px 0 10px;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    color: #5a3e1b;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #b08d5c;
    border-radius: 4px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #b08d5c;
    color: white;
}

/* Footer */
footer {
    background-color: #5a3e1b;
    color: #f5efe6;
    padding: 40px 0 0;
    margin-top: 60px;
    border-radius: 15px 15px 0 0;
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-section h4 {
    color: #d4b28c;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-links, .sitemap {
    list-style: none;
}

.footer-links li, .sitemap li {
    margin-bottom: 8px;
}

.footer-links a, .sitemap a {
    color: #e8d9c0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover, .sitemap a:hover {
    color: #d4b28c;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 8px;
    border: none;
    border-radius: 4px;
    background-color: #f5efe6;
}

.newsletter-form button {
    padding: 8px;
    background-color: #b08d5c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: #8b6b40;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #3a2a10;
    border-radius: 0 0 15px 15px;
}

.footer-bottom a {
    color: #d4b28c;
    text-decoration: none;
}

/* Text Content Styling */
.text-content {
    line-height: 1.8;
    min-height: 100px;
    padding: 0; /* 移除内边距 */
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
}

.text-content p {
    margin-bottom: 15px;
}

.text-content strong {
    color: #b08d5c;
    font-weight: bold;
}

.text-content .loading {
    color: #8b6b40;
    font-style: italic;
    text-align: center;
    padding: 30px;
    background-color: rgba(245, 239, 230, 0.5); /* 轻微背景以突出文字，但不破坏整体 */
    border-radius: 0;
}

.text-content .error-message {
    color: #a94442;
    padding: 20px;
    border: 1px solid #a94442;
    background-color: rgba(249, 235, 234, 0.5);
    text-align: center;
}

/* Video Player */
video {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    background-color: #000;
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
    padding: 30px;
    text-align: center;
    background-color: rgba(245, 239, 230, 0.5);
    color: #8b6b40;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-slider {
        height: 250px;
    }
    
    .brand-left, .brand-right {
        flex: 0 0 100px;
    }
}

@media (max-width: 768px) {
    .banner-container {
        flex-direction: column;
        background-color: white;
        padding: 0;
        margin-bottom: 0;
        min-height: 0;
    }
    
    .banner-slider {
        width: 100%;
        margin: 0;
        height: 200px;
        order: -1;
    }
    
    .banner-slider img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .brand-left, .brand-right {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: none !important;
        /* width: 100%;
        flex: none;
        margin: 5px 0; */
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item a {
        padding: 10px 20px;
    }
    
    /* 移动端下拉菜单调整 */
    .dropdown-content {
        position: static;
        display: none;
        background-color: #7a5a30;
        box-shadow: none;
    }
    
    .dropdown:hover .dropdown-content {
        display: none; /* 移动端hover不好用，改为点击？这里保持原样，后续可用JS改进 */
    }
    
    .nav-item.active .dropdown-content {
        display: block;
    }
    
    .alternating-content {
        flex-direction: column !important;
    }
    
    .alternating-content.left-right,
    .alternating-content.right-left {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .step-item {
        flex-direction: column;
    }
    
    .step-item img {
        max-width: 100%;
        max-height: 250px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .text-content {
        font-size: 15px;
    }
    
    .image-content,
    .video-content {
        width: 100%;
    }
    
    .image-content img,
    .video-content video {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .banner-slider {
        height: 150px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .image-content img,
    .video-content video {
        max-height: 250px;
    }
}

/* Two-thirds and One-third splits */
.two-thirds {
    flex: 2;
}

.one-third {
    flex: 1;
}








/* Steps Grid Layout - 两行三列 */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; /* 可以适当减小列间距 */
    margin: 0 0; /* 减小上下外边距 */
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: transparent;
    padding: 10px 10px 5px 10px; /* 上:10px 右:10px 下:5px 左:10px - 减少内边距 */
    border: none;
    margin-bottom: 0;
}

.step-item img {
    max-width: 100%;
    max-height: 200px; /* 可以适当减小图片高度 */
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 5px; /* 图片下方的间距从15px减小到5px */
    background-color: transparent;
}

.step-item .text-content {
    width: 100%;
    padding: 0;
    text-align: center;
    margin-top: 0; /* 确保文字上方没有额外间距 */
}

.step-item .text-content p {
    margin-bottom: 5px; /* 段落之间的间距从10px减小到5px */
    margin-top: 0; /* 段落上方没有间距 */
    font-size: 14px;
    line-height: 1.4; /* 略微减小行高 */
}

/* 如果需要进一步调整第一个段落的上方间距 */
.step-item .text-content p:first-child {
    margin-top: 0;
}

/* 最后一个段落的下方间距 */
.step-item .text-content p:last-child {
    margin-bottom: 0;
}

/* 隐藏原有的交替样式，但保留以备后用 */
.step-item.alternating,
.step-item.alternating.reverse {
    flex-direction: column;
}

/* 响应式设计：在平板和手机上调整 */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* 移动端减小间距 */
    }
    
    .step-item {
        padding: 8px 8px 3px 8px; /* 移动端进一步减小内边距 */
    }
    
    .step-item img {
        max-height: 180px;
        margin-bottom: 3px; /* 移动端进一步减小间距 */
    }
}

@media (max-width: 480px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 20px; /* 单列时可以稍微大一点 */
    }
    
    .step-item img {
        max-height: 200px;
        margin-bottom: 5px;
    }
    
    .step-item {
        padding: 10px 10px 5px 10px;
    }
}

/* ===== 响应式设计 - 手机和平板适配 ===== */

/* 平板设备 (768px 及以下) */
@media (max-width: 768px) {
    .equipment-grid {
        gap: 20px;  /* 减小列间距 */
        margin: 15px 0;
    }
    
    .equipment-item {
        padding: 10px;
    }
    
    .equipment-item img {
        max-height: 200px;  /* 限制图片最大高度 */
        margin-bottom: 10px;
    }
    
    .equipment-name {
        font-size: 15px;  /* 稍微减小字体 */
    }
}

/* 手机设备 (480px 及以下) - 改为单列显示 */
@media (max-width: 480px) {
    .equipment-grid {
        grid-template-columns: 1fr;  /* 改为单列 */
        gap: 25px;  /* 增加列间距让每个项目更清晰 */
        margin: 10px 0;
    }
    
    .equipment-item {
        padding: 15px 10px;
        border-bottom: 1px solid rgba(139, 107, 64, 0.2);  /* 添加浅色分隔线 */
    }
    
    /* 最后一个项目不要底部边框 */
    .equipment-item:last-child {
        border-bottom: none;
    }
    
    .equipment-item img {
        max-height: 180px;  /* 手机上图片稍小 */
        margin-bottom: 12px;
    }
    
    .equipment-name {
        font-size: 16px;  /* 保持可读性 */
    }
}

/* 超小手机 (360px 及以下) */
@media (max-width: 360px) {
    .equipment-grid {
        gap: 20px;
    }
    
    .equipment-item {
        padding: 10px 5px;
    }
    
    .equipment-item img {
        max-height: 150px;
        margin-bottom: 8px;
    }
    
    .equipment-name {
        font-size: 14px;
    }
}

/* ===== Tools 响应式设计 ===== */
@media (max-width: 768px) {
    .tools-grid {
        gap: 20px;
        margin: 15px 0;
    }
    
    .tools-item {
        padding: 10px;
    }
    
    .tools-item img {
        max-height: 200px;
        margin-bottom: 10px;
    }
    
    .tools-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;  /* 手机单列 */
        gap: 25px;
        margin: 10px 0;
    }
    
    .tools-item {
        padding: 15px 10px;
        border-bottom: 1px solid rgba(139, 107, 64, 0.2);
    }
    
    .tools-item:last-child {
        border-bottom: none;
    }
    
    .tools-item img {
        max-height: 180px;
        margin-bottom: 12px;
    }
    
    .tools-name {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .tools-grid {
        gap: 20px;
    }
    
    .tools-item {
        padding: 10px 5px;
    }
    
    .tools-item img {
        max-height: 150px;
        margin-bottom: 8px;
    }
    
    .tools-name {
        font-size: 14px;
    }
}





/* ===== Sidebar Navigation ===== */
.sidebar-toggle {
    position: fixed;  /* 保持 fixed 定位，始终固定在视口左上角 */
    top: 20px;  /* 距离顶部20px */
    left: 20px;  /* 距离左侧20px */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f5efe6;
    color:#5a3e1b;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    opacity: 1;  /* 始终可见 */
    visibility: visible;  /* 始终可见 */
}

.sidebar-toggle:hover {
    background-color: #8b6b40;
    transform: scale(1.1);
}

/* .sidebar-toggle.hidden {
    opacity: 0;
    pointer-events: none;
} */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background-color: #f5efe6;
    z-index: 1002;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #5a3e1b;
    color: #f5efe6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.sidebar-close {
    background: none;
    border: none;
    color: #f5efe6;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.sidebar-close:hover {
    transform: rotate(90deg);
}

.sidebar-content {
    padding: 20px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 10px;
}

.sidebar-link {
    display: block;
    padding: 8px 12px;
    color: #5a3e1b;
    text-decoration: none;
    font-size: 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    background-color: #e8d9c0;
    color: #5a3e1b;
    padding-left: 20px;
}

.sidebar-link.active {
    background-color: #b08d5c;
    color: white;
}

.sidebar-submenu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    border-left: 2px solid #e8d9c0;
}

.sidebar-submenu .sidebar-link {
    font-size: 14px;
    padding: 6px 12px;
    color: #666;
}

.sidebar-submenu .sidebar-link:hover {
    color: #5a3e1b;
    background-color: transparent;
    padding-left: 20px;
}

.sidebar-submenu .sidebar-link.active {
    background-color: transparent;
    color: #5a3e1b;
    font-weight: bold;
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #5a3e1b;
    color: #f5efe6;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    font-size: 24px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #8b6b40;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar-toggle {
        top: 70px;
        left: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .sidebar {
        width: 280px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .sidebar-toggle {
        top: 60px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}





/* ===== 移动端图片防变形处理 ===== */
@media (max-width: 768px) {
    /* 所有图片通用规则 */
    img {
        width: 100% !important;  /* 强制宽度自适应容器 */
        height: auto !important;  /* 高度自动，保持原始比例 */
        max-width: 100% !important;  /* 不超过容器宽度 */
        max-height: none !important;  /* 移除最大高度限制 */
        object-fit: contain !important;  /* 包含模式，保持比例 */
        aspect-ratio: auto !important;  /* 自动计算宽高比 */
    }
    
    /* 特定容器的图片处理 */
    .product-item img,
    .equipment-item img,
    .step-item img,
    .image-content img,
    .video-content img,
    .image-grid img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: 250px;  /* 可选：限制最大高度，避免图片太大 */
    }
    
    .brand-left,
    .brand-right {
        display: none !important;
    }
    .banner-slider {
        position: relative;
    }

}

/* 超小屏幕额外处理 */
@media (max-width: 480px) {
    .product-item img,
    .equipment-item img,
    .step-item img {
        max-height: 200px;  /* 更小的屏幕上进一步限制高度 */
    }
    
    .banner-slider img {
        max-height: 150px;
    }
}

/* ===== 社交媒体按钮样式 ===== */
.social-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #8b6b40;
    color: #f5efe6;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.social-link i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.social-link:hover {
    background-color: #5a3e1b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link:hover i {
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .social-links {
        gap: 15px;
    }
    
    .social-link {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .social-link i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-link {
        justify-content: center;
    }
}