/* Categories Page Styles */

/* Premium Page Header */
.premium-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 3rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.premium-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.page-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.page-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.page-subtitle {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.page-stats {
    text-align: right;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Premium Filters */
.premium-filters-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.premium-search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-input {
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
    width: 100%;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    text-decoration: none;
    padding: 0.25rem;
    transition: all 0.3s;
}

.clear-search:hover {
    color: #e74c3c;
}

.btn-search {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-search:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    color: white;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.filter-label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.premium-select {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 180px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.premium-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Premium Stories Grid - 4 columns */
.premium-stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.story-card-wrapper {
    position: relative;
}

.story-card {
    display: block;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.story-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.story-card:hover .story-cover img {
    transform: scale(1.05);
}

.story-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 3rem;
}

.story-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.story-badge.completed {
    color: #28a745;
}

.story-badge.ongoing {
    color: #007bff;
}

.story-info {
    padding: 1.25rem;
}

.story-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.story-meta i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.story-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.story-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #95a5a6;
    font-size: 0.85rem;
}

.story-stats .stat i {
    font-size: 0.75rem;
}

.story-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 16px;
}

.story-card:hover .story-hover {
    opacity: 1;
}

.hover-content {
    text-align: center;
}

.hover-content i {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.hover-content span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-description {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.premium-pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.premium-pagination {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
    gap: 1rem;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 0.9rem;
    order: 2;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    order: 1;
    justify-content: center;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 1rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.pagination-btn:hover:not(.disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #bdc3c7;
    color: #bdc3c7;
}

.pagination-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #7f8c8d;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 600;
}

.pagination-number:hover:not(.active) {
    background: #f8f9fa;
    color: #667eea;
    text-decoration: none;
}

.pagination-number.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-dots {
    padding: 0 0.5rem;
    color: #bdc3c7;
}

/* Responsive */
@media (max-width: 1200px) {
    .premium-stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .premium-stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .premium-page-header {
        padding: 3rem 0 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-stats {
        text-align: left;
        margin-top: 1.5rem;
    }
    
    .premium-filters-bar .row {
        gap: 1rem;
    }
    
    .filter-controls {
        justify-content: flex-start;
    }
    
    /* Mobile Pagination - already centered */
    .pagination-info {
        order: 2;
        margin-top: 1rem;
        margin-bottom: 0;
    }
    
    .pagination-controls {
        order: 1;
        justify-content: center;
    }
    
    .pagination-numbers {
        margin: 0 0.5rem;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .premium-stories-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .story-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .pagination-numbers .pagination-number:not(.active) {
        display: none;
    }
    
    .pagination-numbers .pagination-number.active {
        display: flex;
    }
    
    .pagination-dots {
        display: none;
    }
}