/* Pratinjau halaman galeri. Belum diadopsi ke Blade/route Laravel. */
.gallery-page { padding-bottom: 24px; }
#album-view,
#detail-view { scroll-margin-top: 128px; }

.gallery-intro {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}
.gallery-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.gallery-intro p {
  margin: 16px auto 0;
  font-size: 18px;
  line-height: 1.7;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}
.gallery-filters button {
  border: 1px solid #dce9df;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 10px 16px;
}
.gallery-filters button.is-active,
.gallery-filters button:hover {
  border-color: #0e7143;
  background: #0e7143;
  color: #fff;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.album-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid #dce9df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(8, 61, 40, .05);
}
.album-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #083d28;
  cursor: pointer;
}
.album-video-cover { display: grid; min-height: 220px; place-items: center; position: relative; overflow: hidden; color: #fff; font-size: 48px; }
.album-video-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-video-cover::after { content: ""; position: absolute; inset: 0; background: #0008; }
.album-video-cover span { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 50%; background: #dc2626; }
.album-video-cover span { position: relative; z-index: 1; }
.album-video-player { min-height: 220px; }
.album-video-player iframe { width: 100%; height: 100%; min-height: 220px; border: 0; }
.gallery-lightbox { width: min(1200px, 94vw); max-width: none; max-height: none; margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; color: #fff; }
.gallery-lightbox::backdrop { background: rgba(8, 61, 40, .56); backdrop-filter: blur(14px); }
.gallery-lightbox[open] { display: grid; place-items: center; }
.gallery-lightbox img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100dvh - 86px); min-height: 80px; object-fit: contain; border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.gallery-lightbox p { margin: 12px 0 0; color: #fff; font-size: 16px; font-weight: 700; text-align: center; }
.gallery-lightbox-close { position: absolute; top: -16px; right: -16px; display: grid; width: 40px; height: 40px; border: 2px solid #fff; border-radius: 50%; background: #0e7143; color: #fff; cursor: pointer; font-size: 28px; line-height: 1; place-items: center; }
.gallery-lightbox-close:hover { background: #f0ab00; color: #111; }
.media-video { display: flex; align-items: center; justify-content: center; gap: 14px; flex-direction: column; }
.media-video i { position: static; }
.album-mosaic {
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  grid-template-rows: repeat(3, 72px);
  gap: 4px;
}
.album-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.album-mosaic img:first-child { grid-row: 1 / 4; }
.album-body { display: flex; flex: 1; flex-direction: column; padding: 16px 16px 18px; }
.album-body h2 { margin: 8px 0; color: var(--ink); font-size: 20px; line-height: 1.25; }
.album-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
.album-meta { color: #5c5c66; font-size: 13px; font-weight: 700; }
.album-body .text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.gallery-empty {
  display: none;
  padding: 28px;
  border-radius: 12px;
  background: var(--grey);
  text-align: center;
}
.gallery-empty.is-visible { display: block; }

.detail-back {
  display: inline-flex;
  margin-bottom: 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}
.detail-back span { color: #9a6900; margin-right: 6px; }
.detail-head { max-width: 720px; margin-bottom: 24px; }
.detail-head h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 34px;
  letter-spacing: -.02em;
}
.detail-head p { margin: 0; font-size: 17px; line-height: 1.7; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.media-grid .discover-gallery-item { min-height: 230px; }
.media-grid .discover-gallery-item.is-lead { grid-column: span 2; min-height: 320px; }
.media-video {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #083d28 center / cover no-repeat;
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.media-video.is-lead { grid-column: span 2; min-height: 320px; }
.media-video iframe { width: 100%; min-height: 320px; border: 0; border-radius: 12px; aspect-ratio: 16 / 9; }
.media-video i {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f0ab00;
  color: #083d28;
  font-style: normal;
  place-items: center;
}
.media-video span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .gallery-intro h2,
  .detail-head h2 { font-size: 28px; }
  .album-grid,
  .media-grid { grid-template-columns: 1fr 1fr; }
  .media-grid .discover-gallery-item.is-lead,
  .media-video.is-lead { grid-column: auto; min-height: 180px; }
  .media-video iframe { min-height: 180px; }
}

@media (max-width: 700px) {
  .gallery-lightbox-close { top: 10px; right: 10px; }
}

@media (max-width: 640px) {
  .album-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .media-grid .discover-gallery-item,
  .media-video { min-height: 150px; }
}
