/* ---- MEDIA ---- */
.flex-pic-media {
    position: relative;
    width: 100%;
    overflow: hidden;
	z-index: 999 !important;
}

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

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

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

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* NAVIGATION */

.media-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    background: rgba(0,0,0,0.2);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s;
}

.media-nav {
    position: absolute;
    z-index: 9999; /* 🔥 important */
    pointer-events: auto;
}

.media-nav.prev { left: 10px; }
.media-nav.next { right: 10px; }

.media-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

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

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

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

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


/* ---- 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;
    }
}