@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Fredoka", sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #fbcfe8 100%);
  background-attachment: fixed;
  color: #1e293b;
  padding: 25px 15px;
  display: flex;
  justify-content: center;
}

.page-container {
  max-width: 1200px;
  width: 100%;
}

/* Nav & Banner */
.nav-header {
  margin-bottom: 20px;
}
.btn-back {
  display: inline-block;
  background-color: #ffffff;
  color: #1e293b;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 50px;
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.08);
}

.class-banner {
  background-color: #ffffff;
  border-radius: 30px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 8px 0px rgba(0, 0, 0, 0.06);
  margin-bottom: 25px;
}
.badge-class {
  background-color: #fef08a;
  color: #854d0e;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
}
.class-banner h1 {
  font-size: 2rem;
  color: #0369a1;
  margin: 8px 0;
}
.class-banner p {
  color: #64748b;
}

/* BAR FILTER (PINTEREST TAG STYLE) */
.filter-wrapper {
  overflow-x: auto; /* Bisa di-scroll ke samping di HP */
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.filter-container {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.filter-btn {
  background-color: #ffffff;
  border: 2px solid #ffffff;
  color: #475569;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.2);
}

/* GRID MASONRY (PINTEREST GRID) */
.masonry-grid {
  column-count: 4; /* Jumlah Kolom Desktop */
  column-gap: 18px;
}

.gallery-item {
  break-inside: avoid; /* Mencegah kartu terpotong di tengah kolom */
  margin-bottom: 18px;
}

.card-inner {
  background-color: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 0px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  border: 3px solid #ffffff;
}

.card-inner:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.card-inner img {
  width: 100%;
  height: auto;
  display: block;
}

.item-info {
  padding: 12px 15px;
}

.item-info h3 {
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 4px;
}

.item-info p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 8px;
}

.tag-badge {
  display: inline-block;
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  margin-right: 4px;
}

/* RESPONSIF UNTUK TABLET & HP */
@media (max-width: 900px) {
  .masonry-grid {
    column-count: 3;
  }
}

@media (max-width: 600px) {
  .masonry-grid {
    column-count: 2;
  } /* 2 Kolom di HP */
}
