/* =========================
   BASE
========================= */
.dancho-gallery {
    max-width: 650px;
}

/* =========================
   MAIN GALLERY
========================= */
.dancho-main {
    height: 400px;
    max-height: 70vh;
    position: relative;
}

@media (max-width: 768px) {
    .dancho-main {
        height: 320px;
    }
}

/* Slides */
.dancho-main .swiper-slide {
    width: 100% !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   IMAGES
========================= */
.dancho-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* =========================
   VIDEO THUMB + PLAYER (FIXED)
========================= */

/* Wrapper MUST be a solid box */
.dancho-main .swiper-slide.is-video .video-wrap,
.dancho-fs-main .swiper-slide.is-video .video-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Thumbnail behaves like image */
.dancho-main .swiper-slide.is-video .video-thumb,
.dancho-fs-main .swiper-slide.is-video .video-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Play button ALWAYS centered */
.dancho-main .swiper-slide.is-video .video-play,
.dancho-fs-main .swiper-slide.is-video .video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* When playing: hide thumb + play */
.is-video.is-playing .video-thumb,
.is-video.is-playing .video-play {
    display: none !important;
}

/* iframe MUST replace thumbnail (never sit beside it) */
.dancho-main .swiper-slide.is-video iframe,
.dancho-fs-main .swiper-slide.is-video iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* Orientation tuning */
.dancho-main .swiper-slide.is-video.is-portrait .video-wrap {
    max-width: 60%;
}

.dancho-main .swiper-slide.is-video.is-landscape .video-wrap {
    max-width: 100%;
}

@media (max-width: 768px) {
    .dancho-main .swiper-slide.is-video.is-portrait .video-wrap {
        max-width: 85%;
    }
}

/* =========================
   THUMBNAILS
========================= */
.dancho-thumbs {
    height: 70px;
    margin-top: 8px;
}

.dancho-thumbs .swiper-slide {
    height: 70px;
    opacity: 0.5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dancho-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.dancho-thumbs img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* =========================
   MAIN ARROWS + DOTS
========================= */
.dancho-main-prev,
.dancho-main-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    font-size: 42px;
    color: #111;
    opacity: 0.55;
    cursor: pointer;
    user-select: none;
    padding: 8px 10px;
}

.dancho-main-prev { left: 6px; }
.dancho-main-next { right: 6px; }

.dancho-main:hover .dancho-main-prev,
.dancho-main:hover .dancho-main-next {
    opacity: 0.95;
}

.dancho-main-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    z-index: 5;
    text-align: center;
}

/* =========================
   FULLSCREEN
========================= */
.dancho-fs {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.dancho-fs[hidden] {
    display: none;
}

.dancho-fs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
}

.dancho-fs-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dancho-fs-main {
    width: 100%;
    height: 100%;
}

.dancho-fs-main .swiper-wrapper,
.dancho-fs-main .swiper-slide {
    height: 100%;
}

.dancho-fs-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fullscreen images */
.dancho-fs-main img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Fullscreen videos */
.dancho-fs-main .video-wrap {
    height: 90vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dancho-fs-main .video-thumb {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.dancho-fs-main iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.dancho-fs-main .swiper-slide.is-video.is-portrait .video-wrap {
    max-width: 60vw;
}

.dancho-fs-main .swiper-slide.is-video.is-landscape .video-wrap {
    max-width: 90vw;
}

/* =========================
   FULLSCREEN CONTROLS
========================= */
.dancho-fs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 0;
    font-size: 22px;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.dancho-fs-prev,
.dancho-fs-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 56px;
    color: #fff;
    z-index: 10;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.dancho-fs-prev { left: 10px; }
.dancho-fs-next { right: 10px; }

.dancho-fs-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 10;
    text-align: center;
}
/* =========================
   VIDEO INDICATOR ON THUMBNAILS
========================= */

/* mark video thumbs */
.dancho-thumbs .swiper-slide.is-video {
  position: relative;
}

/* play icon overlay */
.dancho-thumbs .swiper-slide.is-video::after {
  content: '▶';
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  pointer-events: none;

  /* center */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
