/* ==========================================================================
   MEDIA DETAILS SECTION (media-details.css)
   ========================================================================== */

   .media-details-section {
    background-color: #ffffff;
    padding: 30px 0 30px 0;
}

/* Breadcrumb Styling */
.media-details-breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #64748B;
}

.media-details-breadcrumb .breadcrumb-item {
    font-weight: 500;
    color: #666667;
}

/* Header & Main Tabs */
.media-details-header {
    margin-bottom: 27px;
}

.media-details-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #E4E4E4;
    width: 320px;
    justify-content: space-between;
}

.media-details-tabs .media-tab-btn {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1e1e1e;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 0px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.media-details-tabs .media-tab-btn.active {
    color: #164D92;
    border-bottom: 2px solid #164D92;
}

/* Subtabs for Media Gallery */
.media-subtabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.media-subtab-btn {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1e1e1e;
    background-color: #f7f7f7;
    border: none;
    border-radius: 10px;
    padding: 14px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-subtab-btn.active {
    color: #164D92;
    font-weight: 500;
}

/* Grid & Cards (Press Releases / News) */
.media-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 27px;
    width: 100%;
}

.media-download-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.media-download-box {
    background-color: #F7F7F7;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 97px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #EDEDED;
}

.media-download-label {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1E1E1E;
    line-height: 1.25;
}

.media-card-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.media-card-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1E1E1E;
    margin: 0;
    line-height: 1.3;
}

.media-card-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #757575E5;
    margin: 0;
    line-height: 1.45;
}

/* Grid & Cards (Media Gallery) */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

.media-gallery-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    cursor: pointer;
}

.gallery-image-wrapper {
    width: 100%;
    aspect-ratio: 1.5;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #EDEDED;
    background-color: #F7F7F7;
    position: relative;
    display: block;
    text-decoration: none;
}

.gallery-video-player {
    cursor: pointer;
}

.gallery-video-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: block;
}

.gallery-video-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gallery-video-embed iframe,
.gallery-video-embed .gallery-video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}

.gallery-video-thumbnail .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-video-thumbnail:hover .gallery-image {
    transform: scale(1.03);
}

/* Custom play overlay — only for non-YouTube thumbnails (YouTube thumbs already include a play button). */
.gallery-video-thumbnail--custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(22, 77, 146, 0.9);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

.gallery-video-thumbnail--custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-30%, -50%);
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #ffffff;
    z-index: 3;
    pointer-events: none;
}

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

.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-card-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1E1E1E;
    margin: 0;
    line-height: 1.3;
}

.gallery-card-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #757575E5;
    margin: 0;
    line-height: 1.45;
}

.gallery-card-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gallery-card-link:hover {
    color: #164D92;
}

.media-gallery-card--video {
    cursor: default;
}

.media-gallery-card--video .gallery-card-title,
.media-gallery-card--video .gallery-card-desc {
    cursor: default;
}

/* Animations */
.media-details-panel {
    display: none;
}

.media-details-panel.active {
    display: block;
    animation: fadeInMediaPanel 0.4s ease forwards;
}

.media-subpanel {
    display: none;
}

.media-subpanel.active {
    display: block;
    animation: fadeInMediaPanel 0.4s ease forwards;
}


.media-empty-state {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #757575;
    margin: 0;
}

/* Press Releases Grid */
.media-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.media-download-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.media-download-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 120px;
    background-color: #f5f6f8;
    border-radius: 20px;
    padding: 24px 16px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    flex-direction: row;
}

.media-download-box:hover {
    background-color: #eef1f6;
}

.media-download-label {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1E1E1E;
    text-align: center;
    line-height: 1.3;
}

.media-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-card-title {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #1e1e1e;
    line-height: 1.35;
    margin: 0;
}

.media-card-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #757575;
    line-height: 1.5;
    margin: 0;
}

/* Gallery Grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.media-gallery-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery-image-wrapper {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1.5;
    background-color: #f5f6f8;
}

.gallery-image-wrapper.video-wrapper {
    aspect-ratio: 16 / 9;
}

.gallery-image,
.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-youtube-embed {
    width: 100%;
    height: 100%;
}

.media-youtube-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-card-title {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.35;
    margin: 0;
}

.gallery-card-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #757575;
    line-height: 1.5;
    margin: 0;
}

/* News tab reuses latest-news-grid from latest-news.css */
@keyframes fadeInMediaPanel {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive Overrides */
@media (max-width: 1200px) {
    .media-details-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

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

@media (max-width: 991px) {
    .media-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .media-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 479px) {

    .media-card-title,
    .gallery-card-title {
        font-size: 16px;
    }

    .media-card-desc,
    .gallery-card-desc {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .media-details-section {
        padding: 20px 0 40px 0;
    }

    .media-details-breadcrumb {
        margin-bottom: 16px;
    }

    .media-details-header {
        margin-bottom: 20px;
    }

    .media-details-tabs {
        max-width: 100%;
    }

    /* Mobile stacked layout - one card per row */
    .media-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
	
    .media-gallery-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .media-download-box {
        height: 74px;
        padding: 16px 12px;
    }

    .media-download-label {
        font-size: 14px;
    }

}
