/**
 * BZ Homefront Gallery & Heritage Showcase - Frontend CSS
 * Exact Layout 3 replication with responsive styling
 * Author: Ankit Chauhan
 */

/* ==========================================================================
   1. Typography & Global Reset
   ========================================================================== */
.bz-heritage-section,
.bz-archive-wrapper,
.bz-gallery-slider-section {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

.bz-heritage-section *,
.bz-archive-wrapper *,
.bz-gallery-slider-section *,
.bz-lightbox-backdrop * {
  box-sizing: border-box;
}

/* ==========================================================================
   2. "Preserving Valor" 5-Card Slider Section (Layout 3)
   ========================================================================== */
.bz-heritage-section {
  padding: 64px 16px;
  background-color: transparent;
  width: 100%;
}

.bz-heritage-container {
  max-width: 1152px;
  margin: 0 auto;
}

.bz-heritage-header {
  text-align: center;
  max-width: 672px;
  margin: 0 auto 40px;
}

.bz-heritage-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7f1d1d; /* Tailwind red-900 */
  margin-bottom: 8px;
}

.bz-heritage-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 900;
  color: #0c0a09; /* stone-950 */
  margin: 0 0 12px;
}

@media (min-width: 768px) {
  .bz-heritage-title {
    font-size: 40px;
  }
}

.bz-heritage-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #57534e; /* stone-600 */
  margin: 0;
}

/* Slider Track & Viewport */
.bz-slider-wrapper {
  position: relative;
  width: 100%;
}

.bz-slider-viewport {
  overflow: hidden;
  border-radius: 16px;
  padding: 4px;
}

.bz-slider-track {
  display: flex;
  margin-left: -12px;
  margin-right: -12px;
  will-change: transform;
}

.bz-slider-slide {
  flex: 0 0 33.3333%;
  max-width: 33.3333%;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
  display: flex;
}

/* Heritage Card Design */
.bz-heritage-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d6d3d1; /* stone-300 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bz-heritage-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.bz-card-image-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #f5f5f4;
  border-bottom: 1px solid #e7e5e4;
}

.bz-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.bz-heritage-card:hover .bz-card-image-wrap img {
  transform: scale(1.06);
}

.bz-card-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  background-color: #0c0a09;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bz-card-body {
  padding: 24px;
  flex-grow: 1;
}

.bz-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  color: #0c0a09;
  line-height: 1.35;
  margin: 0 0 10px;
}

.bz-card-text {
  font-size: 12px;
  line-height: 1.7;
  color: #57534e;
  margin: 0;
}

.bz-card-footer {
  padding: 0 24px 24px;
}

.bz-card-link {
  font-size: 12px;
  font-weight: 800;
  color: #7f1d1d;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bz-card-link:hover {
  text-decoration: underline;
  color: #450a0a;
}

.bz-arrow-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.bz-card-link:hover .bz-arrow-icon {
  transform: translateX(3px);
}

/* Pagination Dots */
.bz-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.bz-dot {
  height: 8px;
  width: 8px;
  border-radius: 9999px;
  background: #d6d3d1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bz-dot:hover {
  background: #a8a29e;
}

.bz-dot.is-active {
  width: 24px;
  background: #7f1d1d;
}

/* ==========================================================================
   3. Lightbox Gallery Page (Layout 3 Heritage Edition)
   ========================================================================== */
.bz-archive-wrapper {
  background-color: #faf7f2; /* Layout 3 warm parchment background */
  color: #0c0a09;
  min-height: 100%;
  padding: 64px 16px;
}

.bz-archive-container {
  max-width: 1152px;
  margin: 0 auto;
}

/* Masthead */
.bz-archive-masthead {
  text-align: center;
  border-bottom: 2px solid #292524;
  padding-bottom: 32px;
  margin-bottom: 40px;
}

.bz-archive-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7f1d1d;
  margin-bottom: 8px;
}

.bz-archive-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 900;
  color: #0c0a09;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

@media (min-width: 640px) {
  .bz-archive-title {
    font-size: 48px;
  }
}

