/* ========================================
   GALLERY POPUP STYLES
   ======================================== */
/* CSS Custom Properties (Variables) */
:root {
  --gallery-primary-color: #00a7b5;
  --gallery-secondary-color: #333f48;
  --gallery-text-color: #333f48;
  --gallery-bg-light: #f5f5f6;
  --gallery-bg-white: #ffffff;
  --gallery-border-radius: 8px;
  --gallery-border-radius-lg: 20px;
  --gallery-transition: all 0.3s ease;
  --gallery-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --gallery-z-index: 9999;
  --gallery-z-index-overlay: 10;
}
/* ========================================
   VIEW GALLERY BUTTON
   ======================================== */
.view-gallery-btn {
  position: absolute;
  right: 60px;
  bottom: 40px;
  background: linear-gradient(
    to bottom,
    var(--gallery-primary-color) 0%,
    var(--gallery-primary-color) 50%,
    var(--gallery-secondary-color) 50%,
    var(--gallery-secondary-color) 100%
  );
  background-size: 100% 200%;
  color: var(--gallery-bg-white);
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: var(--gallery-z-index-overlay);
  transition: var(--gallery-transition);
}
.view-gallery-btn:hover {
  background-position: 0 100%;
}
/* ========================================
   GALLERY POPUP CONTAINER
   ======================================== */
.gallery-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: var(--gallery-z-index);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gallery-popup.active {
  display: flex;
}
.gallery-popup-content {
  background: var(--gallery-bg-white);
  border-radius: var(--gallery-border-radius-lg);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}
/* Custom scrollbar for gallery popup content */
.gallery-popup-content::-webkit-scrollbar {
  width: 8px;
}
.gallery-popup-content::-webkit-scrollbar-track {
  background: #333f4800;
  border-radius: 4px;
}
.gallery-popup-content::-webkit-scrollbar-thumb {
  background: #9f9f9f00;
  border-radius: 4px;
}
.gallery-popup-content::-webkit-scrollbar-thumb:hover {
  /* background: #b2b4b200; */
}
/* ========================================
   GALLERY HEADER
   ======================================== */
.gallery-popup .gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 50px 10px;
}
.gallery-popup .gallery-title {
  font-size: 44px;
  font-weight: 700;
  margin: 0;
  color: var(--gallery-text-color);
}
.gallery-popup .gallery-close-btn {
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--gallery-secondary-color);
  background: var(--gallery-bg-light);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--gallery-transition);
  margin-top: -80px;
  margin-right: -30px;
}
.gallery-popup .gallery-close-btn:hover {
  color: var(--gallery-bg-light);
  background: var(--gallery-secondary-color);
}
/* ========================================
   GALLERY MAIN CONTENT
   ======================================== */
.gallery-popup .gallery-main {
  padding: 10px 50px 50px;
  position: relative;
  overflow: visible;
}
.gallery-popup .gallery-featured {
  position: relative;
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
}
.gallery-popup .gallery-featured img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: fill;
  display: block;
  border-radius: 18px;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.gallery-popup .gallery-featured img.fade-out {
  opacity: 0;
}
/* ========================================
   GALLERY NAVIGATION DOTS
   ======================================== */
.gallery-popup .gallery-dots {
  position: absolute;
  bottom: 35px;
  left: 8%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: var(--gallery-z-index-overlay);
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}
.gallery-popup .gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  cursor: default;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: static !important;
  pointer-events: none !important;
  opacity: 0.8;
}
.gallery-popup .gallery-dot.active {
  background: #fff;
  width: 21px;
  height: 7px;
  border-radius: 24px;
  opacity: 1;
}

/* Invert colors for white background images (17th onwards) */
.gallery-popup .gallery-dot.inverted {
  background: #333f48;
}

.gallery-popup .gallery-dot.active.inverted {
  background: #333f48;
}

/* Instagram-style dots - simple and reliable */

/* Instagram-style: All dots same size, simple and clean */
/* Removed hover effect since dots are now indicators only */
/* ========================================
   GALLERY NAVIGATION ARROWS
   ======================================== */
