/* ===== 首页样式 - home_index.css ===== */

/* ===== Hero Section - 纯CSS渐变背景（优化版） ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* 纯色背景 - 与导航栏协调的深蓝色 */
    background: #0c2461;
}

/* 动态渐变背景 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gradient-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* 调整为与蓝色系更协调的光晕效果 */
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(74, 144, 226, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(80, 200, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 40%, rgba(100, 180, 255, 0.15) 0%, transparent 40%);
    animation: gradientMove 20s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, 2%) rotate(5deg); }
    66% { transform: translate(-2%, 1%) rotate(-5deg); }
}

/* 装饰性几何图形 */
.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #50c8ff 0%, #2a9df4 100%);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #64b4ff 0%, #4a90e2 100%);
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #3d8bca 0%, #2c6da0 100%);
    bottom: 20%;
    right: 20%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* 网格背景 */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Hero 内容 */
.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 120px 0 100px;
}

.hero-text {
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
}

.text-gradient {
    background: linear-gradient(135deg, #4a90e2 0%, #64b4ff 50%, #50c8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* 统计数据 */
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.3rem;
}

/* 按钮样式 */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #2a9df4 100%);
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.5);
}

.hero-btn-secondary {
    border: 2px solid rgba(255,255,255,0.3);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

/* 右侧视觉区域 */
.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== 光学公式展示 ===== */

.formula-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 480px;
}

.formula-box {
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    text-align: center;
}

.formula-title {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.formula-content {
    color: #fff;
    font-size: 2rem;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    margin: 20px 0;
    letter-spacing: 2px;
}

.formula-content.planck-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 1.35rem;
    letter-spacing: 0;
    line-height: 1.4;
}

.formula-content.planck-symbols {
    letter-spacing: 1px;
}

.fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    vertical-align: middle;
    line-height: 1.1;
}

.fraction-top {
    display: block;
    padding: 0 8px 3px;
    border-bottom: 1px solid rgba(255,255,255,0.85);
}

.fraction-bottom {
    display: block;
    padding: 3px 8px 0;
}

.formula-content sub,
.formula-content sup,
.formula-desc sub {
    line-height: 0;
}

.formula-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 滚动提示 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255,255,255,0.5);
    z-index: 10;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 13px;
    position: relative;
    margin-bottom: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* 产品列表区域样式 */
.products-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
}

.products-section .nav-pills {
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.products-section .nav-pills .nav-link {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.products-section .nav-pills .nav-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.products-section .nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

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

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 1.5rem;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    min-height: 4.5em;
    max-height: 4.5em;
}

/* 首页文章列表样式 - 简洁列表 */
.home-article-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.home-article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.home-article-item:last-child {
    border-bottom: none;
}

.home-article-item:hover {
    background: #f8f9fa;
    padding-left: 2rem;
}

.home-article-item .home-article-title {
    font-weight: 500;
    color: #333;
    flex: 1;
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-article-item:hover .home-article-title {
    color: #0d6efd;
}

.home-article-item .home-article-date {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .spectrometer-container {
        width: 100%;
        max-width: 480px;
    }
    
    .products-section .nav-pills {
        gap: 0.3rem;
    }
    
    .products-section .nav-pills .nav-link {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .products-section {
        padding: 2rem 0;
    }
}
