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

.category-page-section {
    padding: 40px 0;
}

/* Sticky Sidebar for Category and Search Pages */
.category-page-section .catSidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    overflow-y: auto;
}


/* Category Header */
.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--sheesha-red);
}

.category-breadcrumb {
    font-size: 18px;
    margin-bottom: 10px;
    direction: rtl;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.category-breadcrumb a {
    color: var(--sheesha-red);
    text-decoration: none;
    transition: color 0.3s;
}

.category-breadcrumb a:hover {
    color: var(--sheesha-dark);
}

.category-breadcrumb .separator {
    color: #999;
    font-size: 16px;
}

.category-breadcrumb .current {
    color: #333;
    font-weight: 600;
}

.category-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--sheesha-dark);
    margin: 0 0 10px 0;
    direction: ltr;
}

.category-description {
    font-size: 16px;
    color: #666;
    direction: ltr;
}

/* Category Posts Grid */
.category-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.category-post-item {
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 300px 1fr;
    transition: box-shadow 0.3s;
}

.category-post-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.category-post-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.category-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.category-post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    direction: ltr;
}

.category-post-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    line-height: 1.4;
    font-weight: bold;
}

.category-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.category-post-title a:hover {
    color: var(--sheesha-red);
}

.category-post-excerpt {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--sheesha-red);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    transition: gap 0.3s;
}

.read-more-link:hover {
    gap: 8px;
}

.read-more-link i {
    font-size: 12px;
}

.category-post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
    direction: ltr;
    text-align: left;
}

.category-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination */
.category-pagination {
    margin-top: 40px;
    text-align: center;
}

.category-pagination .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.category-pagination .page-numbers:hover,
.category-pagination .page-numbers.current {
    background-color: var(--sheesha-red);
    color: white;
    border-color: var(--sheesha-red);
}

.category-pagination .prev,
.category-pagination .next {
    font-size: 16px;
}

/* Sidebar Widgets */
.category-sidebar-widget {
    border-radius: 8px;
    padding: 20px 0px;
    margin-bottom: 25px;
}

.catSidebar{
    border-radius: 12px;
    background-color: #e9e9e9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--sheesha-red);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: var(--sheesha-dark);
    direction: ltr;
}

.widget-more {
    font-size: 14px;
    color: var(--sheesha-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
    direction: ltr;
}

.widget-more:hover {
    gap: 8px;
}

.widget-more i {
    font-size: 12px;
}

.widget-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-post {
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.widget-post:hover {
    background-color: rgba(198, 61, 47, 0.05);
}

.widget-post-thumbnail {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    height: 80px;
}

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

.widget-post:hover .widget-post-thumbnail img {
    transform: scale(1.1);
}

.widget-post-content {
    flex: 1;
    direction: ltr;
}

.widget-post-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.widget-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.widget-post-title a:hover {
    color: var(--sheesha-red);
}

.widget-post-meta {
    font-size: 12px;
    color: #999;
    direction: ltr;
    text-align: left;
}

.widget-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-posts {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Media Category Section */
.media-category-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

.media-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.media-video-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.media-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-card-thumbnail {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.video-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.media-video-card:hover .video-card-thumbnail img {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.video-play-overlay i {
    font-size: 28px;
    color: var(--sheesha-red);
    margin-left: 4px;
}

.media-video-card:hover .video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 255, 255, 1);
}

.video-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    direction: rtl;
    text-align: right;
}

.video-category-badge {
    display: inline-block;
    background-color: var(--sheesha-red);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.video-category-badge:hover {
    background-color: var(--sheesha-dark);
    color: white;
}

.video-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: white;
    line-height: 1.4;
}

.media-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .category-title {
        font-size: 28px;
    }
    
    .category-post-item {
        grid-template-columns: 250px 1fr;
    }
    
    .media-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .category-title {
        font-size: 24px;
    }
    
    .category-post-item {
        grid-template-columns: 1fr;
    }
    
    .category-post-image {
        height: 220px;
    }
    
    .category-post-content {
        padding: 20px;
    }
    
    .category-post-title {
        font-size: 20px;
    }
    
    .media-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-card-thumbnail {
        height: 280px;
    }
}

@media (max-width: 576px) {
    .category-page-section {
        padding: 20px 0;
    }
    
    .category-post-item {
        border-radius: 0;
    }
    
    .category-post-image {
        height: 200px;
    }
    
    .category-post-content {
        padding: 15px;
    }
    
    .widget-post {
        padding: 8px;
    }
    
    .widget-post-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .video-card-thumbnail {
        height: 250px;
    }
}
