/* ---- MEDIA ---- */
.flex-pic-media {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.media-track {
    display: flex;
    transition: transform 0.35s ease;
}

.media-item {
    min-width: 100%;
}

/* ---- IMAGES ---- */
.media-item img {
    width: 100%;
    display: block;
    cursor: zoom-in;
}

/* enable cropping */
.media-item {
    overflow: hidden;
    position: relative;
}

/* smooth transform */
.media-item img {
    transition: transform 0.25s ease;
    cursor: zoom-in;
    touch-action: none;
}

.media-item img {
    width: 100%;
    display: block;
    transform-origin: center center;
}

/* zoomed state */
.media-item.zoomed img {
    cursor: grab;
}


/* ---- VIDEO ---- */
.media-video {
    position: relative;
}

.media-video video {
    width: 100%;
    display: block;
    cursor: pointer;
}

/* ---- PLAY BUTTON ---- */
.media-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;

    background: rgba(0,0,0,0.35);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: opacity 0.25s ease;
}

.media-play-btn::before {
    content: '';
    border-left: 18px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* ---- PAUSE BARS ---- */
.media-pause-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.media-pause-overlay::before,
.media-pause-overlay::after {
    content: '';
    width: 6px;
    height: 28px;
    background: rgba(255,255,255,0.25);
    margin: 0 4px;
    border-radius: 2px;
}

/* ---- STATES ---- */
.media-video.playing .media-play-btn {
    opacity: 0;
    pointer-events: none;
}

.media-video.playing .media-pause-overlay {
    opacity: 1;
}

/* ---- SQUARE NAV ---- */
.media-dots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

/* square items */
.media-dots span {
    width: 12px;
    height: 12px;
    background: #bbb;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

/* hover (desktop) */
.media-dots span:hover {
    transform: scale(1.2);
}

/* active */
.media-dots span.active {
    background: #333;
    transform: scale(1.2);
}

/* ---- ZOOM ---- */
.media-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.media-zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    main .content-wrapper .article .flex-pic-left,
    main .content-wrapper .article .flex-pic-right {
        float: none;
        max-width: 100%;
        margin: 0 0 15px 0;
    }

    .media-dots span {
        width: 10px;
        height: 10px;
    }
}