/* =============================================================================
   Media Gallery Styles
   ============================================================================= */

/* Section */
.media-gallery-section {
    padding: 40px 0;
    background-color: #f8f9fa;
}

.media-gallery-intro {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.media-gallery-content {
    margin-top: 20px;
}

/* =============================================================================
   Video Block Styles
   ============================================================================= */

.media-video-block {
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.media-video-block__wrapper {
    padding: 0;
}

.media-video-block__player {
    position: relative;
    width: 100%;
    background: #000;
}

.media-video-block__video {
    width: 100%;
    max-height: 500px;
    display: block;
}

.media-video-block__info {
    padding: 20px;
}

.media-video-block__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.media-video-block__description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* =============================================================================
   Audio Block Styles
   ============================================================================= */

.media-audio-block {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.media-audio-block__wrapper {
    display: flex;
    align-items: center;
    padding: 20px;
}

.media-audio-block__icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 20px;
}

.media-audio-block__icon i {
    font-size: 1.5rem;
    color: #fff;
}

[dir="ltr"] .media-audio-block__icon {
    margin-left: 0;
    margin-right: 20px;
}

.media-audio-block__content {
    flex: 1;
}

.media-audio-block__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.media-audio-block__description {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.media-audio-block__player {
    width: 100%;
    height: 40px;
}

.media-audio-block__player::-webkit-media-controls-panel {
    background: rgba(255,255,255,0.1);
}

/* =============================================================================
   Media Category Block Styles
   ============================================================================= */

.media-category-block {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.media-category-block__header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.media-category-block__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.media-category-block__description {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.media-category-block__grid {
    margin-top: 15px;
}

/* =============================================================================
   Media Item Styles
   ============================================================================= */

.media-item {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.media-item__link {
    display: block;
    text-decoration: none;
}

.media-item__figure {
    position: relative;
    overflow: hidden;
    margin: 0;
}

.media-item__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.media-item:hover .media-item__image {
    transform: scale(1.05);
}

.media-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-item__overlay {
    opacity: 1;
}

.media-item__icon {
    color: #fff;
    font-size: 2rem;
}

.media-item__icon--play {
    font-size: 3rem;
}

.media-item__overlay--play {
    background: rgba(0,0,0,0.4);
    opacity: 1;
}

.media-item:hover .media-item__overlay--play {
    background: rgba(0,0,0,0.6);
}

/* Video Item */
.media-item--video .media-item__figure--video {
    cursor: pointer;
}

.media-item__video-player {
    background: #000;
}

.media-item__video {
    width: 100%;
    height: 200px;
    display: block;
}

/* Audio Item */
.media-item__audio-wrapper {
    padding: 20px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.media-item__audio-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.media-item__audio-icon i {
    font-size: 2rem;
    color: #fff;
}

.media-item__audio {
    width: 100%;
    max-width: 250px;
}

/* Media Item Info */
.media-item__info {
    padding: 15px;
}

.media-item__title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-item__desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* =============================================================================
   Responsive Styles
   ============================================================================= */

@media (max-width: 991px) {
    .media-gallery-section {
        padding: 30px 0;
    }

    .media-category-block__title {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .media-gallery-section {
        padding: 20px 0;
    }

    .media-audio-block__wrapper {
        flex-direction: column;
        text-align: center;
    }

    .media-audio-block__icon {
        margin: 0 0 15px 0;
    }

    .media-category-block {
        padding: 15px;
    }

    .media-item__image,
    .media-item__video {
        height: 150px;
    }

    .media-item__audio-wrapper {
        min-height: 150px;
    }
}

/* =============================================================================
   FancyBox Customization
   ============================================================================= */

.fancybox-caption {
    font-family: inherit;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

[dir="rtl"] .video-modal__close {
    right: auto;
    left: 20px;
}

.video-modal__close:hover {
    background: rgba(255,255,255,0.3);
}

.video-modal__content {
    max-width: 90%;
    max-height: 90%;
}

.video-modal__video {
    max-width: 100%;
    max-height: 80vh;
}
