/* Portfolio thumbnail hover effect - matches ccac.gov */
.ccac-portfolio-gallery a.glightbox {
  position: relative;
  display: flex;
  transition: 0.2s ease-in-out;
}

.ccac-portfolio-gallery a.glightbox::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5) url('/themes/custom/gallatin2/img/search.svg') no-repeat center center;
  background-size: 20%;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 1;
}

.ccac-portfolio-gallery a.glightbox:hover::before,
.ccac-portfolio-gallery a.glightbox:focus::before {
  opacity: 1;
}

.ccac-portfolio-gallery a.glightbox img {
  display: block;
}

/* Match Colorbox styling from ccac.gov */
.glightbox-clean .gslide-description {
  background: rgba(0, 0, 0, 0.7) !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 10px 15px !important;
}

.glightbox-clean .gdesc-inner {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.glightbox-clean .gslide-title {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: normal !important;
  margin: 0 !important;
  flex: 1 !important;
}

/* Counter display "X of Y" - matches cboxCurrent from Colorbox */
.glightbox-clean .gslide-counter {
  color: #fff !important;
  font-size: 14px !important;
  white-space: nowrap !important;
  margin-left: 15px !important;
}

/* Navigation arrows - always visible including mobile */
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 44px !important;
  height: 44px !important;
}

/* Mobile: position buttons at top left, aligned with close button */
@media (max-width: 768px) {
  .glightbox-clean .gnext,
  .glightbox-clean .gprev {
    position: fixed !important;
    top: 15px !important;
    bottom: auto !important;
    transform: none !important;
    z-index: 9999 !important;
  }

  .glightbox-clean .gprev {
    left: 15px !important;
  }

  .glightbox-clean .gnext {
    left: 65px !important;
    right: auto !important;
  }
}

/* Desktop: dark semi-transparent buttons with white arrows */
@media (min-width: 769px) {
  .glightbox-clean .gnext,
  .glightbox-clean .gprev {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-radius: 4px !important;
  }

  .glightbox-clean .gnext svg,
  .glightbox-clean .gprev svg {
    fill: #fff !important;
  }

  .glightbox-clean .gnext svg path,
  .glightbox-clean .gprev svg path {
    fill: #fff !important;
  }

  .glightbox-clean .gnext:hover,
  .glightbox-clean .gprev:hover {
    background-color: rgba(0, 0, 0, 0.7) !important;
  }
}

/* Close button styling */
.glightbox-clean .gclose {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-radius: 4px !important;
}

.glightbox-clean .gclose:hover {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Image container */
.glightbox-clean .gslide-inner-content {
  position: relative !important;
}

/* Ensure description is over image */
.glightbox-clean .gslide-media {
  position: relative !important;
}
