/* ═══════════════════════════════════════════════════════════════════
   portfolio-grid.css — Behance-style 4-col project grid
   ourhome. portfolio — FOR VISITORS/USERS
   ═══════════════════════════════════════════════════════════════════ */

/* ── FILTERS ──────────────────────────────────────────────────────── */
#filters {
  padding: 20px 40px 12px !important;
}

/* ── PROJECTS GRID — Behance-style: 4-up baseline, auto-fill so it
   naturally packs more columns on wide/zoomed-out viewports and fewer
   on narrow ones, without needing a media query for every width ────── */
#projects {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 12px !important;
  padding: 0 40px 24px !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex-direction: unset !important;
}

/* ── BASE CARD ────────────────────────────────────────────────────── */
.pcard {
  position: relative;
  display: block;
  background: #111;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  animation: pcardIn 0.4s ease both;
  /* Behance-style: fixed ratio box */
  aspect-ratio: 4 / 3;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}

.pcard:hover {
  transform: translateY(-4px);
}

/* ── MEDIA fills the card ─────────────────────────────────────────── */
.pcard__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.pcard__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.pcard:hover .pcard__media img {
  transform: scale(1.06);
}

/* Placeholder saat belum ada thumbnail */
.pcard__placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
}
.pcard__placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.02) 10px,
    rgba(255,255,255,0.02) 11px
  );
}

/* ── DARK OVERLAY — only visible on hover ─────────────────────────── */
.pcard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.85) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pcard:hover .pcard__overlay {
  opacity: 1;
}

/* ── INFO — only visible on hover ─────────────────────────────────── */
.pcard__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pcard:hover .pcard__info {
  opacity: 1;
  transform: translateY(0);
}

.pcard__cat {
  display: block;
  font-family: var(--font-mono, 'Space Grotesk', monospace);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 3px;
}

.pcard__title {
  font-family: var(--font-display, 'Switzer', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  /* Truncate if too long */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard__brand { display: none; }

/* ── ARROW on hover ───────────────────────────────────────────────── */
.pcard__arrow {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #000;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.pcard:hover .pcard__arrow {
  opacity: 1;
  transform: scale(1);
}


/* ── ANIMATION ────────────────────────────────────────────────────── */
@keyframes pcardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
/* Desktop/tablet: auto-fill (above) naturally adds more columns as the
   viewport gets wider or the user zooms out — no fixed breakpoint needed. */
@media (max-width: 1100px) {
  #projects { padding-left: 24px !important; padding-right: 24px !important; }
  #filters  { padding-left: 24px !important; padding-right: 24px !important; }
}

/* Phone: always exactly 2 columns, regardless of zoom */
@media (max-width: 700px) {
  #projects {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  #filters { padding-left: 16px !important; padding-right: 16px !important; }
  .pcard__title { font-size: 12px; }
}