/* Gallery page styling - Harmonized with Deeppak Joshii visual theme */
.gallery-section {
  padding-bottom: 90px;
}

.gallery-header {
  margin-bottom: 35px;
}

.gallery-header h1 {
  margin-bottom: 15px;
  font-size: clamp(2.6rem, 4.4vw, 4.4rem);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 25px;
  color: var(--ink);
  font: 500 13px/1.4 var(--sans);
  cursor: pointer;
  transition: all 0.22s ease;
}

.gallery-filter-btn:hover {
  border-color: var(--gold);
  background: #f7f5ed;
  color: var(--forest);
}

.gallery-filter-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 61, 49, 0.22);
}

.gallery-filter-btn .filter-icon {
  width: 14px;
  height: 14px;
}

.gallery-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.07);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
}

.gallery-filter-btn.active .gallery-count {
  background: rgba(255, 255, 255, 0.22);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(21, 63, 53, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: #c9b48c;
  box-shadow: 0 16px 38px rgba(21, 63, 53, 0.1);
}

.gallery-card[hidden] {
  display: none !important;
}

/* Media Wrap */
.gallery-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #20352a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
  cursor: pointer;
}

.gallery-card:hover .gallery-image {
  transform: scale(1.035);
}

.gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

.gallery-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  background: rgba(255, 253, 246, 0.94);
  color: var(--forest);
  font: 700 10px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(195, 160, 93, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-duration-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(16, 61, 49, 0.92);
  color: #f7eed8;
  font: 600 11px/1 var(--sans);
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid rgba(195, 160, 93, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.gallery-zoom-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 61, 49, 0.45);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.28s ease, backdrop-filter 0.28s ease;
  backdrop-filter: blur(2px);
  z-index: 2;
}

.gallery-zoom-btn span {
  font: 600 12px var(--sans);
  letter-spacing: 0.06em;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.gallery-media-wrap:hover .gallery-zoom-btn {
  opacity: 1;
}

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

.gallery-card-eyebrow {
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 9px;
}

.gallery-card-title {
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 12px;
}

.gallery-card-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.gallery-tag-pill {
  font-size: 11px;
  line-height: 1.3;
  padding: 4px 9px;
  background: #f1eee4;
  color: #495850;
  border-radius: 12px;
  border: 1px solid #dedbc9;
}

.gallery-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: auto;
  gap: 12px;
}

.gallery-open-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--forest);
  font: 600 13px var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.gallery-open-action:hover {
  color: var(--copper);
  text-decoration: underline;
}

.gallery-format-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gallery-book-link {
  font: 500 13px var(--sans);
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: transform 0.2s;
}

.gallery-book-link:hover {
  color: var(--forest);
  transform: translateX(3px);
}

/* Consultation Banner */
.gallery-consult-banner {
  margin-top: 60px;
  background: linear-gradient(135deg, #103d31 0%, #174b3d 100%);
  border-radius: 10px;
  padding: 48px;
  color: #fffefa;
  border: 1px solid #c9b48c;
  box-shadow: 0 12px 36px rgba(16, 61, 49, 0.16);
  position: relative;
  overflow: hidden;
}

.gallery-consult-banner:before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(195, 160, 93, 0.25);
  box-shadow: 0 0 0 30px rgba(195, 160, 93, 0.08);
  pointer-events: none;
}

.gallery-consult-banner .eyebrow {
  color: #e2c58a;
}

.gallery-consult-banner h2 {
  font-size: clamp(1.9rem, 2.9vw, 2.8rem);
  color: #fffefa;
  margin-bottom: 12px;
  max-width: 760px;
}

.gallery-consult-banner p {
  font-size: 15px;
  line-height: 1.7;
  color: #d6e2dc;
  max-width: 650px;
  margin-bottom: 25px;
}

.banner-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery-consult-banner .button {
  background: #dfc58c;
  color: #163b2c;
  border-color: #dfc58c;
  font-weight: 600;
}

.gallery-consult-banner .button:hover {
  background: #f1dfb3;
}

.gallery-consult-banner .button.secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.gallery-consult-banner .button.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Lightbox Modal */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 24, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox-container {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid #d8c7a2;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  max-width: 960px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: lightboxPop 0.24s ease-out;
}

@keyframes lightboxPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
}

.lightbox-category-badge {
  font: 700 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  background: #ebe7d9;
  padding: 5px 10px;
  border-radius: 4px;
}

.lightbox-close {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

.lightbox-stage {
  position: relative;
  background: #0d1a14;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  max-height: 62vh;
  overflow: hidden;
}

.lightbox-image {
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
  display: block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d9d0bc;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 5;
}

.lightbox-nav:hover {
  background: #fff;
  color: var(--forest);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fffdf9;
}

.lightbox-title {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--ink);
}

.lightbox-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 620px;
}

.lightbox-cta {
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 1050px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-consult-banner {
    padding: 30px 22px;
  }
  .lightbox-container {
    max-height: 96vh;
  }
  .lightbox-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .lightbox-cta {
    width: 100%;
  }
  .lightbox-cta .button {
    width: 100%;
  }
  .lightbox-nav {
    width: 38px;
    height: 38px;
  }
  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
}
