/**
 * WORLD CHILDREN’S SUMMIT FOR A SUSTAINABLE FUTURE 2027
 * Official Summit Photo Gallery Stylesheet (Image-Only Pure Visual Architecture)
 * UNCC Bangkok Visual Archive
 */

:root {
  --gal-navy-deep: #030C1A;
  --gal-navy-card: #06152B;
  --gal-blue-primary: #0077B6;
  --gal-blue-bright: #00B4D8;
  --gal-blue-soft: #E0F2FE;
  --gal-border: rgba(224, 242, 254, 0.12);
  --gal-radius: 14px;
  --gal-transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   CLEAN MINIMAL GALLERY HEADER
   ============================================================ */
.gallery-hero-clean {
  position: relative;
  background: linear-gradient(135deg, #030E26 0%, #0A2540 60%, #003F6E 100%);
  color: #FFFFFF;
  padding: 120px 20px 32px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(224, 242, 254, 0.1);
}

.gallery-hero-clean::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 30% 40%, rgba(0, 180, 216, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 75% 60%, rgba(0, 119, 182, 0.18) 0%, transparent 50%);
  pointer-events: none;
}

.gallery-hero-clean__container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-clean-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 180, 216, 0.12);
  border: 1px solid rgba(0, 180, 216, 0.35);
  color: #7DD3FC;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.gallery-clean-badge i {
  color: #38BDF8;
}

.gallery-clean-title {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  background: linear-gradient(180deg, #FFFFFF 20%, #E0F2FE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   GALLERY MAIN GRID (PURE IMAGES, NO TEXT OVERLAY)
   ============================================================ */
.gallery-section {
  padding: 40px 20px 80px;
  background: #040E1E;
  min-height: 70vh;
}

.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 550px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Pure Image Gallery Card */
.gallery-card {
  position: relative;
  background: #020813;
  border-radius: var(--gal-radius);
  overflow: hidden;
  border: 1px solid var(--gal-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  aspect-ratio: 16 / 11;
  transition: var(--gal-transition);
  outline: none;
}

.gallery-card--portrait {
  aspect-ratio: 4 / 5;
}

.gallery-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(0, 180, 216, 0.6);
  box-shadow: 0 16px 36px rgba(0, 119, 182, 0.35), 0 0 20px rgba(0, 180, 216, 0.2);
}

.gallery-card:focus-visible {
  outline: 3px solid #00B4D8;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

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

/* ============================================================
   LIGHTBOX MODAL (PURE HIGH-RES IMAGE DISPLAY)
   ============================================================ */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 10, 22, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Lightbox Header Bar */
.gallery-lightbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(5, 19, 41, 0.6);
  border-bottom: 1px solid rgba(224, 242, 254, 0.1);
}

.lightbox-counter {
  background: rgba(0, 180, 216, 0.18);
  border: 1px solid rgba(0, 180, 216, 0.35);
  color: #7DD3FC;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gallery-lightbox__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(224, 242, 254, 0.18);
  color: #E2E8F0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--gal-transition);
  text-decoration: none;
}

.lightbox-btn:hover {
  background: rgba(0, 180, 216, 0.3);
  border-color: #00B4D8;
  color: #FFFFFF;
  transform: scale(1.08);
}

.lightbox-btn--close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #EF4444;
  color: #F87171;
}

/* Stage / Image Container */
.gallery-lightbox__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 80px;
  user-select: none;
  overflow: hidden;
}

@media (max-width: 768px) {
  .gallery-lightbox__stage {
    padding: 16px 20px;
  }
}

.gallery-lightbox__img-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transition: opacity 0.25s ease;
}

/* Navigation Arrow Controls */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 19, 41, 0.8);
  border: 1px solid rgba(224, 242, 254, 0.25);
  color: #FFFFFF;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--gal-transition);
  backdrop-filter: blur(10px);
}

.lightbox-nav-btn:hover {
  background: #0077B6;
  border-color: #00B4D8;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 24px rgba(0, 180, 216, 0.5);
}

.lightbox-nav-btn--prev {
  left: 20px;
}

.lightbox-nav-btn--next {
  right: 20px;
}

@media (max-width: 768px) {
  .lightbox-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
  .lightbox-nav-btn--prev { left: 8px; }
  .lightbox-nav-btn--next { right: 8px; }
}
