/* ===== CATEGORY PAGE STYLES ===== */

/* Error Pages */
.category-not-found {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    max-width: 500px;
}

.error-icon {
    margin-bottom: 2rem;
}

.error-icon i {
    font-size: 5rem;
    color: #ff9500;
}

.category-not-found h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.category-not-found p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Category Header */
.category-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-50%, 50%);
}

.category-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-icon i {
    font-size: 2.5rem;
    color: white;
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-count {
    font-size: 1.2rem;
    margin: 0.5rem 0 0;
    opacity: 0.9;
.category-description {
    font-size: 1.1rem;
    margin: 0.5rem 0 1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.category-image {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
}

/* Sort Options */
.sort-options {
    position: relative;
}

.sort-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
}

.dropdown-menu a i {
    width: 16px;
    color: #007bff;
}

/* Category Content */
.category-content {
    padding: 3rem 0;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.category-content-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #495057;
}

.category-content-body h1,
.category-content-body h2,
.category-content-body h3,
.category-content-body h4,
.category-content-body h5,
.category-content-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.category-content-body h1 {
    font-size: 2.5rem;
}

.category-content-body h2 {
    font-size: 2rem;
}

.category-content-body h3 {
    font-size: 1.5rem;
}

.category-content-body p {
    margin-bottom: 1.2rem;
}

.category-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.category-content-body blockquote {
    border-left: 4px solid #007bff;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #495057;
}

.category-content-body ul,
.category-content-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.category-content-body li {
    margin-bottom: 0.5rem;
}

.category-content-body a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-content-body a:hover {
    color: #0056b3;
    text-decoration: underline;
}
/* Main Content */
.category-main {
    padding: 4rem 0;
    background: #f8f9fa;
    min-height: 60vh;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* Empty Category */
.empty-category {
    text-align: center;
    padding: 4rem 0;
}

.empty-icon i {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 2rem;
}

.empty-category h3 {
    font-size: 2rem;
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-category p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.post-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-date {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-title {
    margin-bottom: 1rem;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #007bff;
}

.post-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-actions {
    margin-top: auto;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
    transform: translateX(5px);
}

/* Back to Top */
.back-to-top-wrapper {
    text-align: center;
    margin-top: 3rem;
}

.back-to-top-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.back-to-top-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.widget-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem;
}

.widget-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-content {
    padding: 1.5rem;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-item a:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.category-item.active a {
    background: #e3f2fd;
    color: #007bff;
    border-color: #b3d9ff;
    font-weight: 600;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.category-item.active .category-count {
    background: #007bff;
    color: white;
}

/* Related Posts Widget */
.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.related-post-item:hover {
    background: #f8f9fa;
}

.related-post-image {
    flex-shrink: 0;
}

.related-post-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.related-post-content {
    flex-grow: 1;
}

.related-post-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.related-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #007bff;
}

.related-post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.related-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Search Widget */
.search-form {
    margin: 0;
}

.search-input-group {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 12px 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

/* No Content State */
.no-content {
    color: #6c757d;
    text-align: center;
    font-style: italic;
    margin: 0;
    padding: 2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 991px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar-sticky {
        position: relative;
        top: auto;
    }
    
    .post-card {
        grid-template-columns: 1fr;
    }
    
    .post-image img {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .category-header {
        padding: 3rem 0 2rem;
    }
    
    .category-header-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .category-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.8rem;
    }
    
    .category-main {
        padding: 2rem 0;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .related-post-item {
        padding: 0.8rem;
    }
    
    .widget-content {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .posts-grid {
        gap: 1rem;
    }
    
    .sidebar-widget {
        border-radius: 15px;
    }
    
    .post-card {
        border-radius: 15px;
    }
    
    .category-header-content {
        padding: 0 1rem;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus States */
*:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}