/* ============================================================
   Gyanada Institute - Gallery Page
   Full redesign: section flow, visuals, and content presentation
   ============================================================ */

/* ---- Banner ---- */
.page-banner {
  position: relative;
  overflow: hidden;
  padding: 132px 0 92px;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 170, 223, .34) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(245, 197, 24, .22) 0%, transparent 36%),
    linear-gradient(128deg, #0a1637 0%, #123f86 48%, #0a6aa7 100%);
  color: #fff;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-img, url("https://images.unsplash.com/photo-1517048676732-d65bc937f952?w=1800&auto=format&fit=crop&q=60")) center/cover no-repeat;
  opacity: .16;
  transform: scale(1.06);
}
.page-banner .container { position: relative; z-index: 2; }
.banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8ce9ff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(140,233,255,.42);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 16px;
}
.page-banner h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.page-banner p {
  margin: 0 0 20px;
  max-width: 690px;
  color: rgba(255,255,255,.84);
  font-size: 1.05rem;
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 8px 14px;
  color: rgba(255,255,255,.72);
  font-size: .82rem;
}
.breadcrumb a { color: #fff; opacity: .88; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb .sep { opacity: .52; }

/* ---- Pulse Strip ---- */
.gallery-pulse {
  margin-top: -36px;
  position: relative;
  z-index: 4;
}
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.pulse-item {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(148,163,184,.32);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15,23,42,.14);
}
.pulse-item strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.pulse-item span {
  font-size: .8rem;
  color: #64748b;
  font-weight: 600;
}

/* ---- Section Tone ---- */
.section-tone {
  background:
    linear-gradient(180deg, rgba(14,165,233,.04) 0%, rgba(255,255,255,1) 52%),
    linear-gradient(120deg, rgba(226,232,240,.35) 0%, rgba(255,255,255,1) 100%);
}

/* ---- Gallery Filter ---- */
.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.filter-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: all .22s ease;
}
.filter-btn:hover {
  border-color: #0ea5e9;
  color: #0f172a;
  transform: translateY(-1px);
}
.filter-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(2,132,199,.28);
}

/* ---- Photo Wall ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 210px;
  gap: 14px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 6px 20px rgba(15,23,42,.08);
}
.gallery-item.wide  { grid-column: span 2; }
.gallery-item.tall  { grid-row: span 2; }
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .24s ease;
  background: linear-gradient(180deg, transparent 26%, rgba(2,6,23,.75) 62%, rgba(2,132,199,.74) 100%);
  padding: 18px;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h5 {
  color: #fff;
  margin: 0 0 4px;
  font-size: .92rem;
  font-weight: 700;
}
.gallery-overlay span {
  color: rgba(255,255,255,.8);
  font-size: .77rem;
}
.gallery-zoom-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(2,6,23,.45);
  color: #fff;
  display: grid;
  place-items: center;
  transform: scale(.86);
  opacity: 0;
  transition: all .24s ease;
}
.gallery-item:hover .gallery-zoom-btn {
  opacity: 1;
  transform: scale(1);
}
.gallery-item[style*="display: none"] { display: none !important; }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.92);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-inner { max-width: 1040px; width: 100%; }
.lightbox-img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
}
.lightbox-caption {
  margin-top: 12px;
  text-align: center;
  color: rgba(255,255,255,.84);
}
.lb-close, .lb-prev, .lb-next {
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  transition: all .2s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
}
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
}
.lb-prev { left: -60px; }
.lb-next { right: -60px; }

/* ---- Events ---- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.event-card {
  background: #fff;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15,23,42,.13);
}
.event-card-img { position: relative; }
.event-card-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.event-date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(2,132,199,.92);
  color: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  text-align: center;
  line-height: 1.2;
  border: 1px solid rgba(255,255,255,.28);
}
.event-date-badge .day {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}
.event-date-badge .mon {
  display: block;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.event-card-body {
  padding: 18px;
}
.event-card-body h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #0f172a;
}
.event-card-body p {
  margin: 0;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.65;
}

/* ---- Workshops ---- */
.workshop-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.workshop-item {
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  gap: 0;
  background: #fff;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.workshop-item img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}
.workshop-body {
  padding: 20px 22px;
}
.workshop-body .tag {
  display: inline-flex;
  align-items: center;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0b5f88;
  background: rgba(2,132,199,.1);
  border: 1px solid rgba(2,132,199,.26);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 10px;
}
.workshop-body h4 {
  margin: 0 0 8px;
  font-size: 1.03rem;
  color: #0f172a;
}
.workshop-body p {
  margin: 0 0 12px;
  font-size: .85rem;
  color: #64748b;
}
.workshop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.workshop-meta span {
  font-size: .8rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.workshop-meta span i { color: #0284c7; }

/* ---- Campus ---- */
.campus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.campus-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}
.campus-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform .45s ease;
}
.campus-card:hover img { transform: scale(1.05); }
.campus-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: rgba(2,6,23,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .83rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

/* ---- Activities ---- */
.activities-masonry {
  columns: 3;
  gap: 14px;
}
.activity-item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
  border: 1px solid rgba(148,163,184,.24);
}
.activity-item img {
  width: 100%;
  display: block;
  transition: transform .45s ease;
}
.activity-item:hover img { transform: scale(1.05); }
.activity-item .overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #fff;
  font-size: 1.3rem;
  background: linear-gradient(180deg, rgba(2,132,199,.16), rgba(2,6,23,.7));
  transition: opacity .2s ease;
}
.activity-item:hover .overlay { opacity: 1; }

/* ---- Videos ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.video-card {
  background: #fff;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  cursor: pointer;
}
.video-thumb {
  position: relative;
}
.video-thumb img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform .45s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: #0369a1;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(2,6,23,.25);
}
.video-body {
  padding: 14px 16px 16px;
}
.video-body h5 {
  margin: 0 0 4px;
  font-size: .93rem;
  color: #0f172a;
}
.video-body span {
  font-size: .77rem;
  color: #64748b;
}

/* ---- CTA ---- */
.cta-section {
  background:
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.2) 0%, transparent 34%),
    radial-gradient(circle at 82% 75%, rgba(255,255,255,.14) 0%, transparent 38%),
    linear-gradient(130deg, #0b3f76 0%, #0a6ea4 100%);
  text-align: center;
  color: #fff;
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: 12px;
  color: #fff;
}
.cta-section p {
  max-width: 640px;
  margin: 0 auto 30px;
  color: rgba(255,255,255,.86);
}

/* ---- Footer helpers on this page ---- */
.site-footer .social-links {
  display: flex;
  gap: 10px;
}
.site-footer .social-links a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
}

/* ---- Responsive ---- */
@media (max-width: 1120px) {
  .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .video-grid, .events-grid, .campus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .page-banner { padding: 116px 0 74px; }
  .workshop-item { grid-template-columns: 1fr; }
  .workshop-item img { min-height: 180px; }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 190px;
  }
  .gallery-item.wide,
  .gallery-item.tall,
  .gallery-item.large { grid-column: span 1; grid-row: span 1; }
  .activities-masonry { columns: 2; }
  .lb-prev { left: -44px; }
  .lb-next { right: -44px; }
}
@media (max-width: 560px) {
  .pulse-grid,
  .gallery-grid,
  .video-grid,
  .events-grid,
  .campus-grid { grid-template-columns: 1fr; }
  .activities-masonry { columns: 1; }
  .lb-prev, .lb-next { display: none; }
}
