/* SAEW Gallery — grid + lightbox */
.saew-gallery { margin: 10px 0 20px; }
.saew-gal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}
.saew-gal-filter {
  border: none;
  background: #eef2f7;
  color: #0b3a6e;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 6px 6px 12px #c8d0dc, -6px -6px 12px #fff;
}
.saew-gal-filter.active,
.saew-gal-filter:hover {
  background: linear-gradient(145deg, #ff7a1a, #e85d04);
  color: #fff;
  box-shadow: 4px 4px 10px rgba(232, 93, 4, 0.35);
}

.saew-gal-grid {
  display: grid;
  grid-template-columns: repeat(var(--saew-gal-cols, 4), minmax(0, 1fr));
  gap: 14px;
}
.saew-gal-item {
  position: relative;
  display: block;
  width: 100%;
  height: 210px;
  border: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #eef2f7;
  box-shadow: 8px 8px 18px #c8d0dc, -8px -8px 18px #fff;
}
.saew-gal-item.is-hidden { display: none; }
.saew-gal-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.35s ease;
  background: #f4f7fb;
}
.saew-gal-item:hover img { transform: scale(1.05); }
.saew-gal-cap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: linear-gradient(transparent 45%, rgba(11, 58, 110, 0.85));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.saew-gal-item:hover .saew-gal-cap { opacity: 1; }
.saew-gal-cap span {
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Lightbox */
.saew-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 24, 48, 0.92);
  padding: 20px;
}
.saew-lightbox.open { display: flex; }
.saew-lb-inner {
  position: relative;
  width: min(1000px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.saew-lb-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}
.saew-lb-stage img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background: #111c2e;
}
.saew-lb-caption {
  color: #fff;
  font-family: Rajdhani, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.saew-lb-count {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}
.saew-lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease;
}
.saew-lb-btn:hover { background: #e85d04; }
.saew-lb-prev { left: 8px; }
.saew-lb-next { right: 8px; }
.saew-lb-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #e85d04;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 8px 20px rgba(232, 93, 4, 0.45);
}
.saew-lb-navbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.saew-lb-navbar .saew-lb-btn {
  position: static;
  transform: none;
}
body.saew-lb-open { overflow: hidden; }

@media (max-width: 900px) {
  .saew-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saew-gal-item { height: 160px; }
}
@media (max-width: 500px) {
  .saew-lb-prev,
  .saew-lb-next { width: 40px; height: 40px; }
}
