/**
 * 烽云官网 - 资源分布列表页样式
 * 设计风格：扁平化浅色科技风
 * 主色调：#1a72b3
 * 作者：Bruce
 * 创建时间：2026-02-27
 */

/* ==================== 资源分布页面专用样式 ==================== */

/* Banner区域 - 全宽500px高度 */
.resource-banner {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #1a72b3 0%, #0d4a75 50%, #145a8f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px; /* 导航栏高度补偿 */
}

/* Banner背景图 - 使用栏目主图 */
.resource-banner .banner-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Banner背景遮罩 - 确保文字可读性 */
.resource-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(12, 74, 110, 0.6) 0%, rgba(15, 23, 42, 0.7) 100%),
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* 数据中心网格背景 */
.resource-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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: 60px 60px;
    pointer-events: none;
    z-index: 1;
}

/* Banner内容 */
.resource-banner .banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    max-width: 800px;
}

.resource-banner .banner-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.resource-banner .banner-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.resource-banner .banner-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.resource-banner .banner-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Banner统计数据 - 使用三重选择器提高优先级 */
.resource-banner.resource-banner.resource-banner .banner-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
}

.resource-banner.resource-banner.resource-banner .stat-item {
    text-align: center;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.resource-banner.resource-banner.resource-banner .stat-item:hover {
    transform: none !important;
    box-shadow: none !important;
}

.resource-banner.resource-banner.resource-banner .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff !important;
    display: block;
    font-family: inherit;
    margin-bottom: 4px;
}

.resource-banner.resource-banner.resource-banner .stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8) !important;
    margin-top: 4px;
}

/* ==================== 选项卡区域 ==================== */
.resource-tabs-section {
    background: #ffffff;
    padding: 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.resource-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #e2e8f0;
}

.tab-item {
    flex: 1;
    max-width: 200px;
    padding: 20px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.tab-item:hover {
    color: #1a72b3;
    background: #f0f9ff;
}

.tab-item.active {
    color: #1a72b3;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a72b3, #3d8bc7);
    border-radius: 2px 2px 0 0;
}

.tab-icon {
    width: 20px;
    height: 20px;
}

/* ==================== 机房列表区域 ==================== */
.resource-content {
    background: #f8fafc;
    padding: 60px 0 80px;
    min-height: 500px;
}

.resource-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 区域标题 */
.region-header {
    text-align: center;
    margin-bottom: 40px;
}

.region-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.region-desc {
    font-size: 15px;
    color: #64748b;
}

/* 机房列表网格 */
.datacenter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

/* 机房卡片 */
.datacenter-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

.datacenter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: #1a72b3;
}

.card-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.datacenter-card:hover .card-image {
    transform: scale(1.05);
}

/* 卡片图片遮罩 */
.card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.card-location svg {
    width: 16px;
    height: 16px;
}

/* 卡片内容 */
.card-content {
    padding: 20px 24px 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f0f9ff;
    color: #1a72b3;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.card-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片规格信息 */
.card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.spec-item svg {
    width: 14px;
    height: 14px;
    color: #1a72b3;
}

/* ==================== 分页组件 ==================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

/* 适配系统自带分页样式 */
.pagination-wrapper .pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    list-style: none;
    margin: 0;
}

.pagination-wrapper .pagination li {
    display: flex;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}

.pagination-wrapper .pagination li a:hover:not(.active):not(.disabled) {
    background: #f0f9ff;
    color: #1a72b3;
}

.pagination-wrapper .pagination li.active span,
.pagination-wrapper .pagination li.current span {
    background: linear-gradient(135deg, #1a72b3, #3d8bc7);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26,114,179,0.3);
}

.pagination-wrapper .pagination li.disabled span {
    color: #cbd5e1;
    cursor: not-allowed;
}

/* 上一页/下一页箭头 */
.pagination-wrapper .pagination li:first-child a,
.pagination-wrapper .pagination li:last-child a {
    padding: 0 16px;
    gap: 4px;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 60px;
    height: 60px;
    color: #1a72b3;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: #64748b;
}

/* ==================== 响应式设计 ==================== */

/* 平板端 (768px - 1199px) */
@media (max-width: 1199px) {
    .resource-banner {
        height: 420px;
    }
    
    .resource-banner .banner-title {
        font-size: 36px;
    }
    
    .resource-banner.resource-banner.resource-banner .banner-stats {
        gap: 40px;
    }
    
    .resource-banner.resource-banner.resource-banner .stat-number {
        font-size: 28px;
    }
    
    .datacenter-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 20px;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 767px) {
    .resource-banner {
        height: 380px;
        margin-top: 60px;
    }
    
    .resource-banner .banner-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }
    
    .resource-banner .banner-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .resource-banner .banner-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .resource-banner .banner-subtitle {
        font-size: 14px;
    }
    
    .resource-banner.resource-banner.resource-banner .banner-stats {
        gap: 24px;
        margin-top: 30px;
    }
    
    .resource-banner.resource-banner.resource-banner .stat-number {
        font-size: 24px;
    }
    
    .resource-banner.resource-banner.resource-banner .stat-label {
        font-size: 12px;
    }
    
    .resource-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .resource-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-item {
        min-width: 120px;
        padding: 16px 20px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .resource-content {
        padding: 40px 0 60px;
    }
    
    .region-title {
        font-size: 22px;
    }
    
    .datacenter-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-image-wrapper {
        height: 180px;
    }
    
    .card-content {
        padding: 16px 20px 20px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .pagination {
        padding: 6px;
    }
    
    .page-item {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* 小屏移动端 (< 375px) */
@media (max-width: 374px) {
    .resource-banner .banner-title {
        font-size: 24px;
    }
    
    .resource-banner.resource-banner.resource-banner .banner-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .tab-item {
        min-width: 100px;
        padding: 14px 16px;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.datacenter-card {
    animation: fadeInUp 0.5s ease forwards;
}

.datacenter-card:nth-child(1) { animation-delay: 0.05s; }
.datacenter-card:nth-child(2) { animation-delay: 0.1s; }
.datacenter-card:nth-child(3) { animation-delay: 0.15s; }
.datacenter-card:nth-child(4) { animation-delay: 0.2s; }
.datacenter-card:nth-child(5) { animation-delay: 0.25s; }
.datacenter-card:nth-child(6) { animation-delay: 0.3s; }

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .datacenter-card {
        animation: none;
    }
    
    .datacenter-card:hover {
        transform: none;
    }
    
    .card-image {
        transition: none;
    }
}
