/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    position: relative;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.logo-img {
    max-height: 50px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-img {
        max-height: 40px;
        max-width: 140px;
    }
    
    .logo-text {
        font-size: 18px;
    }
}

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

.nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #007bff;
}

/* 搜索框样式 */
.header-search {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 4px 4px 4px 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.header-search-form:focus-within {
    background: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.header-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 180px;
    color: #333;
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-btn {
    border: none;
    background: #007bff;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.header-search-btn:hover {
    background: #0056b3;
}

/* 移动端搜索框 - 默认隐藏，带动画效果 */
.mobile-search {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 15px;
    background: #f8f9fa;
    border-bottom: 0 solid #eee;
    display: none;
}

.mobile-search.active {
    display: block;
    max-height: 60px;
    opacity: 1;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 4px 4px 4px 15px;
    border: 1px solid #ddd;
}

.mobile-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    flex: 1;
    color: #333;
}

.mobile-search-btn {
    border: none;
    background: #007bff;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端搜索切换按钮 */
.mobile-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    padding: 0;
    width: 44px;
    height: 44px;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
}

.mobile-search-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.mobile-search-toggle:active {
    transform: translateY(0);
}

/* 当前页面指示 - 底部边框样式 */
.nav a.active {
    color: #007bff;
    position: relative;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #007bff;
    border-radius: 2px;
}

/* 语言切换按钮 */
.nav-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #007bff;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-lang-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* 移动端导航操作区 - 默认隐藏 */
.nav-actions {
    display: none;
}

/* 移动端专用导航 - 默认隐藏 */
.mobile-nav {
    display: none;
}

/* 轮播图样式 */
.banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.banner-slider {
    position: relative;
    width: 100%;
}

/* 电脑端和移动端轮播图默认显示规则 */
.banner-desktop {
    display: block;
}

.banner-mobile {
    display: none;
}

.banner-slides-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.banner-slide {
    position: relative;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: none;
}

.banner-slide.active {
    opacity: 1;
    z-index: 2;
    display: block;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* 轮播图文字动画 - 从右侧滑到左侧1/8处 */
.banner-text {
    position: absolute;
    top: 50%;
    left: 12.5%; /* 左侧1/8处 */
    transform: translateY(-50%);
    z-index: 10;
    max-width: 75%; /* 增加宽度，让文字更晚换行 */
}

/* 轮播图文字容器 */
.banner-slide .banner-text-content {
    background: transparent;
    color: #fff;
    padding: 0;
    font-weight: bold;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    transform: translateX(100px);
    transition: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8), 0 4px 20px rgba(0,0,0,0.5);
}

/* 确保CKEditor设置的字体大小生效 */
.banner-slide .banner-text-content span {
    font-size: inherit;
}

/* 有内联字体大小的span保持其设置 */
.banner-slide .banner-text-content span[style*="font-size"] {
    font-size: revert;
}

.banner-slide.active .banner-text-content {
    animation: bannerTextSlide 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes bannerTextSlide {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 轮播指示器 */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0069d9;
}

/* 产品样式 */
.products-section {
    padding: 80px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #333;
}

.section-title p {
    font-size: 16px;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 首页产品小卡片布局 */
.products-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.product-card {
    display: block;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
}

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

.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 正方形 */
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 48px;
}

.product-card-title {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 64px;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 20px;
}

.product-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.product-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.product-link:hover {
    text-decoration: underline;
}

/* 新闻样式 */
.news-section {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.news-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* 首页产品中心 - 3-2-3交替布局 */
.homepage-products {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.homepage-products-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.product-row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 3列布局 */
.product-row.row-3 .homepage-product-item {
    flex: 0 0 calc(33.333% - 14px);
    max-width: 400px;
}

/* 2列布局 */
.product-row.row-2 .homepage-product-item {
    flex: 0 0 calc(50% - 10px);
    max-width: 600px;
}

.homepage-product-item {
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.homepage-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.homepage-product-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.homepage-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.homepage-product-item:hover .homepage-product-image img {
    transform: scale(1.05);
}

/* 产品标题默认不显示，但保留在HTML中 */
.homepage-product-overlay {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

/* 更多产品横幅 */
.more-products-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s;
}

.more-products-banner:hover {
    transform: translateY(-3px);
}

.more-products-image {
    width: 100%;
    height: auto;
    display: block;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .product-row.row-3 .homepage-product-item,
    .product-row.row-2 .homepage-product-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 576px) {
    .product-row {
        flex-direction: column;
    }

    .product-row.row-3 .homepage-product-item,
    .product-row.row-2 .homepage-product-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .homepage-product-overlay h3 {
        font-size: 16px;
    }

    .more-products-content h3 {
        font-size: 28px;
    }

    .more-products-content p {
        font-size: 16px;
    }
}

/* 关于我们样式 */
.about-section {
    padding: 80px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

/* 首页关于我们左右两栏布局 */
.about-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.about-video {
    width: 100%;
}

.intro-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.about-two-columns .about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-two-columns .about-text p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: #555;
}

.about-two-columns .about-text .btn {
    margin-top: 20px;
    align-self: flex-start;
}

@media (max-width: 992px) {
    .about-two-columns {
        grid-template-columns: 1fr;
    }
    
    .intro-video {
        max-height: 400px;
    }
}

/* 合作伙伴样式 */
.partners-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: center;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.partner-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 合作伙伴移动端适配 */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .partner-item {
        padding: 10px;
        min-width: 0; /* 允许压缩 */
    }
    
    .partner-item img {
        max-width: 100%;
        max-height: 60px; /* 限制图片高度 */
        object-fit: contain;
    }
}

/* 更小的屏幕也保持2列 */
@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .partner-item {
        padding: 8px;
    }
    
    .partner-item img {
        max-height: 50px;
    }
}

/* 富文本公司介绍 */
.about-content-rich {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 移动端移除立体容器效果，增大空间利用率 */
@media (max-width: 768px) {
    .about-content-rich {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background-color: transparent;
    }
    
    /* 移动端表格文字缩小 */
    .rich-content table {
        font-size: 13px;
    }
    
    .rich-content table th,
    .rich-content table td {
        padding: 6px 8px;
    }
}

.about-content-rich .rich-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.about-content-rich .rich-content p {
    margin-bottom: 16px;
}

.about-content-rich .rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

/* 富文本图片布局 - JS增强方案 */

/* 默认：所有图片占满100%宽度 */
.about-content-rich .rich-content figure.image {
    display: block;
    width: 100%;
    margin: 20px 0;
}

.about-content-rich .rich-content figure.image img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* 单张图片 - 由JS添加class */
.about-content-rich .rich-content figure.image-single {
    display: block;
    width: 100%;
}

/* 两张图片并排 */
.about-content-rich .rich-content figure.image-pair {
    display: inline-block;
    width: calc(50% - 10px);
    vertical-align: top;
    margin: 10px 0;
}

.about-content-rich .rich-content figure.image-pair-first {
    margin-right: 20px;
}

/* 三张图片并排 */
.about-content-rich .rich-content figure.image-triple {
    display: inline-block;
    width: calc(33.333% - 14px);
    vertical-align: top;
    margin: 10px 20px 10px 0;
}

.about-content-rich .rich-content figure.image-triple-last {
    margin-right: 0;
}

/* 产品详情页图片布局 */
.product-detail-content-full .rich-content figure.image {
    display: block;
    width: 100%;
    margin: 20px auto;
    text-align: center;
}

.product-detail-content-full .rich-content figure.image img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.product-detail-content-full .rich-content figure.image-single {
    display: block;
    width: 100%;
}

.product-detail-content-full .rich-content figure.image-pair {
    display: inline-block;
    width: calc(50% - 10px);
    vertical-align: top;
    margin: 10px 0;
}

.product-detail-content-full .rich-content figure.image-pair-first {
    margin-right: 20px;
}

.product-detail-content-full .rich-content figure.image-triple {
    display: inline-block;
    width: calc(33.333% - 14px);
    vertical-align: top;
    margin: 10px 20px 10px 0;
}

.product-detail-content-full .rich-content figure.image-triple-last {
    margin-right: 0;
}

/* 手机端 - 所有图片都占满宽度 */
@media (max-width: 768px) {
    .about-content-rich .rich-content figure.image,
    .about-content-rich .rich-content figure.image-single,
    .about-content-rich .rich-content figure.image-pair,
    .about-content-rich .rich-content figure.image-pair-first,
    .about-content-rich .rich-content figure.image-triple,
    .about-content-rich .rich-content figure.image-triple-last,
    .product-detail-content-full .rich-content figure.image,
    .product-detail-content-full .rich-content figure.image-single,
    .product-detail-content-full .rich-content figure.image-pair,
    .product-detail-content-full .rich-content figure.image-pair-first,
    .product-detail-content-full .rich-content figure.image-triple,
    .product-detail-content-full .rich-content figure.image-triple-last {
        display: block;
        width: 100%;
        margin: 15px 0;
    }
}

.about-content-rich .rich-content h1,
.about-content-rich .rich-content h2,
.about-content-rich .rich-content h3,
.about-content-rich .rich-content h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    color: #222;
}

.about-content-rich .rich-content ul,
.about-content-rich .rich-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.about-content-rich .rich-content li {
    margin-bottom: 8px;
}

.about-content-rich .rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.about-content-rich .rich-content table th,
.about-content-rich .rich-content table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.about-content-rich .rich-content table th:not([style*="background-color"]) {
    background-color: #f5f5f5;
    font-weight: 600;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 联系我们样式 */
.contact-section {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-left {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-map {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-map #tencent-map {
    display: block;
}

.contact-info {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    color: #007bff;
    margin-right: 15px;
    margin-top: 5px;
}

.contact-item div h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.contact-item div p {
    font-size: 14px;
    color: #666;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-column p {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #007bff;
}

/* Footer两栏布局 */
.footer-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.footer-two-columns .footer-column {
    min-width: auto;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

.footer-beian {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-beian a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-beian a:hover {
    color: #007bff;
}

.beian-separator {
    color: #666;
    font-size: 13px;
}

/* 移动端tabbar样式 */
.tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.tabbar-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.tabbar-item.active {
    color: #007bff;
}

.tabbar-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.tabbar-item span {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 头部样式 - 移动端布局 */
    .header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        position: relative;
    }

    /* 左侧LOGO */
    .header .logo {
        flex: 0 0 auto;
    }

    /* 隐藏桌面端导航 */
    #mainNav {
        display: none;
    }

    /* 显示移动端按钮组 */
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* 显示移动端搜索切换按钮 */
    .mobile-search-toggle {
        display: flex !important;
    }

    /* 显示移动端导航 */
    .mobile-nav {
        display: none;
    }

    .mobile-nav.active {
        display: flex;
    }

    /* 菜单按钮 */
    .header .menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        border: none;
        border-radius: 8px;
        font-size: 18px;
        cursor: pointer;
        color: #fff;
        padding: 0;
        width: 44px;
        height: 44px;
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        transition: all 0.3s ease;
    }

    .menu-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    }

    .menu-btn:active {
        transform: translateY(0);
    }

    /* 移动端语言按钮 */
    .mobile-lang-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        border-radius: 8px;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
        transition: all 0.3s ease;
    }

    .mobile-lang-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    }

    /* 移动端导航菜单 - 立体弹出窗口 */
    .nav {
        position: fixed;
        top: 115px; /* 调整顶部位置，为搜索框留出空间 */
        left: 20px;
        right: 20px;
        background-color: #fff;
        border-radius: 12px;
        flex-direction: column;
        padding: 10px 0;
        gap: 0;
        display: none;
        z-index: 1001;
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.2),
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav a {
        padding: 16px 20px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
        font-size: 18px;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .nav a i {
        width: 24px;
        text-align: center;
        color: #007bff;
    }

    .nav a.active i {
        color: #fff;
    }

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

    .nav a:active {
        background-color: #f5f5f5;
    }

    /* 当前页面菜单项 - 蓝底白字 */
    .nav a.active {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.2);
    }

    /* 移除移动端弹出菜单中当前页面菜单条的底部蓝线 */
    .nav a.active::after {
        display: none;
    }
    
    /* 轮播图样式 - 移动端切换 */
    .banner-desktop {
        display: none;
    }
    
    .banner-mobile {
        display: block;
    }
    
    .banner-text {
        left: 5%;
        max-width: 90%;
    }
    
    /* 移动端轮播文字 - 默认左上角，用户可通过HTML内联样式完全自定义 */
    .banner-text {
        left: auto;
        right: auto;
        width: auto;
        max-width: none;
    }

    .banner-text-mobile {
        top: 10%;
        left: 5%;
        bottom: auto;
        transform: none;
    }

    .banner-text-mobile .banner-text-content {
        text-align: left;
        white-space: nowrap;
    }
    
    .banner-dots {
        bottom: 10px;
    }
    
    .banner-dot {
        width: 8px;
        height: 8px;
    }
    
    .banner-dot.active {
        width: 20px;
    }
    
    /* 移动端tabbar */
    .tabbar {
        display: block;
    }
    
    /* 调整内容区域，避免被tabbar遮挡 */
    body {
        padding-bottom: 60px;
    }
    
    /* 产品和新闻网格 */
    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* 首页产品小卡片移动端 */
    .products-grid-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .product-card-title {
        padding: 10px;
        font-size: 13px;
    }
    
    /* 关于我们和联系我们 */
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .contact-left {
        gap: 20px;
    }
    
    .contact-map {
        height: 250px;
    }
    
    .contact-info {
        padding: 20px;
    }
    
    /* 页脚 */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    /* Footer两栏布局 - 移动端改为左1/3右2/3 */
    .footer-two-columns {
        grid-template-columns: 1fr 2fr;
        gap: 20px;
    }
    
    /* 搜索框移动端适配 */
    .header-search {
        display: none;
    }
    
    /* 移动端搜索框基础样式 - 默认由max-height控制隐藏 */
    .mobile-search {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 防止页面横向溢出 */
    body {
        overflow-x: hidden;
    }
    
    /* 确保header内的元素不会溢出 */
    .header {
        max-width: 100vw;
        overflow: hidden;
    }
    
    /* 确保TabBar始终显示在最上层 */
    .tabbar {
        display: block;
        z-index: 9999;
    }
}

/* 产品详情页样式 */
.product-detail {
    padding: 50px 0;
    background-color: #fff;
}

.product-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.product-detail-image {
    flex: 1;
    min-width: 300px;
}

.product-detail-image img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-detail-info {
    flex: 1;
    min-width: 300px;
}

.product-detail-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.product-detail-info p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-detail-content-full {
    margin-top: 50px;
}

.product-detail-content-full h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.product-detail-content-full p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 新闻详情页样式 */
.news-detail {
    padding: 50px 0;
    background-color: #fff;
}

.news-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.news-detail-meta {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    color: #999;
    font-size: 14px;
}

.news-detail-meta span {
    margin-right: 20px;
}

.news-detail-image {
    margin-bottom: 30px;
}

.news-detail-image img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-detail-text {
    margin-bottom: 40px;
}

.news-detail-text p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-related {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.news-related h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.news-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.news-related-item {
    flex: 1;
    min-width: 200px;
}

.news-related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.news-related-item h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.news-related-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 后台登录页样式 */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.login-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.login-form .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.login-form .btn {
    width: 100%;
    margin-top: 20px;
}

/* 后台样式 */
.admin-header {
    background-color: #333;
    color: #fff;
    padding: 15px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 20px;
}

.admin-nav {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    width: 200px;
    height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    left: 0;
    overflow-y: auto;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.3s;
}

.admin-nav ul li a:hover {
    background-color: #e9ecef;
}

.admin-nav ul li a.active {
    background-color: #007bff;
    color: #fff;
}

.admin-content {
    margin-left: 200px;
    padding: 30px;
    min-height: calc(100vh - 70px);
    background-color: #f5f5f5;
}

.admin-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.admin-card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
}

/* 表单样式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 响应式后台 */
@media (max-width: 768px) {
    .admin-nav {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* 富文本内容样式 */
.rich-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4,
.rich-content h5,
.rich-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    color: #333;
    font-weight: 600;
}

.rich-content h1 { font-size: 28px; }
.rich-content h2 { font-size: 24px; }
.rich-content h3 { font-size: 20px; }
.rich-content h4 { font-size: 18px; }

.rich-content p {
    margin-bottom: 16px;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: transparent; /* 不设置默认背景色，让 CKEditor 设置生效 */
}

/* CKEditor 4 表格背景色支持 - 保留内联样式 */
.rich-content table[style*="background-color"] {
    /* 不覆盖，保留 CKEditor 设置的表格背景色 */
}

.rich-content table th,
.rich-content table td {
    border: 1px solid #ddd;
    padding: 8px 12px; /* 减少上下padding，让行高更紧凑 */
    text-align: left;
    vertical-align: middle; /* 垂直居中对齐 */
    line-height: 1.4; /* 设置合适的行高 */
}

/* 确保表格单元格内的图片可以正常显示 */
.rich-content table td {
    min-width: 0;
}

/* 表格图片样式优化 */
.rich-content table td img {
    display: block;
    max-width: 100%; /* 限制最大宽度为100%，防止撑大表格 */
    width: auto;
    height: auto;
    margin: 0 auto; /* 水平居中 */
    box-shadow: none; /* 移除阴影，保持表格简洁 */
}

/* 表格行hover效果 - 仅当单元格没有自定义背景色时 */
.rich-content table tr:hover td:not([style*="background-color"]),
.rich-content table tr:hover th:not([style*="background-color"]) {
    background-color: #f5f5f5;
}

/* 确保hover时padding不变 */
.rich-content table tr:hover td,
.rich-content table tr:hover th {
    padding: 8px 12px;
}

/* CKEditor 4 背景色支持 - 保留内联样式设置的背景色 */
.rich-content table td[style*="background-color"],
.rich-content table th[style*="background-color"] {
    /* 不覆盖，保留 CKEditor 设置的背景色 */
}

/* 行背景色支持 - 如果行设置了背景色 */
.rich-content table tr[style*="background-color"] td:not([style*="background-color"]),
.rich-content table tr[style*="background-color"] th:not([style*="background-color"]) {
    /* 行有背景色且单元格没有自定义背景色时，使用透明背景 */
    background-color: transparent;
}

/* 表头默认背景色（仅当没有设置自定义背景色时） */
.rich-content table th:not([style*="background-color"]) {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 当单元格设置了背景色时，hover 效果不应覆盖 */
.rich-content table td[style*="background-color"]:hover,
.rich-content table th[style*="background-color"]:hover {
    /* 保留原背景色，hover不改变 */
}

.rich-content ul,
.rich-content ol {
    margin: 16px 0;
    padding-left: 40px;
}

.rich-content li {
    margin-bottom: 8px;
}

.rich-content strong {
    font-weight: 600;
    color: #333;
}

.rich-content a {
    color: #007bff;
    text-decoration: none;
}

.rich-content a:hover {
    text-decoration: underline;
}

.rich-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 16px;
    margin: 20px 0;
    color: #666;
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 0 4px 4px 0;
}

/* 保留 CKEditor 设置的表格边框 */
.rich-content table[border] {
    border-width: inherit;
    border-style: inherit;
    border-color: inherit;
}

/* 默认表格样式（无边框时） */
.rich-content table:not([border]),
.rich-content table[border="0"] {
    border: none !important;
}

.rich-content table:not([border]) td,
.rich-content table:not([border]) th,
.rich-content table[border="0"] td,
.rich-content table[border="0"] th {
    border: none !important;
}

/* 表格宽度自适应内容 */
.rich-content table[style*="width"] {
    width: inherit !important;
}

/* 产品详情页和工程案例页表格样式 */
.product-detail-content-full .rich-content table,
.case-album-content table {
    width: 100%;
    margin: 20px 0;
    background-color: transparent; /* 不设置默认背景色 */
}

.product-detail-content-full .rich-content table td,
.product-detail-content-full .rich-content table th,
.case-album-content table td,
.case-album-content table th {
    padding: 12px;
    text-align: left;
    vertical-align: top;
    min-width: 0; /* 允许单元格压缩 */
}

/* 支持显式设置宽度的单元格 */
.product-detail-content-full .rich-content table td[width],
.product-detail-content-full .rich-content table th[width],
.case-album-content table td[width],
.case-album-content table th[width] {
    width: attr(width px); /* 使用HTML width属性 */
}

/* 确保表格单元格内的图片可以正常显示 */
.product-detail-content-full .rich-content table td img,
.case-album-content table td img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}

/* 产品详情页表格背景色支持 */
.product-detail-content-full .rich-content table td[style*="background-color"],
.product-detail-content-full .rich-content table th[style*="background-color"] {
    /* 保留 CKEditor 设置的背景色 */
}

.product-detail-content-full .rich-content table th:not([style*="background-color"]) {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 保留 CKEditor 设置的表格样式属性 */
.product-detail-content-full .rich-content table[border],
.case-album-content table[border] {
    border-width: inherit;
    border-style: inherit;
    border-color: inherit;
}

.product-detail-content-full .rich-content table:not([border]),
.product-detail-content-full .rich-content table[border="0"],
.case-album-content table:not([border]),
.case-album-content table[border="0"] {
    border: none !important;
}

.product-detail-content-full .rich-content table:not([border]) td,
.product-detail-content-full .rich-content table:not([border]) th,
.product-detail-content-full .rich-content table[border="0"] td,
.product-detail-content-full .rich-content table[border="0"] th,
.case-album-content table:not([border]) td,
.case-album-content table:not([border]) th,
.case-album-content table[border="0"] td,
.case-album-content table[border="0"] th {
    border: none !important;
}

.product-detail-info .summary {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 产品中心分类展示 */
.products-categories {
    margin: 40px 0;
}

.category-section {
    margin-bottom: 50px;
}

.category-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.subcategory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.subcategory-tab {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.subcategory-tab:hover,
.subcategory-tab.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ==================== 首页工程案例模块 ==================== */

.cases-showcase-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.cases-showcase-grid {
    margin-bottom: 30px;
}

.cases-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.cases-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cases-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.case-showcase-item {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-showcase-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.case-showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.case-showcase-item:hover img {
    transform: scale(1.05);
}

.case-showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
}

.case-showcase-item:hover .case-showcase-overlay {
    opacity: 1;
}

.case-showcase-overlay h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* 更多案例横幅 */
.more-cases-banner {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s;
    margin-top: 30px;
}

.more-cases-banner:hover {
    transform: translateY(-3px);
}

.more-cases-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.more-cases-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 5px;
}

/* 案例预览弹窗 */
.case-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.case-lightbox.active {
    display: flex;
}

.case-lightbox img {
    max-width: 85%;
    max-height: 75%;
    object-fit: contain;
}

.case-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}

.case-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.case-lightbox-prev {
    left: 20px;
}

.case-lightbox-next {
    right: 20px;
}

.case-lightbox-caption {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
}

.case-lightbox-link {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 25px;
    background: #007bff;
    border-radius: 4px;
    transition: background 0.3s;
}

.case-lightbox-link:hover {
    background: #0056b3;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .cases-row-3 {
        grid-template-columns: 1fr; /* 前3张图片单列显示 */
    }
    
    .cases-row-2 {
        grid-template-columns: 1fr;
    }
    
    .case-showcase-overlay {
        opacity: 1;
        padding: 10px;
    }
    
    .case-showcase-overlay h4 {
        font-size: 14px;
    }
    
    .more-cases-text {
        font-size: 24px;
    }
    
    .case-lightbox img {
        max-width: 95%;
    }
    
    .case-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* ==================== CKEditor 图片对齐样式 ==================== */

/* 图片浮动左对齐 - 文字环绕效果 
   使用 !important 确保优先级高于其他图片布局样式 */
.rich-content figure[class*="align-left"],
.rich-content figure.image-style-align-left,
.ck-content figure[class*="align-left"],
.ck-content figure.image-style-align-left,
.about-content-rich .rich-content figure[class*="align-left"],
.about-content-rich .rich-content figure.image-style-align-left,
.product-detail-content-full .rich-content figure[class*="align-left"],
.product-detail-content-full .rich-content figure.image-style-align-left {
    float: left !important;
    margin: 0 20px 15px 0 !important;
    padding: 0 !important;
    max-width: 50% !important;
    width: auto !important;
    display: block !important;
    line-height: 0 !important;
}

/* 图片浮动右对齐 - 文字环绕效果 */
.rich-content figure[class*="align-right"],
.rich-content figure.image-style-align-right,
.ck-content figure[class*="align-right"],
.ck-content figure.image-style-align-right,
.about-content-rich .rich-content figure[class*="align-right"],
.about-content-rich .rich-content figure.image-style-align-right,
.product-detail-content-full .rich-content figure[class*="align-right"],
.product-detail-content-full .rich-content figure.image-style-align-right {
    float: right !important;
    margin: 0 0 15px 20px !important;
    padding: 0 !important;
    max-width: 50% !important;
    width: auto !important;
    display: block !important;
    line-height: 0 !important;
}

/* 浮动图片内部图片消除间距 */
.rich-content figure[class*="align-left"] img,
.rich-content figure[class*="align-right"] img,
.rich-content figure.image-style-align-left img,
.rich-content figure.image-style-align-right img,
.ck-content figure[class*="align-left"] img,
.ck-content figure[class*="align-right"] img,
.ck-content figure.image-style-align-left img,
.ck-content figure.image-style-align-right img,
.about-content-rich .rich-content figure[class*="align-left"] img,
.about-content-rich .rich-content figure[class*="align-right"] img,
.about-content-rich .rich-content figure.image-style-align-left img,
.about-content-rich .rich-content figure.image-style-align-right img,
.product-detail-content-full .rich-content figure[class*="align-left"] img,
.product-detail-content-full .rich-content figure[class*="align-right"] img,
.product-detail-content-full .rich-content figure.image-style-align-left img,
.product-detail-content-full .rich-content figure.image-style-align-right img {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: top !important;
}

/* 图片居中 */
.rich-content figure[class*="align-center"],
.rich-content figure.image-style-align-center,
.ck-content figure[class*="align-center"],
.ck-content figure.image-style-align-center,
.about-content-rich .rich-content figure[class*="align-center"],
.about-content-rich .rich-content figure.image-style-align-center,
.product-detail-content-full .rich-content figure[class*="align-center"],
.product-detail-content-full .rich-content figure.image-style-align-center {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    float: none !important;
}

/* 清除浮动，防止影响后续内容 */
.rich-content::after,
.ck-content::after,
.about-content-rich .rich-content::after,
.product-detail-content-full .rich-content::after {
    content: "";
    display: table;
    clear: both;
}



/* 移动端：浮动图片变为全宽 */
@media (max-width: 768px) {
    .rich-content figure[class*="align-left"],
    .rich-content figure[class*="align-right"],
    .rich-content figure.image-style-align-left,
    .rich-content figure.image-style-align-right,
    .ck-content figure[class*="align-left"],
    .ck-content figure[class*="align-right"],
    .ck-content figure.image-style-align-left,
    .ck-content figure.image-style-align-right,
    .about-content-rich .rich-content figure[class*="align-left"],
    .about-content-rich .rich-content figure[class*="align-right"],
    .about-content-rich .rich-content figure.image-style-align-left,
    .about-content-rich .rich-content figure.image-style-align-right,
    .product-detail-content-full .rich-content figure[class*="align-left"],
    .product-detail-content-full .rich-content figure[class*="align-right"],
    .product-detail-content-full .rich-content figure.image-style-align-left,
    .product-detail-content-full .rich-content figure.image-style-align-right {
        float: none !important;
        max-width: 100% !important;
        margin: 15px 0 !important;
        display: block !important;
        width: 100% !important;
    }
}