.bz-archive-desc {
  font-style: italic;
  font-size: 14px;
  line-height: 1.6;
  color: #44403c;
  max-width: 672px;
  margin: 0 auto 24px;
}

/* Filter Pills */
.bz-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  padding-top: 4px;
}

.bz-filter-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background-color: #ffffff;
  color: #44403c;
  border: 1px solid #d6d3d1;
  transition: all 0.2s ease;
}

.bz-filter-btn:hover {
  background-color: #f5f5f4;
  color: #0c0a09;
}

.bz-filter-btn.is-active {
  background-color: #450a0a;
  color: #ffffff;
  border-color: #450a0a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
}

/* Gallery Grid */
.bz-gallery-grid {
  display: grid;
  gap: 16px;
}

.bz-grid-cols-4 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .bz-grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .bz-grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .bz-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.bz-grid-cols-3 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .bz-grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .bz-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bz-gallery-item-wrap {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bz-gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background-color: #f1f5f9;
  cursor: pointer;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bz-gallery-item:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.bz-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.bz-gallery-item:hover img {
  transform: scale(1.06);
}

/* Hover Overlay: Clean zoom button, strictly NO text */
.bz-gallery-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.25);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bz-gallery-item:hover .bz-gallery-overlay {
  opacity: 1;
}

.bz-zoom-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  color: #b45309; /* amber-700 */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(0.75);
  transition: transform 0.2s ease;
}

.bz-zoom-btn svg {
  width: 20px;
  height: 20px;
}

.bz-gallery-item:hover .bz-zoom-btn {
  transform: scale(1);
}

/* Archival Contribution Box (Layout 3) */
.bz-archival-box {
  padding: 36px 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid #d6d3d1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
  max-width: 672px;
  margin: 56px auto 0;
}

@media (min-width: 640px) {
  .bz-archival-box {
    padding: 40px;
  }
}

.bz-archival-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #92400e;
}

.bz-archival-icon svg {
  width: 24px;
  height: 24px;
}

.bz-archival-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 800;
  color: #0c0a09;
  margin: 0 0 10px;
}

.bz-archival-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #57534e;
  margin: 0 0 20px;
}

.bz-archival-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: #0c0a09;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bz-archival-btn:hover {
  background-color: #292524;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bz-archival-btn-arrow {
  width: 14px;
  height: 14px;
  color: #fbbf24; /* amber-400 */
}

/* ==========================================================================
   4. Section 6: Continuous Photo Slider [bz_gallery slider="true"]
   ========================================================================== */
.bz-gallery-slider-section {
  padding: 64px 16px;
  background-color: #f3ede2;
  border-top: 2px solid #d6d3d1;
  border-bottom: 2px solid #d6d3d1;
}

.bz-gallery-slider-header {
  margin-bottom: 24px;
}

.bz-photo-slider-wrap {
  position: relative;
}

.bz-photo-slide {
  flex: 0 0 25%;
  max-width: 25%;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

/* ==========================================================================
   5. Interactive Lightbox Modal
   ========================================================================== */
.bz-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background-color: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bz-lightbox-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.bz-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000001;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bz-lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.bz-lightbox-close svg {
  width: 22px;
  height: 22px;
}

.bz-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bz-lightbox-nav:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.bz-lightbox-nav svg {
  width: 24px;
  height: 24px;
}

.bz-nav-prev {
  left: 20px;
}

.bz-nav-next {
  right: 20px;
}

@media (max-width: 640px) {
  .bz-nav-prev {
    left: 8px;
  }
  .bz-nav-next {
    right: 8px;
  }
}

.bz-lightbox-content {
  position: relative;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
}

.bz-lightbox-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  background-color: #000000;
}

.bz-lightbox-img {
  max-height: 70vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.bz-lightbox-caption {
  margin-top: 16px;
  text-align: center;
  color: #ffffff;
}

.bz-lightbox-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fbbf24;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.bz-lightbox-caption-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.4;
}

