/**
 * WASLA CATEGORY PAGES STYLES
 * Beautiful styling for category archive pages
 * Extracted from inline CSS for better performance
 * 
 * @package Wasla
 * @since 1.0.0
 */

/* Page layout optimization */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

.wasla-footer {
    margin-top: auto;
}

/* ===== WASLA CATEGORY PAGE STYLES ===== */
.wasla-category-page {
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ===== CATEGORY HERO SECTION ===== */
.category-hero {
    background: linear-gradient(135deg, #000B58 0%, #006A67 100%);
    color: white;
    padding: 140px 0 60px;
    margin: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 244, 183, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Breadcrumb */
.category-breadcrumb {
    margin-bottom: 2rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
}

.category-breadcrumb a {
    color: rgba(255, 244, 183, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-breadcrumb a:hover {
    color: #FFF4B7;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0.75rem;
}

.breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
}

/* Category Header */
.category-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.category-title {
    font-size: 3.2rem;
    margin: 0 0 1.5rem 0;
    font-weight: 700;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.category-title i {
    color: #FFF4B7;
    font-size: 2.5rem;
}

.category-description {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
}

.category-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.category-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-count,
.category-type,
.category-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Tajawal', sans-serif;
}

.post-count i,
.category-type i,
.category-views i {
    color: #FFF4B7;
}

/* ===== CATEGORY CONTENT ===== */
.category-content {
    padding: 80px 0;
    background: #ffffff;
    width: 100%;
    margin: 0;
}

.category-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Posts Header */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 1rem;
}

.showing-results {
    color: #666;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
}

.sort-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-family: 'Cairo', sans-serif;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #006A67;
}

/* Posts Grid */
.category-posts-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

.category-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 11, 88, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f5f5f5;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

.category-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 11, 88, 0.12);
}

/* Post Image */
.post-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.post-image-link,
.post-image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-image-placeholder {
    background: linear-gradient(135deg, #000B58 0%, #006A67 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FFF4B7;
    text-decoration: none;
    gap: 0.5rem;
}

.post-image-placeholder i {
    font-size: 3rem;
}

.placeholder-text {
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 11, 88, 0.9);
    color: #FFF4B7;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    background: #006A67;
    color: white;
}

.sticky-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #FFF4B7;
    color: #000B58;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Post Content */
.post-content-wrapper {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-family: 'Tajawal', sans-serif;
    flex-wrap: wrap;
}

