/* News Item Layout */
.track-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Media wrapper for both images and videos */
.media-wrapper {
    width: 100%;
}

/* Image styles */
.track-cover-wrapper {
    width: 100%;
}

.track-cover {
    width: 100%;
    height: auto;
    border-radius: 6px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.track-cover.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    cursor: zoom-out;
}

/* Video container styles */
.video-container {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}

.news-video {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    background: #000;
}

/* Portrait layout */
.track-main.portrait {
    flex-direction: column;
}

@media (min-width: 768px) {
    .track-main.portrait {
        flex-direction: row;
    }

    .track-main.portrait .media-wrapper {
        width: 300px;
        flex-shrink: 0;
        margin-right: 20px;
    }

    .track-main.portrait .track-content-wrapper {
        flex: 1;
    }

    .track-main.portrait .track-cover {
        width: 100%;
    }

    .track-main.portrait .news-video {
        width: 300px;
        height: auto;
    }
}

/* Landscape layout */
.track-main.landscape {
    flex-direction: column;
}

@media (min-width: 768px) {
    .track-main.landscape .media-wrapper {
        width: 100%;
        margin-bottom: 20px;
    }

    .track-main.landscape .track-cover {
        width: 100%;
        max-height: 400px;
        object-fit: cover;
    }

    .track-main.landscape .news-video {
        width: 100%;
        max-height: 400px;
    }

    .track-main.landscape iframe.news-video {
        height: 400px;
    }
}

/* Video container specific styles */
.track-main.video-container {
    flex-direction: column;
}

.track-main.video-container .media-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.track-main.video-container .news-video {
    width: 100%;
    max-height: 400px;
}

@media (min-width: 768px) {
    .track-main.video-container iframe.news-video {
        height: 400px;
    }

    .track-main.video-container video.news-video {
        max-height: 400px;
    }
}

/* Video error message */
.video-error {
    padding: 20px;
    background: #2a2a2a;
    border-radius: 6px;
    text-align: center;
    color: #ccc;
}

.video-error a {
    color: #4FC3F7;
    text-decoration: none;
}

.video-error a:hover {
    text-decoration: underline;
}

/* Content wrapper */
.track-content-wrapper {
    width: 100%;
}

.track-meta-details {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

.track-meta-details p {
    margin-bottom: 15px;
}

/* Footer section for keywords and links */
.track-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Keywords styling */
.keywords-container {
    margin-bottom: 15px;
    font-size: 13px;
}

.keyword {
    color: #4FC3F7;
    cursor: pointer;
    font-weight: 500;
}

.keyword:hover {
    text-decoration: underline;
}

/* Streaming Links */
.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Waveform container */
.waveform-container {
    width: 100%;
    height: auto;
    min-height: 70px;
    background: #212020;
    border-radius: 6px;
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

/* Image overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
    display: none;
}

.image-overlay.active {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .track-main.portrait,
    .track-main.landscape,
    .track-main.video-container {
        flex-direction: column;
    }

    .media-wrapper {
        width: 100%;
        margin-bottom: 15px;
    }

    .track-cover,
    .news-video {
        width: 100%;
        height: auto;
    }

    iframe.news-video {
        height: 250px;
    }

    video.news-video {
        max-height: 250px;
    }
}