/* assets/css/style.css */
:root {
    --primary-dark: #0f172a;
    --primary-blue: #0ea5e9;
    --accent-teal: #06b6d4;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-light: #64748b;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 固定返回按钮 */
.floating-back-btn {
    position: fixed;
    top: 100px;
    left: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.floating-back-btn.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.floating-back-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateX(5px);
}

/* 主导航 */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-decoration: none;
}

.logo span { color: var(--primary-blue); }

.nav-links { display: flex; gap: 2.5rem; }

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active { color: var(--primary-blue); }

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
}

/* 动态主视觉 */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
}

.slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
}

.slide.active { opacity: 1; }

.hero-content {
    max-width: 900px;
    padding: 2rem;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero .tagline {
    font-size: 1.3rem;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* 分类展示区 */
.portfolio-section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 6rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}

.category-card:hover .card-image img { transform: scale(1.08); }

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-blue);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content { padding: 2rem; }

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* 详情页样式 */
.detail-header {
    padding: 8rem 5% 4rem;
    background: linear-gradient(135deg, var(--primary-dark), #1e293b);
    color: white;
    margin-bottom: 5rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.detail-header h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
}

.detail-header .tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 为每个分类单独设置背景图片 */
/* 生物安全实验室 */
#bio-lab .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/bio-lab-bg.jpg') center/cover;
}

/* 石油化工 */
#oil-chemical .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/oil-bg.jpg') center/cover;
}

/* 海洋监测 */
#marine .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/marine-bg.jpg') center/cover;
}

/* 智能仓储 */
#warehouse .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/warehouse-bg.jpg') center/cover;
}

/* 航天军工 */
#aerospace .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/aerospace-bg.jpg') center/cover;
}

/* 电池检测 */
#battery .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/battery-bg.jpg') center/cover;
}

/* 环境监测 */
#environment .detail-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.7)), 
                url('../images/headers/environment-bg.jpg') center/cover;
}

/* ========== 视频展示区域样式 ========== */

.video-showcase-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
}

.video-showcase {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2.5rem;
    margin-top: 2rem;
}

/* 主视频播放器 */
.video-player {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: #1a202c;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.local-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
    background: #000;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.placeholder-content {
    text-align: center;
    padding: 2rem;
}

.placeholder-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.placeholder-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.video-placeholder:hover .placeholder-content i {
    transform: scale(1.1);
    opacity: 1;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.video-info h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.video-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 视频缩略图列表 */
.video-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.video-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.video-thumbnails::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.video-thumbnails::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.video-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.video-thumb {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.video-thumb:hover {
    transform: translateX(5px);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow);
}

.video-thumb.active {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.thumb-image {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 80px;
    overflow: hidden;
}

.thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumb:hover .thumb-image img {
    transform: scale(1.05);
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumb:hover .thumb-overlay {
    opacity: 1;
}

.thumb-info {
    flex: 1;
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.thumb-info h4 {
    color: var(--primary-dark);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.thumb-info p {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.video-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.video-note p {
    color: #92400e;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-note i {
    color: #f59e0b;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .video-showcase {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .video-thumbnails {
        max-height: none;
        overflow-y: visible;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .video-thumb {
        flex-direction: column;
    }
    
    .thumb-image {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .video-showcase-section {
        padding: 2rem 1.5rem;
    }
    
    .video-thumbnails {
        grid-template-columns: 1fr;
    }
    
    .placeholder-content i {
        font-size: 3rem;
    }
    
    .placeholder-content p {
        font-size: 1rem;
    }
}

.detail-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 6rem;
    position: relative;
    top: -50px;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.detail-section {
    margin-bottom: 5rem;
    padding-top: 3rem;
}

.detail-section h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--primary-blue);
    display: inline-block;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.product-card:hover { transform: translateY(-5px); }

.product-card h4 {
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.product-card .highlight {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.product-card p { color: var(--text-light); }

.product-image {
    width: 100%;
    height: 180px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.case-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--accent-teal);
}

/* ========== 关于我图片轮播样式 ========== */

/* 轮播容器 */
.about-image-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* 图片容器 */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
}

/* 单张图片 */
.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slider-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 图片描述文字 */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.3s;
}

.slider-slide.active .slide-caption {
    opacity: 1;
    transform: translateY(0);
}

/* 轮播控制按钮 */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

/* 轮播指示点 */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

.slider-dot:hover {
    background: white;
    transform: scale(1.1);
}

/* 页脚 */
.site-footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding: 4rem 5% 2rem;
    text-align: center;
}

.footer-content { max-width: 1200px; margin: 0 auto; }

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.copyright {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    font-size: 0.9rem;
}

/* 按钮 */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: 2px solid var(--primary-blue);
    cursor: pointer;
}

.cta-button:hover {
    background: transparent;
    color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 项目网格样式 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 自动填充，最小宽度280px */
    gap: 15px; /* 卡片间距 */
    margin-top: 20px;
}

.project-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    font-size: 15px;
    color: var(--text-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
    cursor: default;
}




/* 响应式设计 */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .floating-back-btn { left: 20px; padding: 10px 16px; }
    .about-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .hero .tagline { font-size: 1.1rem; }
    .category-grid { grid-template-columns: 1fr; }
    .detail-header h1 { font-size: 2.5rem; }
    .detail-header { padding: 6rem 5% 3rem; }
    .floating-back-btn {
        left: 10px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .floating-back-btn span { display: none; }

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
}