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

:root {
    --primary-color: #1976d2;
    --secondary-color: #2196f3;
    --accent-color: #0d47a1;
    --text-dark: #1a237e;
    --text-light: #546e7a;
    --bg-light: #e3f2fd;
    --bg-gradient-start: #1976d2;
    --bg-gradient-end: #42a5f5;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(25, 118, 210, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

section {
    padding: 80px 0;
}

/* ========== 顶部导航 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(227, 242, 253, 0.98));
    box-shadow: 0 2px 20px rgba(25, 118, 210, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom: 2px solid var(--primary-color);
}

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

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.8;
}

.nav-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
    transition: var(--transition);
}

.logo-link:hover .nav-logo {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.nav-brand h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ========== 轮播图 ========== */
.carousel-section {
    padding: 0;
    padding-top: 60px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

.carousel-caption {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--white);
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.9), rgba(33, 150, 243, 0.9));
    padding: 30px 60px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.carousel-caption h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.carousel-caption p {
    font-size: 18px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 20px;
}

.carousel-btn-next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* ========== 标题样式 ========== */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.title-line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========== 公司介绍 ========== */
.about-section {
    background-color: var(--bg-light);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-intro {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.about-intro h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-intro p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
}

.about-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.about-item {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.item-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.item-icon i {
    font-size: 32px;
    color: var(--white);
}

.about-item h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.about-item p {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
}

.cooperation-brands {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.cooperation-brands h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cooperation-brands p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-light);
}

/* ========== 行业资讯 ========== */
.news-section {
    background-color: var(--white);
}

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

.news-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-link {
    display: block;
}

.news-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-info {
    padding: 20px;
}

.news-title {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link:hover .news-title {
    color: var(--primary-color);
}

.news-date {
    font-size: 14px;
    color: var(--text-light);
}

/* ========== 产品视频 ========== */
.videos-section {
    background-color: var(--bg-light);
}

.video-category {
    margin-bottom: 60px;
}

.category-title {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: var(--primary-color);
}

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

.video-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.video-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-link {
    display: block;
    position: relative;
}

.video-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-thumb::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
}

.video-item:hover .video-thumb::after {
    opacity: 1;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-link:hover .video-title {
    color: var(--primary-color);
}

.video-date {
    font-size: 14px;
    color: var(--text-light);
}

/* ========== 联系信息 ========== */
.contact-section {
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.contact-item {
    text-align: center;
    padding: 40px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--white);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(26, 115, 232, 0.3);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.contact-icon i {
    font-size: 32px;
}

.contact-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

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

/* ========== 底部 ========== */
.footer {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    padding: 40px 0;
    color: var(--white);
}

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

.footer-content p {
    margin-bottom: 10px;
    font-size: 14px;
}

.beian-link {
    color: var(--white);
    opacity: 0.8;
}

.beian-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========== 响应式设计 ========== */

/* 平板设备 */
@media (max-width: 1024px) {
    .news-grid,
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .logo-link {
        gap: 12px;
    }

    .nav-logo {
        width: 45px;
        height: 45px;
    }

    .nav-brand h1 {
        font-size: 20px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 20px 0;
        gap: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .carousel-container {
        height: 400px;
    }
    
    .carousel-caption {
        bottom: 60px;
        padding: 20px 30px;
    }
    
    .carousel-caption h2 {
        font-size: 24px;
    }
    
    .carousel-caption p {
        font-size: 14px;
    }
    
    .about-items {
        grid-template-columns: 1fr;
    }
    
    .news-grid,
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .logo-link {
        gap: 10px;
    }

    .nav-logo {
        width: 40px;
        height: 40px;
    }

    .nav-brand h1 {
        font-size: 16px;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .carousel-caption {
        bottom: 40px;
        padding: 15px 20px;
    }
    
    .carousel-caption h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .carousel-caption p {
        font-size: 12px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carousel-btn-prev {
        left: 10px;
    }
    
    .carousel-btn-next {
        right: 10px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .news-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .about-intro,
    .about-item,
    .cooperation-brands {
        padding: 25px;
    }
    
    .contact-item {
        padding: 30px 15px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
}

/* 模态层整体样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    padding-top: 5%;
}

/* 模态层内容区域 */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh; /* 固定高度为视口高度的80% */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

/* 视频播放器容器 */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 关闭按钮样式优化 */
.close {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 32px;
    color: #1976d2;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #1976d2;        /* 悬停时变为黑色 */
}

/* 视频播放器样式 */
#modal-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 保持原始比例并完整显示 */
    outline: none;
}

@media (max-width: 768px) {
    .close {
        font-size: 36px;    /* 放大字体 */
        padding: 15px;      /* 增大点击区域 */
        top: -25px;           /* 更靠近顶部 */
        right: -15px;        /* 更靠近右侧 */
    }

    .modal-content {
        width: 95%;
        height: 70vh;
        border-radius: 8px;
    }
}

