/* ============================= */
/*   CLEANED + UPDATED GALLERY CSS   */
/* ============================= */

/* Wrapper */
.gallery-wrap {
  background: #f3f3f3;
  padding: 2rem 0;
}

/* Desktop Grid: Thumbs Left, Stage Right */
.gallery-grid {
  display: grid;
  grid-template-columns: var(--thumb-width) 1fr;
  gap: 24px;
  align-items: start;
}

/* -------------------------------------------------- */
/* THUMBNAILS (Used by BOTH Photo + Video Galleries)  */
/* -------------------------------------------------- */
.gallery-thumbs,
.video-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-thumbs img,
.video-thumbs img {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
}

.gallery-thumbs img.active,
.video-thumbs img.active {
  border-color: #FFCF01;
}

/* -------------------------------------------------- */
/* MAIN DISPLAY AREA (Stage)                           */
/* -------------------------------------------------- */
.gallery-main .stage img,
.video-stage iframe,
.video-stage img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.stage,
.video-stage {
  width: 100%;
}

/* -------------------------------------------------- */
/* CONTROLS (Prev/Next, Counter, Progress Bar)         */
/* -------------------------------------------------- */
.gallery-controls {
  background: #000;
  color: #fff;
  border-radius: 6px;
  margin-top: 12px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-controls .btn {
  color: #fff;
  border: none;
  background: transparent;
}

.gallery-controls .btn:hover {
  color: #FFCF01;
}

.gallery-controls .counter {
  min-width: 70px;
  text-align: center;
}

.gallery-controls .progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.gallery-controls .progress-bar {
  background: #FFCF01;
  width: 0%;
  height: 100%;
  transition: width 0.25s ease;
}

/* -------------------------------------------------- */
/* RESPONSIVE LAYOUT                                  */
/* -------------------------------------------------- */
@media (max-width: 768px) {
  /* Single column layout */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* Stage first */
  .gallery-main {
    order: 1;
    width: 100%;
  }

  /* Thumbnails under stage */
  .gallery-thumbs,
  .video-thumbs {
    order: 2 !important;
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding: 10px 0;
    width: 100%;
  }

  .gallery-thumbs img,
  .video-thumbs img {
    width: 120px !important;
    height: auto;
    flex: 0 0 auto;
  }
}
/* ---------------------------- */
/*  MOBILE PHONES + TABLET PORTRAIT */
/* ---------------------------- */

@media (max-width: 992px) and (orientation: portrait) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-main {
    order: 1;
    width: 100%;
  }

  .gallery-thumbs,
  .video-thumbs {
    order: 2 !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    width: 100%;
  }

  .gallery-thumbs img,
  .video-thumbs img {
    width: 120px !important;
    flex: 0 0 auto;
  }
}

/* ---------------------------- */
/*  TABLET LANDSCAPE + DESKTOP */
/* ---------------------------- */

@media (min-width: 769px) and (orientation: landscape) {
  .gallery-grid {
    grid-template-columns: var(--thumb-width) 1fr;
  }

  .gallery-thumbs,
  .video-thumbs {
    flex-direction: column !important;
    overflow: visible;
  }

  .gallery-thumbs img,
  .video-thumbs img {
    width: 100% !important;
  }
}

/* ====================================================== */
/* PHOTO GALLERY — TWO COLUMN THUMBS FOR DESKTOP/TABLET LS */
/* ====================================================== */

@media (min-width: 993px), 
       (min-width: 768px) and (orientation: landscape) {
  
  .gallery-thumbs.two-column {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
  }

  .gallery-thumbs.two-column img {
    width: 100% !important;
    height: auto;
    flex: none !important;
    border-radius: 6px;
  }
}
/* ====================================================== */
/* VIDEO GALLERY — TWO COLUMN THUMBS (DESKTOP & TABLET LS) */
/* ====================================================== */

@media (min-width: 993px),
       (min-width: 768px) and (orientation: landscape) {

  .video-thumbs.two-column {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px !important;
  }

  .video-thumbs.two-column img {
    width: 100% !important;
    height: auto;
    flex: none !important;
    border-radius: 6px;
  }
}
