/* 对比与教程资源页面样式 */

/* 资源部分整体样式 */
.resources-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.resources-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.resources-section .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.resources-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.resources-section .section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 资源容器 */
.resources-container {
    display: grid;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 资源分类 */
.resource-category {
    background: var(--background-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.resource-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* 分类头部 */
.category-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    position: relative;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.category-icon i {
    font-size: 1.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* 资源卡片容器 */
.resource-cards {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .resource-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* 单个资源卡片 */
.resource-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.resource-card:hover::before {
    opacity: 0.05;
}

.resource-card:hover {
    transform: translateX(4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    background: white;
}

.resource-card:hover .card-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}

.resource-card:hover .card-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 卡片图标 */
.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.card-icon i {
    font-size: 1.25rem;
}

/* 彩色图标样式 */
.compare-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.enterprise-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.global-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.security-icon {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.migration-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.efficiency-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.collaboration-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

/* 卡片内容 */
.card-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.card-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.card-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

/* 卡片标签 */
.card-tag {
    display: inline-block;
    background: var(--border-color);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.card-tag.cloud-alt {
    background: #dbeafe;
    color: #1e40af;
}

.card-tag.enterprise {
    background: #f3e8ff;
    color: #7c3aed;
}

.card-tag.global {
    background: #dcfdf4;
    color: #065f46;
}

.card-tag.security {
    background: #dcfdf4;
    color: #065f46;
}

.card-tag.migration {
    background: #fef3c7;
    color: #92400e;
}

.card-tag.efficiency {
    background: #cffafe;
    color: #0891b2;
}

.card-tag.collaboration {
    background: #f3e8ff;
    color: #7c3aed;
}

/* 卡片箭头 */
.card-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.card-arrow i {
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .resources-section {
        padding: 3rem 0;
    }
    
    .resources-section .section-title {
        font-size: 2rem;
    }
    
    .category-header {
        padding: 1.5rem;
    }
    
    .category-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .category-icon i {
        font-size: 1.25rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .resource-card {
        padding: 1rem;
    }
    
    .card-content h4 {
        font-size: 1rem;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-category {
    animation: slideInUp 0.6s ease-out;
}

.resource-category:nth-child(2) {
    animation-delay: 0.1s;
}

.resource-category:nth-child(3) {
    animation-delay: 0.2s;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .resources-section {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .resource-category {
        background: #1e293b;
        border-color: #334155;
    }
    
    .resource-card {
        background: #0f172a;
        border-color: #334155;
        color: #e2e8f0;
    }
    
    .resource-card:hover {
        background: #1e293b;
    }
    
    .card-content h4 {
        color: #e2e8f0;
    }
    
    .card-content p {
        color: #94a3b8;
    }
}
