/* ===================================
   Category Page CSS - Tools Categories
   =================================== */

/* Category Hero */
.category-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.category-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: #ffffff;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 24px;
}

.category-badge-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-hero h1 {
    color: #fff;
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.category-hero-description {
    font-size: 1.25rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
}

/* Category Stats */
.category-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.category-stat {
    text-align: center;
}

.category-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    display: block;
    line-height: 1;
}

.category-stat-label {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-top: 8px;
}

/* Category Main */
.category-main {
    padding: 80px 0;
    background: var(--bg-primary);
}

/* Tools Grid */
.category-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-tool-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.category-tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-tool-icon.math {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.category-tool-icon.physics {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.category-tool-icon.units {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.category-tool-icon.time {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.category-tool-icon svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
    stroke: currentColor;
}

.category-tool-arrow {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-tool-arrow svg {
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.category-tool-card:hover .category-tool-arrow {
    background: var(--primary-color);
}

.category-tool-card:hover .category-tool-arrow svg {
    color: #ffffff;
    transform: translateX(4px);
}

.category-tool-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.category-tool-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Category Features */
.category-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.category-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.category-feature-tag svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Related Categories */
.related-categories {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.related-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.related-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.related-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.related-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.related-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.related-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.related-card-icon.math {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.related-card-icon.physics {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.related-card-icon.units {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.related-card-icon.time {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.related-card-icon svg {
    width: 32px;
    height: 32px;
    color: #ffffff;
    stroke: currentColor;
}

.related-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.related-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.related-card-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-card-count svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===================================
   Responsive Styles
   =================================== */
@media (max-width: 1024px) {
    .category-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .category-hero {
        padding: 80px 0 60px;
    }
    
    .category-hero h1 {
        font-size: 2.5rem;
    }
    
    .category-hero-description {
        font-size: 1.1rem;
    }
    
    .category-stats {
        gap: 32px;
    }
    
    .category-stat-number {
        font-size: 2rem;
    }
    
    .category-main {
        padding: 60px 0;
    }
    
    .category-tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-categories {
        padding: 60px 0;
    }
    
    .related-header h2 {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .category-hero h1 {
        font-size: 2rem;
    }
    
    .category-hero-description {
        font-size: 1rem;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .category-tool-card {
        padding: 24px;
    }
    
    .category-tool-icon {
        width: 48px;
        height: 48px;
    }
    
    .category-tool-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .category-tool-content h3 {
        font-size: 1.25rem;
    }
    
    .related-header h2 {
        font-size: 1.75rem;
    }
}
