/* Responsive Gallery Plugin Styles */
.responsive-gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gallery-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  overflow: hidden; /* important: clip left/right halves */
  border-radius: 12px;
  height: auto; /* Ensure wrapper height matches track height so nav can vertical-center accurately */
}

/* Complete rewrite of gallery track to use horizontal flexbox layout */
.gallery-track {
  position: relative;
  width: 100%;
  height: 480px;
}

/* Rewrite slide positioning to use flexbox instead of absolute positioning */
.gallery-slide {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  aspect-ratio: 4 / 3; /* consistent card ratio */
  width: 34vw; /* responsive sizing */
  max-width: 400px;
  min-width: 260px;
  transition: transform .45s ease, opacity .35s ease, left .45s ease;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* prevent overflow from mixed sizes */
  object-position: center;
  display: block;
  transition: opacity 0.3s ease;
}

.gallery-slide img[src="/placeholder.svg"] {
  opacity: 0;
}

/* Desktop Layout - 3 images visible horizontally */
@media (min-width: 768px) {
  .gallery-track {
    height: 400px;
    gap: 30px;
  }

  /* Side images - half visible with faded effect */
  .gallery-slide.prev {
    left: 0%;
    opacity: 0.45;
    z-index: 1;
  }

  /* Center image - full size and prominent */
  .gallery-slide.active {
    left: 50%;
    transform: translate(-50%, -50%) scale(1); /* only center zooms */
    opacity: 1;
    z-index: 3;
    width: 40vw;
    max-width: 520px;
  }

  /* Next image - anchored to right edge so only half shows */
  .gallery-slide.next {
    left: 100%;
    opacity: 0.45;
    z-index: 1;
  }

  /* Hide other images completely */
  .gallery-slide.hidden {
    display: none !important;
  }
}

/* Mobile Layout - 1 image visible */
@media (max-width: 767px) {
  .gallery-track {
    height: 340px;
  }
  .gallery-slide {
    width: 85vw;
    max-width: 380px;
    min-width: 240px;
  }

  /* Hide every non-active slide on mobile to prevent layering */
  .gallery-slide:not(.active) {
    display: none !important;
  }

  .gallery-slide.active {
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 3;
  }

  /* Comfortable arrow size/position on small screens */
  .gallery-nav {
    width: 56px;
    height: 56px;
  }
  .gallery-nav i {
    font-size: 28px;
  }
}

/* Kill any pseudo-elements that caused the dot and style FA icons directly */
.responsive-gallery-container .gallery-wrapper .gallery-nav {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important; /* FA icon has its own circle */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999; /* ensure on top of slides */
  width: 64px;
  height: 64px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Kill any pseudo elements that may draw the tiny dot */
.responsive-gallery-container .gallery-wrapper .gallery-nav::before,
.responsive-gallery-container .gallery-wrapper .gallery-nav::after {
  content: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Size/tint Font Awesome icon (50% transparent) */
.responsive-gallery-container .gallery-wrapper .gallery-nav i {
  font-size: 40px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  display: inline-block;
}

/* Hover/focus increase visibility a bit */
.responsive-gallery-container .gallery-wrapper .gallery-nav:hover i {
  color: rgba(0, 0, 0, 0.85);
}

.responsive-gallery-container .gallery-wrapper .gallery-prev {
  left: 16px;
}
.responsive-gallery-container .gallery-wrapper .gallery-next {
  right: 16px;
}

/* Mobile sizing */
@media (max-width: 767px) {
  .responsive-gallery-container .gallery-wrapper .gallery-nav {
    width: 56px;
    height: 56px;
  }
  .responsive-gallery-container .gallery-wrapper .gallery-nav i {
    font-size: 34px;
  }
}

/* Accessibility improvements */
.gallery-nav:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.gallery-button:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Smooth animations for better UX */
@media (prefers-reduced-motion: reduce) {
  .gallery-slide,
  .gallery-nav,
  .gallery-button {
    transition: none;
  }
}

/* CTA Button */
.gallery-cta {
  text-align: center;
  margin-top: 30px;
}

.gallery-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(135deg, #a67c52, #8b6f47);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(166, 124, 82, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-button:hover {
  background: linear-gradient(135deg, #8b6f47, #a67c52);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(166, 124, 82, 0.4);
  color: white;
  text-decoration: none;
}

.gallery-button:active {
  transform: translateY(0);
}
/* Remove the extra white circle background from nav buttons */
.responsive-gallery-container .gallery-wrapper .gallery-nav {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
