/* =========================
   GALLERY GRID
========================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* =========================
   CARD
========================= */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: #111;

    transition: transform .35s ease, box-shadow .35s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.45);
}

/* =========================
   IMAGE
========================= */
.gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center;

    filter: grayscale(20%);
    transition: transform .5s ease, filter .5s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
    filter: grayscale(0%) brightness(0.7);
}

/* =========================
   OVERLAY
========================= */
.gallery-overlay {
    position: absolute;
    inset: 0;
    gap: 6px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 1.2rem;

    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;

    opacity: 0;
    transform: translateY(20px);
    transition: all .35s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   TEXT
========================= */
.gallery-overlay h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.gallery-overlay p {
    font-size: 0.9rem;
    margin: 3px 0;
}

/* =========================
   BUTTON
========================= */
.btn-detail {
    margin-top: 14px;
    padding: 8px 10px;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;

    transition: .3s;
}

.btn-detail:hover {
    background: #ddd;
}

.tbm-gallery{ 
  display:flex; 
  flex-direction:column; 
  gap:12px; 
  width:100%; 
}

.tbm-main{
  border:1px solid #2a2a2a; 
  border-radius:10px; 
  overflow:hidden; 
  background:#111;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.tbm-main img {
  width: 100%;
  aspect-ratio: 3/4; 
  object-fit: cover;
  display: block;
}

.tbm-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.tbm-thumb {
  border-radius: 8px;
  overflow: hidden;
  outline: 1px solid #2a2a2a;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbm-thumb:hover{ 
  transform:translateY(-1px); 
}

.tbm-thumb.is-active{ 
  outline:2px solid #fff; 
}

.tbm-thumb img {
  width: 100%;
  aspect-ratio: 3/4; 
  max-height: 90px;
  object-fit: cover;
  display: block;
}


.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.4rem;

    padding: 1.2rem 2rem;

    position: relative;
}

/* BUTTON */
.filter-btn {
    background: transparent;
    border: none;
    cursor: pointer;

    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.4px;

    color: var(--text-lighter);

    transition: var(--transition);
    position: relative;
}

/* TEXT */
.filter-btn .label {
    opacity: 0.9;
}

/* HOVER */
.filter-btn:hover {
    color: var(--white);
}

/* ACTIVE */
.filter-btn.active {
    color: var(--white);
    font-weight: 600;
}

/* UNDERLINE */
.filter-btn::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;

    width: 0%;
    height: 2px;

    background: linear-gradient(
        90deg,
        var(--teal),
        var(--teal-2)
    );

    transition: var(--transition);
    transform: translateX(-50%);
}

.filter-btn.active::after,
.filter-btn:hover::after {
    width: 100%;
}

.gallery-card {
    transition: all 0.4s ease;
}

/* hidden state */
.gallery-card.hide {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* benar-benar hilang dari grid */
.gallery-card.hidden {
    display: none;
}


/* =========================
   MEDIA QUERY 1024px
========================= */
@media (max-width: 1024px) {

  .section-header h2 {
    font-size: 2.3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }

  .gallery-overlay {
    padding: 1rem;
  }

  .gallery-overlay h3 {
    font-size: 1.1rem;
  }

  .tbm-thumbs {
    grid-template-columns: repeat(5, 1fr); 
  }

  .tbm-main img {
    aspect-ratio: 3/4;
  }

  .gallery-filter {
      flex-wrap: nowrap;
      justify-content: flex-start;

      overflow-x: auto;
      gap: 0.8rem;

      padding: 0.8rem 1rem;

      scroll-snap-type: x mandatory;
  }

  .gallery-filter::-webkit-scrollbar {
      display: none;
  }

  .filter-btn {
      flex: 0 0 auto;

      padding: 8px 14px;
      border-radius: 999px;

      background: var(--dark-card);
      border: 1px solid var(--border);

      font-size: 0.85rem;
      color: var(--text-secondary);

      scroll-snap-align: start;

      transition: var(--transition);
  }

  .filter-btn::after {
      display: none; 
  }

  .filter-btn:hover {
      background: var(--medium-gray);
      color: var(--white);
  }

  .filter-btn.active {
      background: linear-gradient(
          135deg,
          var(--teal),
          var(--teal-2)
      );
      color: var(--black);

      border: none;
      box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  }

}

/* =========================
   MEDIA QUERY 768px
========================= */
@media (max-width: 768px) {

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .gallery-card img {
    aspect-ratio: 3 / 4;
  }

  .gallery-overlay {
    padding: 0.9rem;
  }

  .gallery-overlay h3 {
    font-size: 1rem;
  }

  .gallery-overlay p {
    font-size: 0.8rem;
  }

  .tbm-main img {
    aspect-ratio: 3/4;
  }

  .tbm-thumbs {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }

  .tbm-thumb img {
    aspect-ratio: 3/4; 
    max-height: 80px;
  }

  .gallery-filter {
      flex-wrap: nowrap;
      justify-content: flex-start;

      overflow-x: auto;
      gap: 0.7rem;

      padding: 0.7rem 0.9rem;

      scroll-snap-type: x mandatory;
  }

  .gallery-filter::-webkit-scrollbar {
      display: none;
  }

  .filter-btn {
      flex: 0 0 auto;

      padding: 7px 13px;
      border-radius: 999px;

      background: var(--dark-card);
      border: 1px solid var(--border);

      font-size: 0.8rem;
      letter-spacing: 0.3px;

      color: var(--text-secondary);

      scroll-snap-align: start;

      transition: var(--transition);
  }

  .filter-btn::after {
      display: none;
  }

  .filter-btn:hover {
      background: var(--medium-gray);
      color: var(--white);
  }

  .filter-btn.active {
      background: linear-gradient(
          135deg,
          var(--teal),
          var(--teal-2)
      );
      color: var(--black);

      border: none;
      box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  }

}

/* =========================
   MEDIA QUERY 480px
========================= */
@media (max-width: 480px) {

  .section-header h2 {
    font-size: 1.6rem;
  }

  .section-header p {
    font-size: 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .gallery-card img {
    aspect-ratio: 3 / 4;
  }

  .gallery-overlay {
    padding: 0.7rem;
  }

  .gallery-overlay h3 {
    font-size: 0.9rem;
  }

  .gallery-overlay p {
    font-size: 0.75rem;
  }

  .btn-detail {
    font-size: 0.8rem;
    padding: 6px 8px;
  }

   .tbm-main img {
    aspect-ratio: 3/4;
  }

  .tbm-thumbs {
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }

  .tbm-thumb img {
    aspect-ratio: 3/4;
    max-height: 70px;
  }

  .gallery-filter {
      gap: 0.6rem;
      padding: 0.6rem 0.8rem;
  }

  .filter-btn {
      font-size: 0.75rem;
      padding: 6px 12px;
  }

}