/* ==========================================================
   Binanusa Proyek Element - Tema Biru & Putih
   ========================================================== */

.bn-proyek {
  --bn-primary: #0A4FB3;
  --bn-dark: #062C66;
  --bn-light: #EAF2FF;
  --bn-line: #DCE8FB;
  --bn-text: #14284B;
  --bn-muted: #5B6B85;
  --bn-img-h: 240px;
  position: relative;
  padding: 10px 0;
  color: var(--bn-text);
}
.bn-proyek *,
.bn-proyek *::before,
.bn-proyek *::after { box-sizing: border-box; }

/* ---------- Judul section ---------- */
.bn-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 34px;
}
.bn-head__title {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--bn-dark);
  letter-spacing: -.5px;
}
.bn-head__bar {
  display: block;
  width: 70px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--bn-primary), #4C9BFF);
}
.bn-head__sub {
  margin: 0;
  color: var(--bn-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ---------- Filter ---------- */
.bn-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 36px;
}
.bn-filter__btn {
  appearance: none;
  cursor: pointer;
  margin: 0;
  padding: 10px 24px;
  border: 1.5px solid var(--bn-line);
  border-radius: 99px;
  background: #fff;
  color: var(--bn-primary);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  text-transform: none;
  transition: all .25s ease;
}
.bn-filter__btn:hover {
  background: var(--bn-light);
  border-color: var(--bn-primary);
  transform: translateY(-2px);
}
.bn-filter__btn.is-active {
  background: linear-gradient(135deg, var(--bn-primary), var(--bn-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 79, 179, .3);
}

/* ---------- Grid ---------- */
.bn-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr);
}
.bn-cols-1 .bn-grid { grid-template-columns: 1fr; }
.bn-cols-2 .bn-grid { grid-template-columns: repeat(2, 1fr); }
.bn-cols-3 .bn-grid { grid-template-columns: repeat(3, 1fr); }
.bn-cols-4 .bn-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1099px) {
  .bn-cols-4 .bn-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 849px) {
  .bn-cols-3 .bn-grid,
  .bn-cols-4 .bn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 549px) {
  .bn-grid,
  .bn-cols-2 .bn-grid,
  .bn-cols-3 .bn-grid,
  .bn-cols-4 .bn-grid { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Kartu ---------- */
.bn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--bn-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(6, 44, 102, .07);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.bn-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bn-primary), #4C9BFF);
  transition: width .45s ease;
  z-index: 3;
}
.bn-card:hover {
  transform: translateY(-8px);
  border-color: #BFD5F7;
  box-shadow: 0 22px 50px rgba(6, 44, 102, .17);
}
.bn-card:hover::after { width: 100%; }

.bn-card.is-hidden { display: none; }
.bn-card.bn-anim { animation: bnIn .5s ease both; }

@keyframes bnIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Media */
.bn-card__media {
  position: relative;
  display: block;
  height: var(--bn-img-h);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bn-dark), var(--bn-primary));
}
.bn-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 44, 102, .5), rgba(6, 44, 102, 0) 55%);
  opacity: .75;
  transition: opacity .35s ease;
  pointer-events: none;
}
.bn-card:hover .bn-card__media::after { opacity: 1; }

.bn-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .7s ease;
}
.bn-card:hover .bn-card__media img { transform: scale(1.09); }

.bn-card__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, .3);
  font-size: 5.5rem;
  font-weight: 800;
}

.bn-card__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .95);
  color: var(--bn-primary);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  line-height: 1.3;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

/* Body */
.bn-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px 24px 26px;
}
.bn-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--bn-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}
.bn-card__meta::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--bn-primary);
}
.bn-card__title {
  margin: 0 0 10px;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.2px;
}
.bn-card__title a {
  color: var(--bn-dark);
  transition: color .25s ease;
}
.bn-card__title a:hover { color: var(--bn-primary); }

.bn-card__text {
  display: -webkit-box;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--bn-muted);
  font-size: .94rem;
  line-height: 1.7;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.bn-card__btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 10px 0 2px;
  border-bottom: 2px solid transparent;
  color: var(--bn-primary);
  font-size: .92rem;
  font-weight: 800;
  transition: gap .25s ease, border-color .25s ease;
}
.bn-card__btn svg { transition: transform .25s ease; }
.bn-card__btn:hover { gap: 12px; border-color: var(--bn-primary); }
.bn-card__btn:hover svg { transform: translateX(3px); }

/* ---------- Gaya OVERLAY ---------- */
.bn-style-overlay .bn-card { border: 0; min-height: calc(var(--bn-img-h) + 90px); }
.bn-style-overlay .bn-card__media {
  position: absolute;
  inset: 0;
  height: 100%;
}
.bn-style-overlay .bn-card__media::after {
  background: linear-gradient(to top, rgba(6, 44, 102, .95) 8%, rgba(6, 44, 102, .35) 55%, rgba(6, 44, 102, .05));
  opacity: 1;
}
.bn-style-overlay .bn-card__body {
  position: relative;
  z-index: 2;
  justify-content: flex-end;
  min-height: calc(var(--bn-img-h) + 90px);
  pointer-events: none;
}
.bn-style-overlay .bn-card__body a { pointer-events: auto; }
.bn-style-overlay .bn-card__meta { color: #9CC4FF; }
.bn-style-overlay .bn-card__meta::before { background: #9CC4FF; }
.bn-style-overlay .bn-card__title a,
.bn-style-overlay .bn-card__btn { color: #fff; }
.bn-style-overlay .bn-card__title a:hover { color: #BBD8FF; }
.bn-style-overlay .bn-card__text {
  max-height: 0;
  margin: 0;
  color: #D6E5FF;
  opacity: 0;
  transition: max-height .45s ease, opacity .45s ease, margin .45s ease;
}
.bn-style-overlay .bn-card:hover .bn-card__text {
  max-height: 100px;
  margin: 0 0 16px;
  opacity: 1;
}
.bn-style-overlay .bn-card__btn:hover { border-color: #fff; }
.bn-style-overlay .bn-card__badge { z-index: 3; }

/* Layar sentuh: ringkasan selalu terlihat pada gaya overlay */
@media (hover: none) {
  .bn-style-overlay .bn-card__text { max-height: 100px; margin: 0 0 16px; opacity: 1; }
}

/* ---------- Kosong ---------- */
.bn-empty {
  margin: 20px 0 0;
  padding: 36px 20px;
  border: 2px dashed var(--bn-line);
  border-radius: 16px;
  background: var(--bn-light);
  color: var(--bn-primary);
  text-align: center;
  font-weight: 600;
}
.bn-empty[hidden] { display: none; }
