/* ==========================================================================
   CITY OF HARARE — GALLERY PAGE STYLESHEET (gallery.css)
   ========================================================================== */

/* 1. Header & Hero Section */
.gallery-header-section {
  background: linear-gradient(135deg, #0d3b2e 0%, #155744 50%, #1a6b54 100%);
  color: #ffffff;
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-header-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.gallery-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e2f4ea;
  margin-bottom: 1.25rem;
}

.gallery-header-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.gallery-header-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 2. Filter & Controls Section */
.gallery-controls-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.gallery-controls-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Live Search Input */
.gallery-search-box {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
}

.gallery-search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.65rem;
  border-radius: 30px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  transition: all 0.2s ease-in-out;
  outline: none;
  background-color: #f9fafb;
}

.gallery-search-box input:focus {
  border-color: #155744;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(21, 87, 68, 0.12);
}

.gallery-search-box .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 1.1rem;
  pointer-events: none;
}

/* Category Filter Pills */
.gallery-filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.15rem;
  border-radius: 30px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.gallery-filter-pill:hover {
  background: #f1f5f9;
  color: #155744;
  border-color: #cbd5e1;
}

.gallery-filter-pill.active {
  background: #155744;
  color: #ffffff;
  border-color: #155744;
  box-shadow: 0 4px 10px rgba(21, 87, 68, 0.25);
}

.gallery-filter-pill .pill-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.08);
}

.gallery-filter-pill.active .pill-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* 3. Main Gallery Container & 4-Column Grid */
.gallery-main-container {
  max-width: 1320px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Individual Card Styling */
.gallery-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.gallery-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 68%; /* 4:3 aspect ratio */
  overflow: hidden;
  background-color: #e5e7eb;
}

.gallery-card-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-card-img-wrap img {
  transform: scale(1.08);
}

/* Category Badge Overlay */
.gallery-card-category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(13, 59, 46, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

/* Zoom Hover Indicator */
.gallery-card-zoom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.gallery-card:hover .gallery-card-zoom-overlay {
  opacity: 1;
}

.gallery-card-zoom-overlay i {
  color: #ffffff;
  font-size: 2.25rem;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-zoom-overlay i {
  transform: scale(1);
}

/* Card Body */
.gallery-card-body {
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.gallery-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.gallery-card-meta {
  font-size: 0.825rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.gallery-card-desc {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.45;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty State */
.gallery-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: #f9fafb;
  border-radius: 16px;
  border: 2px dashed #e5e7eb;
  grid-column: 1 / -1;
}

.gallery-empty-icon {
  font-size: 3.5rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.gallery-empty-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* 4. Fullscreen Lightbox Modal */
.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 15, 12, 0.94);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.gallery-lightbox-content {
  position: relative;
  max-width: 1080px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-lightbox-img-wrap {
  position: relative;
  max-height: 72vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-img-wrap img {
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-caption-box {
  margin-top: 1.25rem;
  color: #ffffff;
  text-align: center;
  max-width: 750px;
}

.gallery-lightbox-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.gallery-lightbox-meta {
  font-size: 0.9rem;
  color: #a7f3d0;
  margin-bottom: 0.5rem;
}

.gallery-lightbox-desc {
  font-size: 0.925rem;
  color: #d1d5db;
  line-height: 1.5;
}

/* Lightbox Controls */
.gallery-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10000;
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10000;
}

.gallery-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
  left: 1.25rem;
}

.gallery-lightbox-next {
  right: 1.25rem;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 840px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-header-title {
    font-size: 2.15rem;
  }
  .gallery-controls-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .gallery-search-box {
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-header-section {
    padding: 2.75rem 1rem 2.25rem;
  }
  .gallery-header-title {
    font-size: 1.85rem;
  }
  .gallery-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}