.post-date,
.post-author,
.post-reading-time {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-date i,
.post-author i,
.post-reading-time i {
    color: #006A67;
    font-size: 0.8rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.4;
    font-family: 'Cairo', sans-serif;
}

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

.post-title a:hover {
    color: #006A67;
}

.post-excerpt {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.read-more-btn {
    color: #006A67;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.read-more-btn:hover {
    background: #006A67;
    color: white;
    border-color: #006A67;
    transform: translateX(5px);
}

.post-engagement {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #999;
    font-family: 'Tajawal', sans-serif;
    flex-wrap: wrap;
}

.comment-count,
.post-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.comment-count i,
.post-views i {
    color: #006A67;
}

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

.category-pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.category-pagination a,
.category-pagination .current {
    padding: 12px 20px;
    border-radius: 25px;
    background: white;
    border: 2px solid #e9ecef;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-pagination a:hover,
.category-pagination .current {
    background: #006A67;
    border-color: #006A67;
    color: white;
}

/* ===== CATEGORY SIDEBAR ===== */
.category-sidebar {
    width: 100%;
    max-width: 350px;
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-widget {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 11, 88, 0.08);
    border: 1px solid #f0f0f0;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #000B58;
    font-family: 'Cairo', sans-serif;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #FFF4B7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title i {
    color: #006A67;
}

/* Search Widget */
.search-input-group {
    display: flex;
    background: white;
    border-radius: 50px;
    border: 2px solid #e9ecef;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #006A67;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

.search-submit {
    padding: 12px 16px;
    background: #006A67;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #000B58;
}

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

.category-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.category-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-link {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Tajawal', sans-serif;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.category-link:hover {
    color: #006A67;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-name {
    font-weight: 500;
    font-size: 1rem;
}

.category-count {
    font-size: 0.8rem;
    color: #999;
}

.category-arrow {
    color: #ccc;
    transition: all 0.3s ease;
}

.category-link:hover .category-arrow {
    color: #006A67;
    transform: translateX(-3px);
}

/* Popular Posts Widget */
.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.popular-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.popular-post-link:hover {
    transform: translateX(5px);
}

.popular-post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.popular-post-link:hover .popular-post-title {
    color: #006A67;
}

.popular-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
    font-family: 'Tajawal', sans-serif;
}

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

.popular-post-meta i {
    color: #006A67;
}

/* Tags Widget */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    background: white;
    color: #666;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Tajawal', sans-serif;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: #006A67;
    color: white;
    border-color: #006A67;
    transform: translateY(-2px);
}

/* Newsletter Widget */
.newsletter-card {
    background: linear-gradient(135deg, #000B58 0%, #006A67 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 244, 183, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-icon {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.newsletter-icon i {
    font-size: 2.5rem;
    color: #FFF4B7;
}

.newsletter-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: #FFF4B7;
    position: relative;
    z-index: 2;
}

.newsletter-description {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-family: 'Tajawal', sans-serif;
    position: relative;
    z-index: 2;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

.newsletter-submit {
    padding: 12px 16px;
    background: #FFF4B7;
    color: #000B58;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.newsletter-submit:hover {
    background: white;
    transform: scale(1.05);
}

/* Contact Widget */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    color: #666;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.contact-item:hover {
    color: #006A67;
    background: #f8f9fa;
    transform: translateX(5px);
    border-color: #006A67;
}

.contact-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== NO POSTS SECTION ===== */
.no-posts-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #000B58 0%, #006A67 100%);
    color: white;
    text-align: center;
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
}

.no-posts-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255, 244, 183, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.no-posts-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.no-posts-icon i {
    font-size: 5rem;
    color: #FFF4B7;
    margin-bottom: 2rem;
}

.no-posts-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.no-posts-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
}

.no-posts-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #FFF4B7;
    color: #000B58;
    border: 2px solid #FFF4B7;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 244, 183, 0.3);
    color: #000B58;
    background: white;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFF4B7;
    color: #FFF4B7;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .wasla-container {
        padding: 0 20px;
    }
    
    .category-hero {
        padding: 100px 0 40px;
    }
    
    .category-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-title i {
        font-size: 2rem;
    }
    
    .category-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .category-content {
        padding: 60px 0;
    }
    
    .category-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 20px;
    }
    
    .category-sidebar {
        position: relative;
        top: auto;
        max-width: 100%;
        order: -1;
    }
    
    .category-post-card {
        grid-template-columns: 1fr;
    }
    
    .post-image-container {
        height: 200px;
    }
    
    .posts-header {
        flex-direction: column;
        text-align: center;
    }
    
    .post-footer {
        justify-content: center;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .no-posts-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.8rem;
    }
    
    .post-image-container {
        height: 180px;
    }
    
    .post-content-wrapper {
        padding: 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-engagement {
        justify-content: center;
    }
    
    .popular-post-link {
        flex-direction: column;
        text-align: center;
    }
    
    .popular-post-thumb {
        align-self: center;
    }
    
    .no-posts-title {
        font-size: 2rem;
    }
    
    .no-posts-icon i {
        font-size: 4rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.screen-reader-text {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Focus styles */
.category-post-card:focus-within,
.sidebar-widget a:focus,
.category-pagination a:focus {
    outline: 2px solid #006A67;
    outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */
.category-post-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-post-card:nth-child(1) { animation-delay: 0.1s; }
.category-post-card:nth-child(2) { animation-delay: 0.2s; }
.category-post-card:nth-child(3) { animation-delay: 0.3s; }
.category-post-card:nth-child(4) { animation-delay: 0.4s; }
.category-post-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
