/* ============================================================
   gallery.css  —  Gallery Page Styles
   NGO Theme · Yuva Shakti Samiti
   Depends on: variables.css, global.css, header-footer.css
   ============================================================ */

/* ===================================
   HERO
=================================== */
.gallery-hero {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background: url("https://manavkartavya.org/wp-content/uploads/2018/08/gallery-banner.jpg")
    center/cover no-repeat;
  filter: grayscale(25%);
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 10, 10, 0.82) 0%,
    rgba(10, 10, 10, 0.55) 60%,
    rgba(10, 10, 10, 0.2) 100%
  );
}

.gallery-hero-title {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
}

.gallery-hero-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  line-height: 1.75;
  max-width: 480px;
}

/* ===================================
   FILTER TABS — Pill Style
=================================== */
.gallery-filter-section {
  background: var(--color-white);
}

.gallery-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--color-bg);
  border-radius: 10px;
  padding: 0px;
  margin: 0 auto 35px;
  border-bottom: none;
}

.gallery-tab {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1.22rem;
  font-weight: 500;
  color: var(--color-muted);
  padding: 10px 30px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition:
    color 0.2s,
    background 0.2s;
  margin-bottom: 0;
  border-bottom: none;
}
.gallery-tab:hover {
  color: var(--color-primary);
  background: rgba(0, 0, 0, 0.05);
}

.gallery-tab.active {
  background: var(--color-primary); /* #E8501A ya brand red/orange */
  color: #ffffff;
  font-weight: 600;
  border-bottom-color: transparent;
}

/* ===================================
   PHOTO GRID — Masonry-style CSS Grid
=================================== */
/* ===================================
   PHOTO GRID — Bootstrap Row/Col
=================================== */
.gallery-grid-section {
  background: var(--color-white);
}

/* Image wrapper — fixed height, clean card */
.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: var(--r, 10px);
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

/* Hover overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(61 57 56 / 66%) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--r, 10px);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay p {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  letter-spacing: 0.5px;
  word-spacing: 2px;
}

.gallery-zoom {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.gallery-item:hover .gallery-zoom {
  background: rgba(255, 255, 255, 0.35);
}

.gallery-no-results {
  text-align: center;
  color: var(--color-muted);
  padding: 60px 0;
  font-size: 1rem;
}

/* ===================================
   VIDEO SECTION
=================================== */
.gallery-video-section {
  background: var(--color-bg);
  padding: var(--section-padding) 0;
}

.gallery-section-title {
  font-family: var(--font-heading);
  font-size: 50px;
  font-weight: 700;
  color: var(--color-text);
}
.video-card {
  background: var(--color-white);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

/* Always show a subtle play indicator */
.video-thumb::after {
  content: "▶";
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(222, 56, 8, 0.4);
}

.video-info {
  padding: 18px 20px;
}

.video-info h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.video-info p {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.5;
}

/* ===================================
   LIGHTBOX
=================================== */
.lightbox-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1100;
}

.lightbox-backdrop.active {
  display: block;
}

.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-lightbox.active {
  display: flex;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin-top: 12px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
  z-index: 1300;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(222, 56, 8, 0.7);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}
.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===================================
   VIDEO MODAL
=================================== */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal.active {
  display: flex;
}

.video-modal-inner {
  width: 100%;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 1300;
}

.video-modal-inner iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  z-index: 1400;
  transition: background 0.2s;
}

.video-modal-close:hover {
  background: rgba(222, 56, 8, 0.7);
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 991px) {
  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }
}

@media (max-width: 575px) {
    .gallery-hero {
        height: 250px;
    }
    
    .gallery-video-section {
        padding :35px 0;
    }
    
    .gallery-section-title {
        font-size: 32px;
    }
  .gallery-masonry {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .gallery-item--tall {
    grid-row: span 1;
  }

  .gallery-tabs {
    gap: 6px;
  }

  .gallery-tab {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
  
  
}