.gallery-popup .gallery-nav-arrow {
  position: absolute;
  bottom: 25px;
  background: #fff;
  color: var(--gallery-secondary-color);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 36px;
  cursor: pointer;
  z-index: var(--gallery-z-index-overlay);
  transition: var(--gallery-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-popup .gallery-nav-arrow:hover {
  background: var(--gallery-primary-color);
  color: #fff;
}

/* Invert colors for white background images (17th onwards) */
.gallery-popup .gallery-nav-arrow.inverted {
  background: #333f48;
  color: #ffffff;
}

.gallery-popup .gallery-nav-arrow.inverted:hover {
  background: #00a7b5;
  color: #ffffff;
}
.gallery-popup .gallery-prev {
  right: 75px;
}
.gallery-popup .gallery-next {
  right: 30px;
}
/* ========================================
   GALLERY DOWNLOAD BUTTON
   ======================================== */
.gallery-popup .gallery-download-btn {
  position: absolute;
  bottom: 25px;
  right: 120px;
  background: #fff;
  color: var(--gallery-secondary-color);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: var(--gallery-z-index-overlay);
  transition: var(--gallery-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-popup .gallery-download-btn:hover {
  background: var(--gallery-primary-color);
  color: #fff;
}

/* Invert colors for white background images (17th onwards) */
.gallery-popup .gallery-download-btn.inverted {
  background: #333f48;
  color: #ffffff;
}

.gallery-popup .gallery-download-btn.inverted:hover {
  background: #00a7b5;
  color: #ffffff;
}
/* ========================================
   GALLERY THUMBNAILS
   ======================================== */
.gallery-popup .gallery-thumbnails-container {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: visible;
}
.gallery-thumb {
  border: 1px solid #b2b4b2 !important;
}
.gallery-popup .gallery-thumbnails {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  flex: 1;
}
/* Opacity gradient overlays for navigation arrows */
.gallery-popup .gallery-thumbnails::before,
.gallery-popup .gallery-thumbnails::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: var(--gallery-z-index-overlay);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.gallery-popup .gallery-thumbnails::before {
  left: 0;
  background: linear-gradient(to right, rgb(255, 255, 255), transparent);
  opacity: 0;
}
.gallery-popup .gallery-thumbnails::after {
  right: 0;
  background: linear-gradient(to left, rgb(255, 255, 255), transparent);
  opacity: 0;
}
/* Show gradients when arrows are visible */
.gallery-popup .gallery-thumbnails.has-prev::before {
  opacity: 1;
}
.gallery-popup .gallery-thumbnails.has-next::after {
  opacity: 1;
}
.gallery-popup .gallery-thumb-nav {
  background: #b2b4b2;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 34px;
  color: #fff;
  transition: var(--gallery-transition);
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: absolute;
  z-index: calc(var(--gallery-z-index) + 1);
  top: 50%;
  transform: translateY(-60%);
}
.gallery-popup .gallery-thumb-nav:hover {
  background: #818181;
}
.gallery-popup .gallery-thumb-nav.visible {
  display: flex;
}
.gallery-popup .gallery-thumb-prev {
  left: -15px;
}
.gallery-popup .gallery-thumb-next {
  right: -15px;
}
.gallery-popup .gallery-thumb-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 5px 0 15px;
}
/* Custom Scrollbar for Thumbnail Strip */
.gallery-popup .gallery-thumb-strip::-webkit-scrollbar {
  height: 0px;
}
.gallery-popup .gallery-thumb-strip::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}
.gallery-popup .gallery-thumb-strip::-webkit-scrollbar-thumb {
  background: var(--gallery-primary-color);
  border-radius: 2px;
}
/* ========================================
   GALLERY THUMBNAIL ITEMS
   ======================================== */
.gallery-popup .gallery-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--gallery-border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--gallery-transition);
  border: 2px solid transparent;
}
.gallery-popup .gallery-thumb.active {
  border: 2px solid var(--gallery-primary-color) !important;
  transition: all 0.3s ease;
}
.gallery-popup .gallery-thumb:hover {
  border: 1px solid #00a7b5 !important;
  transition: all 0.3s ease;
}
.gallery-popup .gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
.gallery-popup .gallery-download-btn:focus {
  outline: 2px solid var(--gallery-primary-color);
  outline-offset: 2px;
}
/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
.gallery-popup .gallery-thumb img {
  will-change: transform;
}
.gallery-popup .gallery-nav-arrow,
.gallery-popup .gallery-download-btn,
.gallery-popup .gallery-close-btn {
  will-change: background-color, color;
}
/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
/* Mobile and Small Tablet Styles (1px - 1000px) */
@media screen and (max-width: 1000px) {
  .view-gallery-btn {
    position: relative;
    margin-top: 10px;
    right: 0;
    bottom: 0;
  }
  .carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .gallery-popup .gallery-title {
    font-size: 32px;
  }
  .gallery-popup .gallery-header {
    padding: 30px 30px 10px;
  }
  .gallery-popup .gallery-main {
    padding: 10px 30px 30px;
  }
  .gallery-popup .gallery-close-btn {
    width: 30px;
    height: 30px;
    margin-top: -40px;
    margin-right: -10px;
  }
  .gallery-popup .gallery-featured {
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 10px;
  }
  .gallery-popup .gallery-featured + div {
    display: flex;
    justify-content: center;
    margin-top: 15px;
  }
  /* Hide navigation dots and thumbnail arrows for mobile/small tablet */
  .gallery-popup .gallery-dots,
  .gallery-popup .gallery-download-btn,
  .gallery-popup .gallery-nav-arrow {
    display: none !important;
  }
  .gallery-popup .gallery-prev,
  .gallery-popup .gallery-next {
    left: 0%;
  }
  .gallery-popup .gallery-thumb-strip::-webkit-scrollbar {
    height: 0px;
  }
}
/* Dots are now simple static indicators - no animations needed */