/**
 * Media Sections Styles
 * Short Videos (Reels) + Videos & Podcasts
 * 
 * @package MashaalDigital
 * @version 1.0.0
 */

/* ================================
   COMMON STYLES
   ================================ */
.short-videos-reels-section,
.videos-podcasts-section {
    padding: 50px 0;
    background: #f8f9fa;
}

.short-videos-reels-section .container,
.videos-podcasts-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-title i {
    color: #BB1919;
    font-size: 1.8rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #BB1919;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #8B0000;
    transform: translateX(-3px);
}

/* ================================
   SECTION 1: SHORT VIDEOS (REELS)
   ================================ */
.reels-slider-wrapper {
    position: relative;
    padding: 0 50px;
}

.reels-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.reels-slider::-webkit-scrollbar {
    display: none;
}

.reel-card {
    flex: 0 0 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reel-card:hover {
    transform: translateY(-5px);
}

.reel-title {
    padding: 0 5px;
}

.reel-title h4 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #2c3e50;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reel-thumbnail {
    position: relative;
    width: 200px;
    height: 350px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.reel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.reel-card:hover .reel-thumbnail img {
    transform: scale(1.1);
}

.reel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.reel-placeholder i {
    font-size: 3rem;
    color: white;
    opacity: 0.7;
}

.reel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.reel-card:hover .reel-overlay {
    background: rgba(0,0,0,0.5);
}

.reel-overlay .play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.reel-card:hover .reel-overlay .play-icon {
    transform: scale(1.15);
    background: rgba(255,255,255,1);
}

.reel-overlay .play-icon i {
    font-size: 1.5rem;
    color: #BB1919;
    margin-left: 3px;
}

.reel-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Navigation Buttons */
.reels-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.reels-nav-btn:hover {
    background: #BB1919;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.reels-prev {
    right: 0;
}

.reels-next {
    left: 0;
}

.reels-nav-btn i {
    font-size: 1.2rem;
}

/* ================================
   SECTION 2: VIDEOS & PODCASTS
   ================================ */
.podcasts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.podcast-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.podcast-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.podcast-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #000;
}

.podcast-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.podcast-card:hover .podcast-thumbnail img {
    transform: scale(1.1);
}

.podcast-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.podcast-placeholder i {
    font-size: 3rem;
    color: white;
    opacity: 0.7;
}

.podcast-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.podcast-card:hover .podcast-overlay {
    background: rgba(0,0,0,0.5);
}

.podcast-overlay .play-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.podcast-card:hover .podcast-overlay .play-icon {
    transform: scale(1.15);
    background: rgba(255,255,255,1);
}

.podcast-overlay .play-icon i {
    font-size: 1.8rem;
    color: #BB1919;
    margin-left: 4px;
}

.podcast-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.podcast-content {
    padding: 20px;
}

.podcast-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.podcast-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.podcast-meta i {
    color: #BB1919;
}

/* ================================
   VIDEO MODAL POPUP
   ================================ */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 1;
    animation: slideUp 0.4s ease;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-modal-close:hover {
    background: #BB1919;
    color: white;
    transform: rotate(90deg);
}

.video-modal-close i {
    font-size: 1.3rem;
}

.video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .podcasts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .reel-card {
        flex: 0 0 180px;
    }
    
    .reel-thumbnail {
        width: 180px;
        height: 320px;
    }
    
    .reel-title h4 {
        font-size: 0.92rem;
    }
}

/* Tablet (≤768px) */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.6rem;
    }
    
    .podcasts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .podcast-thumbnail {
        height: 180px;
    }
    
    .reels-slider-wrapper {
        padding: 0 40px;
    }
    
    .reels-nav-btn {
        width: 38px;
        height: 38px;
    }
    
    .reel-card {
        flex: 0 0 160px;
    }
    
    .reel-thumbnail {
        width: 160px;
        height: 280px;
    }
    
    .reel-title h4 {
        font-size: 0.9rem;
    }
    
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -45px;
        width: 40px;
        height: 40px;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .short-videos-reels-section,
    .videos-podcasts-section {
        padding: 30px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .podcasts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .podcast-thumbnail {
        height: 220px;
    }
    
    .reels-slider-wrapper {
        padding: 0 35px;
    }
    
    .reels-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .reel-card {
        flex: 0 0 140px;
    }
    
    .reel-thumbnail {
        width: 140px;
        height: 250px;
    }
    
    .reel-title h4 {
        font-size: 0.85rem;
    }
    
    .reel-overlay .play-icon {
        width: 50px;
        height: 50px;
    }
    
    .reel-overlay .play-icon i {
        font-size: 1.2rem;
    }
    
    .podcast-overlay .play-icon {
        width: 60px;
        height: 60px;
    }
    
    .podcast-overlay .play-icon i {
        font-size: 1.5rem;
    }
    
    .video-modal-close {
        top: -40px;
        width: 36px;
        height: 36px;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */
.reel-card:focus,
.podcast-card:focus {
    outline: 3px solid #BB1919;
    outline-offset: 3px;
}

.reels-nav-btn:focus,
.video-modal-close:focus {
    outline: 3px solid #BB1919;
    outline-offset: 2px;
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .short-videos-reels-section,
    .videos-podcasts-section,
    .video-modal {
        display: none;
    }
}
