/* Categories Page Styles */

.page-header {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.page-header h1 i {
    color: var(--primary);
}

.page-header p {
    color: var(--gray);
    font-size: 1rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--light-gray);
    background: white;
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-btn i {
    font-size: 1rem;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-header {
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.category-icon-large {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.category-stats {
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.app-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.category-body {
    padding: 1.5rem;
}

.category-name {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.explore-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.explore-btn:hover {
    background: var(--secondary);
    transform: translateX(5px);
}

/* Active navigation link */
.nav-links a.active {
    color: var(--warning);
}

.nav-links a.active::after {
    width: 100%;
}

.mobile-nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .category-filter {
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .category-header {
        height: 130px;
        padding: 1.2rem;
    }
    
    .category-icon-large {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .category-body {
        padding: 1.2rem;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .page-header h1 i {
        font-size: 1.5rem;
    }
    
    .page-header p {
        font-size: 0.85rem;
    }
    
    .category-filter {
        gap: 0.6rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .filter-btn i {
        font-size: 0.9rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-item {
        max-width: 100%;
    }
    
    .category-header {
        height: 120px;
        padding: 1rem;
    }
    
    .category-icon-large {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
        border-radius: 15px;
    }
    
    .app-count {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .category-body {
        padding: 1rem;
    }
    
    .category-name {
        font-size: 1rem;
    }
    
    .category-description {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .explore-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 375px) {
    .categories-grid {
        gap: 0.8rem;
    }
    
    .category-header {
        height: 110px;
    }
    
    .category-icon-large {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}

/* Animation for category items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-item {
    animation: fadeInUp 0.5s ease-out;
}

.category-item:nth-child(1) { animation-delay: 0.05s; }
.category-item:nth-child(2) { animation-delay: 0.1s; }
.category-item:nth-child(3) { animation-delay: 0.15s; }
.category-item:nth-child(4) { animation-delay: 0.2s; }
.category-item:nth-child(5) { animation-delay: 0.25s; }
.category-item:nth-child(6) { animation-delay: 0.3s; }
.category-item:nth-child(7) { animation-delay: 0.35s; }
.category-item:nth-child(8) { animation-delay: 0.4s; }
.category-item:nth-child(9) { animation-delay: 0.45s; }
.category-item:nth-child(10) { animation-delay: 0.5s; }
.category-item:nth-child(11) { animation-delay: 0.55s; }
.category-item:nth-child(12) { animation-delay: 0.6s; }

/* Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .category-item {
        animation: none;
    }
}
