/* 主要样式文件 */
/* 基础设置 */
:root {
    --primary-color: #0056b3;
    --secondary-color: #00a0e9;
    --accent-color: #ff6b00;
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --gray-bg: #f0f2f5;
    --border-color: #e1e4e8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 4px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: #004494;
    color: var(--light-text);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.btn-secondary:hover {
    background-color: #0089c7;
    color: var(--light-text);
}

.btn-text {
    background: none;
    color: var(--primary-color);
    padding: 0;
    font-weight: 600;
}

.btn-text:hover {
    color: var(--accent-color);
}

.btn-text i {
    margin-left: 5px;
    transition: var(--transition);
}

.btn-text:hover i {
    transform: translateX(5px);
}

/* 标题样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    background-color: transparent;
    box-shadow: none;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    gap: 20px;
    max-width: 1400px;
}

.logo {
    flex: 0 0 auto;
    margin-right: 20px;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-menu {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.main-menu > li {
    position: relative;
    margin: 0;
}

.main-menu > li > a {
    display: block;
    padding: 10px 15px;
    color: var(--light-text);
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

.main-menu > li.active > a,
.main-menu > li:hover > a {
    color: var(--light-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header.scrolled .main-menu > li > a {
    color: var(--text-color);
}

header.scrolled .main-menu > li.active > a,
header.scrolled .main-menu > li:hover > a {
    color: var(--primary-color);
}

.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    border-radius: var(--border-radius);
}

.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    position: relative;
}

.submenu li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.submenu li:last-child a {
    border-bottom: none;
}

.submenu li a:hover {
    background-color: var(--gray-bg);
    color: var(--primary-color);
}

.submenu .submenu {
    top: 0;
    left: 100%;
}

.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* 通用banner样式 */
.hero,
.news-hero,
.cases-hero,
.about-hero,
.contact-hero,
.qualification-hero,
.product-hero,
.article-hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    background-size: cover;
    background-position: center;
    margin-top: 0;
    z-index: 1000;
}

/* 视频背景样式 */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translateX(-50%) translateY(-50%);
    object-fit: contain;
}

.video-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero::before,
.news-hero::before,
.cases-hero::before,
.about-hero::before,
.contact-hero::before,
.qualification-hero::before,
.product-hero::before,
.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content,
.news-hero-content,
.cases-hero-content,
.about-hero-content,
.contact-hero-content,
.qualification-hero-content,
.product-hero-content,
.article-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hero-content h1,
.news-hero-content h1,
.cases-hero-content h1,
.about-hero-content h1,
.contact-hero-content h1,
.qualification-hero-content h1,
.product-hero-content h1,
.article-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p,
.news-hero-content p,
.cases-hero-content p,
.about-hero-content p,
.contact-hero-content p,
.qualification-hero-content p,
.product-hero-content p,
.article-hero-content p {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 特性部分 */
.features {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-item .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 产品展示 */
.product-showcase {
    padding: 200px 0;
}

.product-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-info p {
    margin-bottom: 20px;
    color: #666;
}

/* 案例研究 */
.case-studies {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.case-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.case-item:hover img {
    transform: scale(1.05);
}

.case-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--light-text);
    transition: var(--transition);
}

.case-item:hover .case-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5));
}

.case-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.case-info p {
    margin-bottom: 15px;
    opacity: 0.9;
}

/* 新闻预览 */
.news-preview {
    padding: 100px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-item {
    display: flex;
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 80px;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-align: center;
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.news-date .month {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.news-content {
    padding: 20px;
    flex-grow: 1;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.news-content p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95rem;
}

/* 页脚 */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 0 0 100%;
    max-width: 300px;
    margin-bottom: 30px;
}

.footer-logo img {
    max-height: 60px;
    margin-bottom: 20px;
}

.footer-links {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 0 0 calc(33.333% - 30px);
    margin-bottom: 30px;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
}

.footer-column ul li a:hover {
    color: var(--light-text);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-info li i {
    margin-right: 10px;
    color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 0.9rem;
    color: #999;
    display: flex;
    flex-direction: row;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    border-radius: 50%;
    margin-left: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 10px 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 90px);
        background-color: #fff;
        box-shadow: var(--shadow);
        transition: var(--transition);
        overflow-y: auto;
    }
    
    nav.active {
        left: 0;
    }
    
    .main-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .main-menu > li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-menu > li > a {
        padding: 15px;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .has-submenu.active > .submenu {
        max-height: 1000px;
    }
    
    .submenu li a {
        padding-left: 30px;
    }
    
    .submenu .submenu li a {
        padding-left: 45px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .feature-grid,
    .product-slider,
    .case-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-column {
        flex: 0 0 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .copyright {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
}

/* 公司资质页面保持原有宽度 */
.qualification-content .container {
    max-width: 1200px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

/* Language Switcher Styles */
#language-switcher {
    /* position: fixed; */
    /* top: 20px;
    right: 20px; */
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 5px;
    /* background-color: transparent; */
    /* padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

#language-switcher .language-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#language-switcher .language-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#language-switcher .language-select:hover {
    border-color: #666;
}

#language-switcher .language-select:focus {
    outline: none;
    border-color: var(--primary-color, #0066cc);
}

#language-switcher span:not(.language-btn) {
    color: var(--light-text);
}
#language-switcher .language-btn {
    padding: 6px 10px;
    /* border: 0px solid #ddd;
    border-radius: 4px;
    background-color: transparent; */
    font-size: 14px;
    cursor: pointer;
    color: var(--light-text);
    /* transition: all 0.3s ease; */
}

#language-switcher .language-btn:hover {
    /* border-color: #666; */
    color: #0066cc;
}

#language-switcher .active {
    color: red;
}

#language-switcher .language-btn:focus {
    outline: none;
    border-color: var(--primary-color, #0066cc);
}

header.scrolled #language-switcher > span.language-btn:not(.active),
header.scrolled #language-switcher > span:not(.language-btn) {
    color: unset;
}


@media (max-width: 768px) {
    #language-switcher {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }

    #language-switcher .language-label {
        display: none;
    }
}

.btn-primary:disabled {
    background-color: #666666;
    color: var(--light-text);
}

.loader {
  border: 4px solid #f3f3f3;
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
  display: none;
  margin-left: 5px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 特定于需要截断的文本元素 */
.text-truncate-50-chars {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制为2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    max-height: 3.2em; /* 根据字体大小和行高计算 */
    line-height: 1.6em;
}