/* ================================================================
   GALLERY PAGE CSS
   ================================================================ */

/* ---- Hero ---- */
.gallery-hero { position: relative; overflow: hidden; }

.gallery-hero-floats { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.ghf {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  animation: floatBob 4s ease-in-out infinite;
}

.ghf-1 { top: 18%; left: 8%;  background: rgba(26,159,212,0.15); color: rgba(26,159,212,0.7); animation-delay: 0s;   }
.ghf-2 { top: 60%; left: 5%;  background: rgba(91,173,47,0.15);  color: rgba(91,173,47,0.7);  animation-delay: 1s;   }
.ghf-3 { top: 20%; right: 8%; background: rgba(91,173,47,0.15);  color: rgba(91,173,47,0.7);  animation-delay: 0.5s; }
.ghf-4 { top: 65%; right: 6%; background: rgba(26,159,212,0.15); color: rgba(26,159,212,0.7); animation-delay: 1.5s; }

@keyframes floatBob {
  0%,100% { transform: translateY(0);    }
  50%      { transform: translateY(-12px); }
}

.gallery-hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.ghs { text-align: center; }
.ghs span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: white;
  line-height: 1;
}
.ghs small {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ghs-sep {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.2);
}

/* ---- Gallery Section ---- */
.gallery-page-section { background: var(--light-bg); }

/* Filter Bar */
.gallery-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.gfilter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: white;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.gfilter:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(26,159,212,0.05);
}

.gfilter.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 4px 16px rgba(26,159,212,0.35);
}

/* Gallery count */
.gallery-count {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 32px;
}

.gallery-count span {
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
}

/* ---- Masonry Grid ---- */
.gallery-masonry {
  columns: 4;
  column-gap: 16px;
}

.gitem {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gitem-inner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  line-height: 0;
}

.gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
}

.gitem-tall img  { aspect-ratio: 3 / 4; }
.gitem-wide img  { aspect-ratio: 16 / 9; }

/* Hover effects */
.gitem:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.18); }
.gitem:hover img { transform: scale(1.08); }

/* Overlay */
.gitem-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,20,40,0.88) 0%, rgba(10,20,40,0.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius-lg);
}

.gitem:hover .gitem-overlay { opacity: 1; }

.gitem-info { margin-top: auto; }

.gitem-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.gitem-cat.women    { background: rgba(26,159,212,0.85); color: white; }
.gitem-cat.health   { background: rgba(239,68,68,0.85);  color: white; }
.gitem-cat.education{ background: rgba(91,173,47,0.85);  color: white; }
.gitem-cat.welfare  { background: rgba(139,92,246,0.85); color: white; }

.gitem-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 3px;
  line-height: 1.4;
}

.gitem-info p {
  font-size: 11.5px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

/* Zoom button */
.gitem-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.7);
}

.gitem:hover .gitem-zoom {
  opacity: 1;
  transform: scale(1);
}

.gitem-zoom:hover {
  background: var(--blue);
  border-color: var(--blue);
  transform: scale(1.1) !important;
}

/* Filter animation */
.gitem.hide {
  display: none;
}

.gitem.show {
  animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* No results */
.gallery-no-result {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.gallery-no-result i   { font-size: 52px; margin-bottom: 16px; display: block; color: var(--border); }
.gallery-no-result p   { font-size: 16px; font-weight: 600; }

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,10,25,0.94);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox-box {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 95vw;
  background: #0d1520;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  animation: lbIn 0.35s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes lbIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Close */
.lb-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 10;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.lb-close:hover { background: #ef4444; border-color: #ef4444; transform: rotate(90deg); }

/* Arrows */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-arrow:hover { background: var(--blue); border-color: var(--blue); }

/* Image */
.lb-img-wrap {
  position: relative;
  width: 100%;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060d18;
  min-height: 300px;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
}

.lb-loader {
  position: absolute;
  font-size: 28px;
  color: var(--blue);
  display: none;
}

/* Info bar */
.lb-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}

.lb-info-left { flex: 1; }

.lb-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(26,159,212,0.2);
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.lb-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 3px;
}

.lb-info p {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.lb-counter {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .gallery-masonry { columns: 3; }
}

@media (max-width: 768px) {
  .gallery-masonry { columns: 2; }
  .gallery-filter-bar { gap: 8px; }
  .gfilter { padding: 8px 14px; font-size: 12.5px; }
  .lb-arrow { display: none; }
  .gallery-hero-stats { gap: 16px; }
  .ghs span { font-size: 22px; }
}

@media (max-width: 480px) {
  .gallery-masonry { columns: 2; column-gap: 10px; }
  .gitem { margin-bottom: 10px; }
  .gfilter span { display: none; }
}




/* ================================================================
   YOUTUBE VIDEOS SECTION
   ================================================================ */
.videos-section { background: white; }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 column — 2 rows = 6 videos */
  gap: 28px;
  margin-bottom: 36px;
}

/* ---- Video Card ---- */
.video-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

/* Thumbnail */
.video-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background: #0d1520;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

/* Play Button */
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: white;
  transition: var(--transition);
}

