/* ==========================================================================
   Section: Gallery Showcase
   - High-definition static menu poster showcase
   - Floating circular action buttons with hover animations
   - Expanding active pagination pill dots & slide counter
   - Glassmorphism badge overlays & fully responsive mobile framing
   ========================================================================== */

.gallery-section {
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FCF7 50%, #F4F9F2 100%);
  padding: 70px 0 75px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 90px;
}

/* Subtle background accent glow */
.gallery-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 200, 55, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.gallery-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 77, 44, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

/* Section Header */
.gallery-header-block {
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
}

.gallery-badge-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.gallery-subtitle-script {
  font-family: var(--font-script);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--hero-green);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Gallery Showcase Layout & Controls (2 Images Displayed by Default)
   -------------------------------------------------------------------------- */
.gallery-showcase-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Circular Previous & Next Action Buttons */
.gallery-nav-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-green);
  color: #FFFFFF !important;
  border: 2px solid rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 6px 18px rgba(11, 77, 44, 0.3);
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  z-index: 15;
  padding: 0;
  line-height: 1;
  outline: none;
}

.gallery-nav-btn:hover {
  background: var(--dark-green);
  color: #FFFFFF !important;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 24px rgba(8, 54, 30, 0.38);
  border-color: #FFFFFF;
}

.gallery-nav-btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 10px rgba(11, 77, 44, 0.22);
}

.gallery-nav-btn:focus-visible {
  outline: 3px solid var(--brand-lime);
  outline-offset: 3px;
}

/* Hide desktop arrows and pagination dots if 2 or fewer images */
@media (min-width: 768px) {
  .gallery-showcase-container.has-two-or-less .gallery-nav-btn {
    display: none !important;
  }
  .gallery-showcase-container.has-two-or-less + .gallery-controls-footer {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Showcase Viewport, Track & Dual Cards
   -------------------------------------------------------------------------- */
.gallery-slider-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 8px 4px;
  touch-action: pan-y pinch-zoom;
}

.gallery-track {
  display: flex;
  position: relative;
  width: 100%;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* 2 slides visible simultaneously by default on desktop/tablet */
.gallery-slide {
  flex: 0 0 calc(50% - 12px);
  max-width: calc(50% - 12px);
  width: calc(50% - 12px);
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-card-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 14px 38px -8px rgba(11, 77, 44, 0.16), 0 4px 14px rgba(0, 0, 0, 0.04);
  border: 2px solid rgba(11, 77, 44, 0.08);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  user-select: none;
}

.gallery-card-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px -8px rgba(11, 77, 44, 0.22), 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Glassmorphic Floating Badge on Poster */
.gallery-badges-row {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  z-index: 10;
  pointer-events: none;
}

.gallery-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(7, 43, 24, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  letter-spacing: 0.3px;
}

.gallery-poster-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 20px;
}

/* --------------------------------------------------------------------------
   Pagination Indicators
   -------------------------------------------------------------------------- */
.gallery-controls-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.gallery-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gallery-dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-pill);
  background-color: #CBD5E1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.gallery-dot:hover {
  background-color: #94A3B8;
  transform: scale(1.15);
}

.gallery-dot.active {
  width: 32px;
  background-color: var(--primary-green);
  box-shadow: 0 2px 8px rgba(11, 77, 44, 0.35);
}

.gallery-dot:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Gallery Badges & Empty State
   -------------------------------------------------------------------------- */
.gallery-title-pill {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--primary-green) !important;
  border-color: rgba(11, 77, 44, 0.15) !important;
}

.gallery-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 15px;
  position: relative;
  z-index: 2;
}

.gallery-empty-msg {
  background: #ffffff;
  border-radius: 16px;
  border: 1px dashed rgba(11, 77, 44, 0.25);
  box-shadow: 0 6px 20px rgba(11, 77, 44, 0.05);
  padding: 22px 32px;
  color: #1b4b2e;
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transition: all 0.3s ease;
}

.gallery-empty-msg:hover {
  border-color: var(--primary-green);
  box-shadow: 0 10px 24px rgba(11, 77, 44, 0.1);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Responsive Adaptations (Tablet & Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .gallery-section {
    padding: 55px 0 60px;
  }

  .gallery-badge-title {
    font-size: 2rem;
  }

  .gallery-subtitle-script {
    font-size: 1.45rem;
  }

  .gallery-showcase-container {
    max-width: 760px;
  }

  .gallery-track {
    gap: 16px;
  }

  .gallery-slide {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
    width: calc(50% - 8px);
  }
}

@media (max-width: 767.98px) {
  .gallery-section {
    padding: 40px 0 45px;
    scroll-margin-top: 75px;
  }

  .gallery-header-block {
    margin-bottom: 20px;
  }

  .gallery-badge-title {
    font-size: 1.75rem;
  }

  .gallery-subtitle-script {
    font-size: 1.25rem;
  }

  /* Centered mobile container with dedicated breathing room */
  .gallery-showcase-container {
    position: relative;
    display: block;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
  }

  .gallery-slider-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2px 0;
    border-radius: 18px;
  }

  .gallery-track {
    gap: 16px;
    position: relative;
  }

  /* 1 slide visible on mobile for crisp full-width presentation */
  .gallery-slide {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    padding: 0;
  }

  .gallery-card-wrapper {
    position: relative;
    width: 100%;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px -4px rgba(11, 77, 44, 0.18);
    border: 2px solid rgba(11, 77, 44, 0.08);
    overflow: hidden;
  }

  .gallery-poster-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 16px;
  }

  /* Floating circular navigation buttons positioned at container edges */
  .gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(11, 77, 44, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
    z-index: 20;
    font-size: 1.15rem;
  }

  .gallery-nav-btn:hover {
    background: var(--dark-green);
    transform: translateY(-50%) scale(1.06);
  }

  .gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
  }

  .gallery-nav-btn.prev-btn {
    left: 2px;
  }

  .gallery-nav-btn.next-btn {
    right: 2px;
  }

  .gallery-badges-row {
    top: 10px;
    left: 10px;
  }

  .gallery-counter-pill {
    font-size: 0.74rem;
    padding: 4px 10px;
  }
}

@media (max-width: 400px) {
  .gallery-showcase-container {
    padding: 0 6px;
  }

  .gallery-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .gallery-nav-btn.prev-btn {
    left: 0;
  }

  .gallery-nav-btn.next-btn {
    right: 0;
  }
}

