/* ==========================================================================
   SPR BUILDERS - PREMIUM GALLERY STYLESHEET
   ========================================================================== */

:root {
  --spr-primary: #eb092e;
  --spr-primary-dark: #d90b32;
  --spr-secondary: #1a1a1a;
  --spr-accent: #ffb400;
  --spr-bg-light: #f8f9fa;
  --spr-card-border: rgba(0, 0, 0, 0.08);
  --spr-shadow-subtle: 0 6px 20px rgba(0, 0, 0, 0.05);
  --spr-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.12);
  --spr-radius-lg: 16px;
  --spr-radius-md: 10px;
  --spr-transition: all 0.3s ease-in-out;
}

.gallery-page-wrapper {
  background-color: #fbfbfd;
  color: #333333;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* Gallery Hero Banner */
.gallery-hero-banner {
  background: linear-gradient(180deg, rgba(12, 14, 22, 0.65) 0%, rgba(12, 14, 22, 0.82) 100%), url('../img/SPR PHOTOS/DSC00130.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  padding: 110px 0 95px;
  color: #ffffff;
}

.gallery-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 18px;
  border-radius: 50px;
  background: rgba(235, 9, 46, 0.20);
  border: 1px solid rgba(235, 9, 46, 0.45);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(235, 9, 46, 0.15);
}

.gallery-hero-badge span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #ff3355;
  text-transform: uppercase;
}

.gallery-hero-title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

.gallery-hero-title span {
  color: #eb092e;
  position: relative;
  text-shadow: 0 0 25px rgba(235, 9, 46, 0.4);
}

.gallery-hero-subtitle {
  font-size: 17px;
  color: #e2e8f0;
  max-width: 720px;
  line-height: 1.7;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: 24px;
}

.gallery-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}

.gallery-breadcrumbs a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gallery-breadcrumbs a:hover {
  color: #eb092e;
}

.gallery-breadcrumbs .separator {
  color: #64748b;
}

.gallery-breadcrumbs .active {
  color: #ffffff;
  font-weight: 600;
}

/* Filter Controls Pill Bar */
.gallery-filter-wrapper {
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: -30px;
  position: relative;
  z-index: 10;
}

.gallery-filter-btn {
  background: transparent;
  border: none;
  color: #555555;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--spr-transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.gallery-filter-btn:hover {
  color: var(--spr-primary);
  background: rgba(0, 0, 0, 0.04);
}

.gallery-filter-btn.active {
  background: var(--spr-primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-filter-btn .badge-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.gallery-filter-btn.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Gallery Grid & Cards */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  justify-content: center;
}

.gallery-item-card {
  background: #ffffff;
  border-radius: var(--spr-radius-lg);
  overflow: hidden;
  box-shadow: var(--spr-shadow-subtle);
  border: 1px solid var(--spr-card-border);
  transition: var(--spr-transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-item-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--spr-shadow-hover);
}

.gallery-img-container {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111116;
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item-card:hover .gallery-img-container img {
  transform: scale(1.06);
}

/* Overlay gradient & high-contrast visibility */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 9, 14, 0.94) 0%, rgba(8, 9, 14, 0.45) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.gallery-item-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay .text-white,
.gallery-overlay h6 {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.gallery-overlay small,
.gallery-overlay .text-warning {
  color: #ffca28 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95) !important;
  margin-bottom: 3px !important;
  display: block !important;
}

.gallery-category-tag {
  align-self: flex-start;
  background: var(--spr-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 20px;
}

.gallery-zoom-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--spr-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  align-self: center;
  transform: scale(0.85);
  transition: var(--spr-transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-decoration: none !important;
}

.gallery-item-card:hover .gallery-zoom-btn {
  transform: scale(1);
}

.gallery-zoom-btn:hover {
  background: var(--spr-primary);
  color: #ffffff;
}

/* Gallery Item Meta Info */
.gallery-card-body {
  padding: 18px 20px;
}

.gallery-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.gallery-card-location {
  font-size: 13px;
  color: #666666;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Video Card Styling */
.video-card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.video-thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--spr-radius-lg) var(--spr-radius-lg) 0 0;
  overflow: hidden;
}

.video-thumb-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Modal Viewer - Pure Image Only (Z-Index Fixed above Header, No Clipping) */
#galleryPreviewModal {
  z-index: 999999 !important;
}

.modal-backdrop {
  z-index: 999990 !important;
}

#galleryPreviewModal .modal-dialog.modal-gallery-dialog {
  max-width: fit-content !important;
  width: auto !important;
  margin: auto !important;
  top: 52% !important;
  transform: translateY(-50%) !important;
  position: relative !important;
}

#galleryPreviewModal .modal-content,
#galleryPreviewModal .modal-gallery-content,
#galleryPreviewModal .modal-gallery-body,
#galleryPreviewModal #modal-img-wrapper {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  position: relative !important;
}

#galleryPreviewModal .modal-gallery-img {
  max-height: 90vh !important;
  max-width: 92vw !important;
  min-width: min(700px, 90vw) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
}

#galleryPreviewModal .modal-close-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 1000000 !important;
  width: 40px !important;
  height: 40px !important;
  background: #eb092e !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  font-size: 18px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
}

#galleryPreviewModal .modal-close-btn:hover {
  background: #d90b32 !important;
  transform: scale(1.1) !important;
}

#galleryPreviewModal .modal-gallery-caption {
  display: none !important;
}

/* CTA Footer Callout */
.gallery-cta-section {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.gallery-cta-banner {
  position: relative;
  background: linear-gradient(135deg, #f51d3f 0%, #eb092e 50%, #c20020 100%) !important;
  border-radius: 24px;
  padding: 46px 48px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(224, 0, 37, 0.35), 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.gallery-cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 1;
}

.gallery-cta-banner > * {
  position: relative;
  z-index: 2;
}

.gallery-cta-tag {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ffffff !important;
  margin-bottom: 8px;
}

.gallery-cta-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff !important;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.gallery-cta-desc {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.gallery-cta-btn-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.btn-spr-accent {
  background: #ffffff !important;
  color: #eb092e !important;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 8px;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 2px solid #ffffff !important;
  text-decoration: none !important;
  line-height: 1.2;
}

.btn-spr-accent span,
.btn-spr-accent i {
  color: #eb092e !important;
}

.btn-spr-accent:hover {
  background: #f8fafc !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  color: #c90022 !important;
}

.btn-spr-accent:hover span,
.btn-spr-accent:hover i {
  color: #c90022 !important;
}

.btn-spr-outline {
  background: transparent;
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: 8px;
  transition: all 0.25s ease-in-out;
  text-decoration: none !important;
  line-height: 1.2;
}

.btn-spr-outline span,
.btn-spr-outline i {
  color: #ffffff !important;
}

.btn-spr-outline:hover {
  background: #ffffff;
  color: #eb0a34 !important;
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-spr-outline:hover span,
.btn-spr-outline:hover i {
  color: #eb0a34 !important;
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .gallery-cta-banner {
    padding: 38px 28px;
    text-align: center;
  }

  .gallery-cta-btn-group {
    justify-content: center;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .gallery-hero-title {
    font-size: 28px;
  }

  .gallery-filter-wrapper {
    border-radius: 20px;
    width: 100%;
  }

  .gallery-filter-btn {
    width: 100%;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .gallery-cta-banner {
    padding: 32px 20px;
    border-radius: 20px;
  }

  .gallery-cta-title {
    font-size: 24px;
  }

  .gallery-cta-btn-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .btn-spr-accent,
  .btn-spr-outline {
    width: 100%;
  }
}