/* Ensure media slider arrows are always clickable and above media */
.media-slider-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;
    transform: translateY(-50%);
    pointer-events: auto;
}
/* RTL support for category-breadcrumb */
body.rtl .media-page .category-breadcrumb {
    direction: rtl;
    text-align: right;
}
body.rtl .media-page .category-breadcrumb .separator {
    transform: scaleX(-1);
}
/**
 * Media Page Styles
 * 4 posts per row grid layout for media posts
 */

.media-page {
    padding: 60px 0;
    background-color: var(--bg-primary);
}

.media-page .container {
    max-width: 1200px;
}

.media-page .category-header {
    margin-bottom: 40px;
}

.media-page .category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.media-page .category-breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

.media-page .category-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.media-page .category-breadcrumb a:hover {
    color: var(--sheesha-red);
}

/* Grid Layout - 4 columns */
.media-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

/* Post Card */
.media-post-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.media-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Post Image */
.media-post-image {
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    position: relative;
}

.media-post-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.media-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

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

.media-post-image .media-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.media-post-image .media-play-button i {
    color: var(--sheesha-red);
    font-size: 24px;
    margin-left: 3px;
}

.media-post-card:hover .media-play-button {
    background: var(--sheesha-red);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-post-card:hover .media-play-button i {
    color: white;
}

/* Post Content */
.media-post-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

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

.media-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.media-post-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Meta */
.media-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

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

.media-post-meta i {
    color: var(--sheesha-red);
}

/* Pagination */
.media-posts-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    grid-column: 1 / -1;
}

.media-posts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.media-posts-pagination .page-numbers:hover {
    background: var(--sheesha-red);
    color: white;
    border-color: var(--sheesha-red);
}

.media-posts-pagination .page-numbers.current {
    background: var(--sheesha-red);
    color: white;
    border-color: var(--sheesha-red);
}

.media-posts-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* No Posts Message */
.media-posts-grid .no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .media-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .media-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .media-post-image {
        height: 180px;
    }
    
    .media-post-title {
        font-size: 15px;
    }
    
    .media-page {
        padding: 40px 0;
    }
}

@media (max-width: 576px) {
    .media-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .media-post-image {
        height: 220px;
    }
    
    .media-post-title {
        font-size: 16px;
    }
    
    .media-page {
        padding: 30px 0;
    }
}

/* Dark Mode Styles */
body.dark-mode .media-post-card {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .media-post-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .media-posts-pagination .page-numbers {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .media-post-image .media-play-button {
    background: rgba(42, 42, 42, 0.95);
}

body.dark-mode .media-post-card:hover .media-play-button {
    background: var(--sheesha-red);
}