.video-play-btn i {
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
  transition: transform 0.3s ease, color 0.3s ease;
}

.video-card:hover .video-play-btn i {
  transform: scale(1.15);
  color: #FF0000;
}

/* Duration Badge */
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.78);
  color: white;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

/* Video Info */
.video-info {
  padding: 18px 20px 20px;
}

.video-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(26,159,212,0.1);
  color: var(--blue);
  margin-bottom: 10px;
}

.video-cat.health  { background: rgba(239,68,68,0.1);  color: #ef4444; }
.video-cat.welfare { background: rgba(139,92,246,0.1); color: #8b5cf6; }

.video-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 7px;
  line-height: 1.45;
}

.video-info p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 12px;
}

.video-meta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.video-meta span {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.video-meta i { color: var(--blue); font-size: 11px; }

/* ---- Subscribe Bar ---- */
.yt-subscribe-bar {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(255,0,0,0.25);
}

.yt-subscribe-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.yt-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.yt-subscribe-left h4 {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.yt-subscribe-left p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin: 0;
}

.yt-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #cc0000;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.yt-subscribe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ================================================================
   VIDEO MODAL
   ================================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.video-modal.open {
  opacity: 1;
  pointer-events: all;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,10,25,0.95);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.video-modal-box {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 960px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
  animation: lbIn 0.35s cubic-bezier(.34,1.56,.64,1) both;
}

.video-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-modal-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.video-modal-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}

.video-modal-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ================================================================
   RESPONSIVE — VIDEOS
   ================================================================ */
@media (max-width: 1024px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .videos-grid { grid-template-columns: 1fr; gap: 18px; }
  .yt-subscribe-bar { flex-direction: column; text-align: center; padding: 20px; }
  .yt-subscribe-left { flex-direction: column; text-align: center; }
}




/* ── Image Protection ── */
.gitem img,
.video-thumb img,
#lbImg {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: none;
  -webkit-touch-callout: none;
}




/* ================================================================
   WATERMARK — FIXED
   ================================================================ */

/* ================================================================
   WATERMARK — SIMPLE & ALWAYS VISIBLE
   ================================================================ */

/* Gallery cards: bottom + diagonal, directly on image wrapper */
.gitem-inner {
  position: relative;
}

.gitem-inner::after {
  content: '© Jansahyog Ujjawal Foundation';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.35);
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  font-family: 'Poppins', sans-serif;
}


.gitem-inner::before {
  content: 'jansahyogujjawalfoundation.org';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 13px;                /* 13 → 15 */
  font-weight: 700;               /* thoda bold */
  color: rgba(255,255,255,0.27);  /* 0.18 → 0.32 (zyada visible) */
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9); /* strong shadow */
  font-family: 'Poppins', sans-serif;
}


/* Lightbox image: bottom + diagonal */
.lb-img-wrap {
  position: relative;
}

.lb-img-wrap::after {
  content: '© Jansahyog Ujjawal Foundation';
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.4);
  padding: 5px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  font-family: 'Poppins', sans-serif;
}


.lb-img-wrap::before {
  content: 'jansahyogujjawalfoundation.org';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 20px;                /* 18 → 20 */
  font-weight: 800;
  color: rgba(255,255,255,0.29);  /* 0.18 → 0.35 */
  white-space: nowrap;
  pointer-events: none;
  z-index: 9;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-shadow: 0 3px 8px rgba(0,0,0,0.95);
  font-family: 'Poppins', sans-serif;
}