/**
 * HSI Group - Product Page Styles
 * 产品页面样式
 */

/* ========================================
   Hero Banner Section
======================================== */
.product-hero {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-hero .hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    z-index: 0;
}

/* 背景装饰 */
.product-hero .hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(22, 100, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
}

/* 网格背景 */
.product-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

.product-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px var(--space-6) 60px;
}

.product-hero .hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--font-bold);
    color: #ffffff;
    margin-bottom: var(--space-4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.product-hero .hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Stats Section
======================================== */
.product-stats {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 48px 0;
}

.stats-inner {
    max-width: var(--container-2xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.product-stats .stat-item {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.product-stats .stat-number {
    font-size: 56px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    display: inline;
}

.product-stats .stat-suffix {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
}

.product-stats .stat-label {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 8px 0 4px;
}

.product-stats .stat-sublabel {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ========================================
   Database Section
======================================== */
.database-section {
    background: #ffffff;
    width: 100%;
    padding: 60px 0 80px;
}

.database-inner {
    max-width: var(--container-2xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Database Tabs Navigation */
.database-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.database-tabs .tab-item {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-radius: 24px;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.database-tabs .tab-item:hover {
    color: #1664FF;
    background: rgba(22, 100, 255, 0.05);
}

.database-tabs .tab-item.active {
    color: #1664FF;
    background: rgba(22, 100, 255, 0.1);
    border-color: rgba(22, 100, 255, 0.2);
}

/* Database Content */
.database-content {
    margin-bottom: 56px;
    scroll-margin-top: 120px;
}

.database-content:last-child {
    margin-bottom: 0;
}

.database-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

/* Country Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 32px;
    min-height: 100px;
}

/* 骨架屏加载效果 */
.country-grid.loading {
    position: relative;
}

.skeleton-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.skeleton-flag {
    width: 36px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    width: 80px;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 国家项目样式 */
.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    background: transparent;
    position: relative;
    cursor: pointer;
}

/* 入场动画完成后的状态 */
.country-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 悬浮效果 */
.country-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(22, 100, 255, 0.06) 0%, rgba(14, 165, 233, 0.06) 100%);
    box-shadow: 0 4px 16px rgba(22, 100, 255, 0.1);
}

.country-item:hover .country-name {
    color: #1664FF;
    transform: translateX(4px);
}

.country-item:hover .country-flag {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 国旗样式 */
.country-flag {
    width: 36px;
    height: 26px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 国旗图片 */
.country-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.country-flag-img.loaded {
    opacity: 1;
}

/* 国家名称 */
.country-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1200px) {
    .country-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .country-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .product-stats .stat-item {
        flex: 0 0 calc(33.333% - 16px);
        margin-bottom: 24px;
    }
    
    .product-stats .stat-number {
        font-size: 42px;
    }
    
    .product-stats .stat-suffix {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .product-hero .hero-content {
        padding: 60px var(--space-6) 48px;
    }
    
    .product-hero .hero-title {
        font-size: 2rem;
    }
    
    .country-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .database-tabs {
        gap: 8px;
    }
    
    .database-tabs .tab-item {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .product-stats .stat-item {
        flex: 0 0 calc(50% - 12px);
    }
    
    .product-stats .stat-number {
        font-size: 36px;
    }
    
    .product-stats .stat-suffix {
        font-size: 28px;
    }
    
    .product-stats {
        padding: 32px 0;
    }
    
    .database-section {
        padding: 40px 0 60px;
    }
}

@media (max-width: 640px) {
    .product-hero .hero-content {
        padding: 48px var(--space-4) 40px;
    }
    
    .product-hero .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .stats-inner,
    .database-inner {
        padding: 0 var(--space-4);
    }
}

@media (max-width: 480px) {
    .country-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 24px;
    }
    
    .product-hero .hero-title {
        font-size: 1.75rem;
    }
    
    .product-stats .stat-item {
        flex: 0 0 100%;
    }
    
    .product-stats .stat-number {
        font-size: 32px;
    }
    
    .product-stats .stat-suffix {
        font-size: 24px;
    }
    
    .database-tabs {
        justify-content: center;
    }
    
    .database-tabs .tab-item {
        padding: 6px 12px;
        font-size: 12px;
    }
}
