.media-gallery {
    width: 100%;
}

.media-gallery-row {
    display: flex;
    gap: var(--media-gallery-gap, 10px);
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: var(--media-gallery-gap, 10px);
}

.media-gallery-row.is-last-row {
    justify-content: center;
}

.media-gallery-item {
    flex: none;
    min-width: 0;
    margin: 0;
}

.media-gallery-item img {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.media-gallery-item figcaption {
    margin-top: 0.35rem;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .media-gallery-row,
    .media-gallery-row.is-last-row {
        display: block;
        margin-bottom: 0;
    }

    .media-gallery-item {
        width: 100% !important;
        margin-bottom: 1rem;
    }

    .media-gallery-item img {
        width: 100%;
        height: auto !important;
        max-height: none;
        object-fit: contain;
    }
}

.media-gallery-item video {
    display: block;
    width: 100%;
    background: #000;
    border-radius: 8px;
    object-fit: contain;
}

.media-gallery-title {
    margin-top: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.media-gallery-language {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    opacity: 0.75;
}
