/* ---------- Base Styles ---------- */
body {
  font-family: "Martian Mono", monospace !important;
  background: #f5f5f5;
  color: #111;
  margin: 0 auto;
  width: 80%;
  max-width: 1400px;
}

header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #111;
  margin: 0 20px 20px;
}

header h1 {
  margin: 0; 
  /* font-family: "Martian Mono", monospace; */
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: #111;
}

/* ---------- Title Link ---------- */
.title-link {
  color: inherit;
  text-decoration: none;
}

/* .title-link:hover {
  color: #ff7e5f;  
  text-decoration: none;
} */

/* ---------- Filters Wrapper ---------- */
.filters-wrapper {
  padding: 0 40px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

/* ---------- Main Category Wrapper ---------- */
.category-wrapper {
  display: inline-block;
  vertical-align: top;
  margin-right: 20px;
}

/* ---------- Main Category Buttons ---------- */
.category-wrapper > button {
  text-decoration: none;
  padding: 8px 12px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.category-wrapper > button:hover,
.category-wrapper > button.active {
  color: #ff7e5f;
  text-decoration: none;
}

/* ---------- Local Subfilters ---------- */
.subfilters-local {
  margin-top: 5px;
  margin-left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Make “other” subcategories vertical */
.category-wrapper.other .subfilters-local {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.subfilters-local button {
  text-decoration: none;
  padding: 4px 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.subfilters-local button:hover,
.subfilters-local button.active {
  color: #ff7e5f;
  text-decoration: none;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 0 40px 40px;
  box-sizing: border-box;

  column-count: 3; /* number of columns */
  column-gap: 30px; /* horizontal gap */
}

.gallery h2 {
  /* font-family: "Lora", serif; */
  font-size: 1.5rem;
  font-weight: 500;
  color: #111;
  margin: 30px 0 15px;
  /* padding-left: 40px; */
  text-decoration: none;
  grid-column: 1 / -1;
}

.category-description {
  grid-column: 1 / -1;
  margin: 10px 0 25px;
  font-size: 1rem;
  color: #555;
  font-style: italic;
  line-height: 1.6;
  border-left: 3px solid #ff7e5f;
  padding-left: 12px;
}

.gallery img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s;

  display: block;
  margin-bottom: 30px; /* vertical spacing */
}

/* .gallery img:hover {
  transform: scale(1.05);
} */

/* ---------- Load More Button ---------- */
#load-more {
  display: block;
  margin: 20px auto;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#load-more:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#load-more:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245,245,245,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  box-sizing: border-box; /* important! */
  overflow-y: auto;
  z-index: 1000;
}

#lightbox.visible {
  display: flex;
}

#lightbox img {
  max-width: 90%;
  max-height: 80vh;
  width: auto;
  height: auto;
  margin-bottom: 15px;
  cursor: pointer;
}

#lightbox-desc {
  font-style: italic;
  color: #666;
  font-size: 1rem;
  margin-bottom: 5px;
}

#lightbox-date {
  font-size: 0.9rem;
  color: #888;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: gray;
  font-size: 2.5rem;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s ease;
  z-index: 10;
  user-select: none;
}

.lightbox-arrow:hover {
  opacity: 0.9;
}

#lightbox-prev {
  left: 2%;
}

#lightbox-next {
  right: 2%;
}


/* ---------- Responsive / Mobile ---------- */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 30px 30px;
  }

  header h1 {
    font-size: 2rem;
  }

  .category-wrapper > button {
    font-size: 1.05rem;
    padding: 6px 10px;
  }

  .subfilters-local button {
    font-size: 0.9rem;
  }

  #load-more {
    padding: 10px 25px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px 20px 20px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  .category-wrapper > button {
    font-size: 1rem;
  }

  .subfilters-local button {
    font-size: 0.85rem;
  }

  #load-more {
    padding: 9px 22px;
    font-size: 0.95rem;
  }

  #lightbox {
    padding: 15px 10px;
  }

  #lightbox img {
    max-width: 100%;
    max-height: 60vh;
  }

  #lightbox-desc {
    font-size: 0.95rem;
  }

  #lightbox-date {
    font-size: 0.85rem;
  }

  .lightbox-arrow {
    display: none;
  }
}


@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 16px 16px;
  }

  header h1 {
    font-size: 1.5rem;
  }
}

/* ---------- Disable Text Selection ---------- */
body, button {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}


