/* ===== HERO ===== */
.gallery-wrap {
  /* Tambahkan offset top agar konten tidak tertutup header sticky.
     Gunakan CSS var --header-h yang di-set oleh js/main.js saat header di-load. */
  padding: calc(260px + var(--header-h, 78px)) 0 72px;
}

.gallery-wrap-desain {
  /* Tambahkan offset top agar konten tidak tertutup header sticky.
     Gunakan CSS var --header-h yang di-set oleh js/main.js saat header di-load. */
  padding: calc(260px + var(--header-h, 78px)) 0 72px;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.gallery-hero {
  position: relative;
  margin: 0 auto 28px;
  max-width: 1100px;
  padding: 24px 24px 8px;
  isolation: isolate;
}

/* Dekorasi bulat: selalu di belakang konten */
.blob {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .9;
  z-index: 0;
  pointer-events: none;
}
.blob-left {
  left: 18px;
  top: -300px;
  background: #E6F370;
}
.blob-right {
  right: 90px;
  top: -154px;
  background: #6DEBD9;
}
.blob-bg {
  right: 634px;
  top: -225px;
  width: 70px;
  height: 70px;
  background: #50b1d1c0;
}

/* Konten hero selalu di atas dekorasi */
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
}

.hero-title {
  margin-top: -490px;
  font-size: 28px;
  font-weight: 700;
  color: #2E2E2E;
  line-height: 1.3;
}

/* Upload absolut di TOP-CENTER */
.upload-cta {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  text-align: center;
  color: #5F6368;
  width: max-content;
  margin-bottom: 30px; /* Fix the space between the upload button and the section below */
}

.upload-icon {
  display: block;
  margin: 6px auto;
  color: #2E7CC7; /* Warna biru untuk ikon */
  transform: scale(1);
  transition: transform 0.2s ease;
}

/* Background lingkaran untuk ikon */
.upload-icon .icon-bg {
  fill: #F0F7FF; /* Latar belakang biru muda */
}

/* Hover effect */
.upload-icon:hover {
  transform: scale(1.05);
}

.upload-icon:hover .icon-bg {
  fill: #E1EFFF; /* Latar sedikit lebih gelap saat hover */
}

.upload-icon:active {
  transform: scale(0.95);
}

.upload-text {
  font-size: 14px;
}

/* ===== SECTIONS ===== */
.gallery-section {
  max-width: 1100px;
  margin: 22px auto 30px;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  margin-bottom: 30px; /* Added margin bottom for space between category and content */
}

.section-header h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #2B2B2B;
  text-align: center;
}

.section-header hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #E5E5EA;
  margin: 4px 0 14px;
}

/* Add space and distinguish empty categories */
.empty-category {
  text-align: center;
  color: #777;
  font-size: 16px;
  margin-top: 20px;
}

/* Grid kartu (dipakai di multi-section & see-all) */
:root {
  --card-ratio: 16/10;
}

.cards {
  display: grid;
  /* max-width: 1450px; */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  /* padding: 100px 50px; */
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  overflow: hidden;
  background-color: #f0f0f0;
  border-radius: 15px;
}

/* Media mengisi kartu */
.card img,
.card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}
.card iframe {
  pointer-events: none;
}

/* Hover: blur & overlay judul */
.card {
  transition: transform 0.9s ease;
}
.card:hover img,
.card:hover iframe {
  filter: blur(4px) brightness(.95);
  transform: scale(1.015);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  transition: opacity 0.2s ease;
  padding: 12px;
  text-align: center;

}
.card:hover .card-overlay {
  opacity: 1;
}

/* Lihat semua */
.section-cta {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}
.btn-outline {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid #BFDDFB;
  color: #2E7CC7;
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  transition: all 0.4s ease;
}

.btn-outline:hover {
  transform: scale(1.05);
}

.btn-outline:active {
  transform: scale(0.95);
}

/* ===== See-all hero ===== */
.seeall-hero {
  text-align: center;
  margin: 32px 0;
}
.seeall-title {
  font-size: 28px;
  font-weight: 700;
  color: #2b2b2b;
}

.category-section {
  margin: 20px 0;
}

.category-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: #2b2b2b;
  text-align: center;
  margin-bottom: 14px;
}

/* Tanggal di bawah kartu */
.meta-date {
  text-align: center;
  color: #2b2b2b;
  font-size: 12px;
  margin: 6px 0 16px;
}

.card-date {
  text-align: center;
  color: #2b2b2b;
  font-size: 12px;
}

/* Responsif */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* --- Uniform gallery grid (landing + see-all) --- */
:root {
  --card-ratio: 16/10;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* Group card + date in ONE grid item */
.card-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Reset any earlier .card rules */
.cards .card {
  display: block;
  text-decoration: none;
  position: static;
  padding-top: 0;
  background: transparent;
}
.cards .card:hover {
  text-decoration: none;
}

/* Media box with fixed ratio */
.card-media {
  position: relative;
  aspect-ratio: var(--card-ratio);
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

/* Image / Figma fill the box */
.card-media img,
.card-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}
.card-media iframe {
  pointer-events: none;
}

/* Featured card variant (search + see-all category) */
.card-item--featured {
  gap: 0;
  background: #fff;
  border: 1px solid #ECECF1;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(42, 39, 105, .08);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-item--featured:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(42, 39, 105, .18);
}
.card-item--featured .card {
  display: block;
  background: transparent;
}
.card-item--featured .card-media {
  border-radius: 0;
  background: #F1EFFB;
  box-shadow: none;
}
.card-item--featured .card-media img,
.card-item--featured .card-media iframe {
  transition: transform .35s ease;
}
.card-item--featured:hover .card-media img,
.card-item--featured:hover .card-media iframe {
  transform: scale(1.04);
}
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: 999px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  text-transform: uppercase;
}
.card-item--featured .meta-date,
.card-item--featured .card-date {
  margin: 0;
  padding: 16px 18px 18px;
  font-size: 13px;
  color: #5c5a78;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #f1eff5;
}
.card-item--featured .meta-date span:first-child,
.card-item--featured .card-date span:first-child {
  font-weight: 700;
  color: #1f1f1f;
}
.card-item--featured .meta-date span:last-child,
.card-item--featured .card-date span:last-child {
  font-size: 12px;
  color: #7c7a94;
}

/* Hover effect + title overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity .18s ease;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35));
}
.card-media:hover .card-overlay {
  opacity: 1;
}
.card-overlay span {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

/* Responsive */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
