/* ===============================================
   PHOTO GALLERY CSS
   Back-to-top → only style.css + home.js
   =============================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --navbar: #5DADE2;
  --bg: #F8FBFF;
  --mint: #7ED6A5;
  --mint-hover: #66c491;
  --hover-blue: #4A90E2;
  --text: #2C3E50;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(44, 62, 80, 0.08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== HERO ========== */
.gallery-hero {
  background: linear-gradient(135deg, #EAF4FF 0%, var(--bg) 100%);
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-hero-container {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.gallery-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 10px 0 16px;
}

.gallery-hero p:not(.eyebrow) {
  color: #5A6B7B;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Floating icons — above hero text (z-index), always visible */
.gallery-hero .floating-icon {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--navbar);
  z-index: 3;
}

.gallery-hero .icon-1 { top: 15%; left: 10%; }
.gallery-hero .icon-2 { top: 20%; right: 12%; color: var(--mint-hover); }
.gallery-hero .icon-3 { top: 70%; left: 45%; }

/* Eyebrow pill — same as Campus Life (works with class="eyebrow center") */
.gallery-hero .eyebrow.center,
.gallery-hero .eyebrow.center,
.eyebrow.center {
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navbar);
  background: rgba(93, 173, 226, 0.12);
  width: fit-content;
  margin: 0 auto 20px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
}

/* ========== FILTER TABS ========== */
.gallery-filter-section {
  width: 100%;
  max-width: 100%;
  margin: 40px auto 24px;
  padding: 0 32px; /* same gap from screen left & right */
  box-sizing: border-box;
}

.gallery-filter-section.section-box {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
  padding: 0 32px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.gallery-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 35px;
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 32px; /* equal inner space left & right */
  gap: 12px;
  box-sizing: border-box;
}

.gfilter-btn {
  background: var(--bg);
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  width: auto;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.gfilter-btn:focus,
.gfilter-btn:active {
  outline: none;
}

.gfilter-btn:hover {
  background: #EAF4FF;
}

.gfilter-btn.active {
  background: var(--navbar);
  color: var(--white);
}

/* ========== MASONRY GRID ========== */
.gallery-main-section {
  max-width: 1300px;
  margin: 0 auto 60px;
  padding: 0 40px;
}

.gallery-masonry {
  columns: 4 240px;
  column-gap: 20px;
}

.gmasonry-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.gmasonry-item img {
  width: 100%;
  display: block;
  height: 220px;
  object-fit: cover;
}

.gmasonry-item.tall img {
  height: 340px;
}

.gmasonry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 62, 80, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--white);
  opacity: 0;
}

.gmasonry-overlay i {
  font-size: 1.5rem;
}

.gmasonry-overlay p {
  font-size: 0.9rem;
  font-weight: 600;
}

.gmasonry-item.gallery-hidden {
  display: none;
}

.gallery-extra {
  display: none;
}

.load-more-wrapper {
  text-align: center;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.load-more-wrapper .btn {
  display: inline-flex;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 25, 35, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 800px;
  width: 90%;
  text-align: center;
}

.lightbox-content img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-content p {
  color: var(--white);
  margin-top: 16px;
  font-size: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .gallery-masonry {
    columns: 3 200px;
  }
}

@media (max-width: 768px) {
  /* Floating icons visible on mobile */
  .gallery-hero .floating-icon {
    display: flex !important;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 12px;
    z-index: 3;
  }
  .gallery-hero .icon-1 { top: 10%; left: 4%; }
  .gallery-hero .icon-2 { top: 12%; right: 4%; }
  .gallery-hero .icon-3 { top: 78%; left: 8%; }


  .gallery-hero {
    padding: 50px 16px;
  }

  .gallery-hero h1 {
    font-size: 2rem;
  }

  .gallery-filter-section,
  .gallery-filter-section.section-box {
    margin: 28px auto 16px;
    padding: 0 20px; /* equal outer space both sides */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .gallery-filter-tabs {
    width: 100%;
    max-width: 100%;
    border-radius: 28px;
    padding: 14px 22px; /* equal inner space both sides */
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  .gfilter-btn {
    padding: 11px 16px;
    font-size: 0.8rem;
  }

  /* Photos: 2 per row */
  .gallery-masonry {
    columns: 2 140px;
    column-gap: 12px;
  }

  .gmasonry-item {
    margin-bottom: 12px;
  }

  .gmasonry-item img {
    height: 160px;
  }

  .gmasonry-item.tall img {
    height: 240px;
  }

  .gallery-main-section {
    padding: 0 12px;
    margin-bottom: 40px;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }

  .footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .footer-brand,
  .footer-newsletter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .gallery-hero h1 {
    font-size: 1.7rem;
  }

  .gallery-filter-section,
  .gallery-filter-section.section-box {
    padding: 0 16px;
  }

  .gallery-filter-tabs {
    padding: 12px 18px;
    gap: 8px;
  }

  .gfilter-btn {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  /* Still 2 columns — not single column */
  .gallery-masonry {
    columns: 2 100px;
    column-gap: 10px;
  }

  .gmasonry-item img {
    height: 130px;
  }

  .gmasonry-item.tall img {
    height: 190px;
  }

  .footer-container {
    gap: 24px 14px;
  }
}
