/* =========================================
   GENERIC GALLERY PAGE STYLES
   ========================================= */

/* --- Hero Section (Retained) --- */
.campus-page-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Update this URL if you have a generic hero image */
  background-image: url("../media/campus/campus_main.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.campus-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 5, 0.8) 0%,
    rgba(5, 5, 5, 0.4) 50%,
    rgba(5, 5, 5, 1) 100%
  );
  z-index: 1;
}

.campus-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.campus-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 6rem;
  color: #fff;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: 4px;
}

.campus-subtitle {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.2rem;
  color: #ccc;
  line-height: 1.6;
}

/* --- Gallery Section (Genericized) --- */
.gallery-section {
  background-color: var(--bg, #050505);
  padding: 80px 5vw 120px 5vw;
}

/* CSS GRID: MASONRY LOOKBOOK STYLE 
  Auto-fits items, allows specific items to span across multiple rows/columns
*/
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 250px; /* Base height for items */
  gap: 15px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Individual Gallery Item Container */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #111;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
  filter: grayscale(30%) brightness(0.8);
}

/* Modifier Classes for irregular cinematic grid */
.item-wide {
  grid-column: span 2;
}

.item-tall {
  grid-row: span 2;
}

/* Hover Effects - Pure Image Focus */
.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.08);
  filter: grayscale(0%) brightness(1.1);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .campus-title {
    font-size: 4rem;
  }

  .campus-page-hero {
    background-attachment: scroll; /* Fixes iOS parallax bug */
  }

  .gallery-grid {
    grid-template-columns: 1fr; /* Stack everything in 1 column */
    grid-auto-rows: 300px;
  }

  /* Reset spans for mobile so nothing breaks off-screen */
  .item-wide,
  .item-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}
/* =========================================
   LIGHTBOX VIEWER STYLES
   ========================================= */

.lightbox {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(5, 5, 5, 0.95);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Controls */
.close-btn {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-family: sans-serif;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10000;
}

.close-btn:hover {
  color: #a15127; /* Ties in a subtle brand accent color */
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.3s ease;
  border-radius: 4px;
}

.nav-btn:hover {
  background: rgba(161, 81, 39, 0.8);
}

.prev-btn {
  left: 20px;
}
.next-btn {
  right: 20px;
}

/* Hide arrows on mobile for a cleaner swipe-like feel (optional) */
@media (max-width: 768px) {
  .nav-btn {
    padding: 10px 15px;
    font-size: 18px;
  }
  .close-btn {
    right: 20px;
    top: 10px;
  }
}
