 /* ================================
   Background Image
  =================================*/
 body.gallery-page {
    background-image: url('/images/vultureterminus.png');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    /* background-color: rgba(0, 0, 0, 0.5);
       background-blend-mode: darken; */
}
 
 /* ===== Main Gallery Layout ===== */
main.gallery-main {
  max-width: 1600px;       /* max width for very large screens */
  width: 100%;             /* full width of the parent */
  padding: 20px;
  margin: 0 auto;          /* center the main container */
  box-sizing: border-box;  /* padding included in width */
}
.month-group {
  margin-bottom: 50px;
}

.month-group h2 {
  color: #fff;
  font-size: 1.8em;
  text-align: left;
  margin-top: 40px;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
  padding-left: 10px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ===== Gallery Grid & Items ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;  /* centers items within their grid cell */
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  background: rgba(0,0,0,1);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

/* ===== Subtle glow for all media ===== */
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  border-radius: 12px;

  /* Always-on teal glow */
  box-shadow: 0 0 20px 5px rgba(0, 255, 255, 0.8), 0 0 30px 10px rgba(0, 255, 255, 0.5);
  transition: box-shadow 0.3s ease;
}


.gallery-item.portrait img,
.gallery-item.portrait video {
  aspect-ratio: 3/4;
}

.gallery-item.video::after {
  content: "\25BA";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  pointer-events: none;
}

/* ===== Modal ===== */
.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.media-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.media-modal img,
.media-modal video {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ===== Navigation Buttons ===== */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  user-select: none;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  transition: transform 0.2s;
}

.nav-btn.left { left: 20px; }
.nav-btn.right { right: 20px; }

.nav-btn:hover { transform: translateY(-50%) scale(1.1); }

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  transition: transform 0.2s;
}

.close-btn:hover { transform: scale(1.1); }

/* ===== Empty Gallery Message ===== */
.empty-gallery-message {
  margin: 20px auto;
  color: #fff;
  background: rgba(8,12,18,0.85);
  text-align: center;
  font-size: 1.5em;
  max-width: 800px;
  line-height: 1.5em;
  padding: 40px 30px 20px;
  border-radius: 12px;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
  overflow-y: auto;
}

/* ===== Gallery Controls - Navbar Style Match ===== */
.gallery-controls button,
.gallery-controls select {
  padding: 10px 16px;
  margin: 8px 5px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(20, 20, 20, 0.85);
  color: white;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.gallery-controls button:hover,
.gallery-controls select:hover {
  color: rgb(229, 255, 0);
  text-shadow: 3px 3px 10px rgba(255, 255, 255, 0.8);
  background: rgba(40, 40, 40, 0.95);
  transform: scale(1.05);
}

.gallery-controls button.active,
.gallery-controls select:focus {
  color: rgb(229, 255, 0);
  text-shadow: 3px 3px 10px rgba(255, 255, 255, 0.8);
  background: rgba(20, 20, 20, 0.95);
  border-color: rgb(229, 255, 0);
}

/* Dropdown arrow for select */
.gallery-controls select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><polygon points='0,0 10,0 5,6' fill='white'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  padding-right: 30px;
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .gallery-item {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 600px) {
  .nav-btn { font-size: 40px; }
  .close-btn { font-size: 30px; }
  .month-group h2 { font-size: 1.4em; }
  .gallery-controls button,
  .gallery-controls select {
    width: 90%;
    max-width: 400px;
  }
}

/* Image loading polish */
.gallery-item img.loading {
  filter: blur(12px);
  transform: scale(1.02);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.gallery-item img {
  transition: filter 0.35s ease, transform 0.35s ease;
}
