/* ============================================================
   WB Digital - Work Showcase (2026 overhaul)
   Self-contained. Dark + lime (#c9f31d) + Kanit to match site.
   Uniform cards enforced via fixed 16:10 ratio + object-fit cover.
   ============================================================ */

.work2 { padding: 90px 0 130px; position: relative; background: #0d0d0d; font-family: "Kanit", sans-serif; }
.work2 * { box-sizing: border-box; }
.work2 .work2__container { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

.work2__head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 28px; margin-bottom: 42px;
}
.work2__eyebrow {
  font-family: "Kanit", sans-serif; font-size: 13px; letter-spacing: .22em;
  text-transform: uppercase; color: #c9f31d; margin: 0 0 14px;
}
.work2__title {
  font-family: "Kanit", sans-serif; font-weight: 600;
  font-size: clamp(42px, 7vw, 90px); line-height: .92; margin: 0;
  letter-spacing: -0.02em; color: #fff;
}
.work2__title span { color: #c9f31d; }
.work2__intro {
  max-width: 430px; color: #9a9a9a; font-size: 16px;
  line-height: 1.65; margin: 0;
}

/* ---- filters ---- */
.work2__filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 38px; }
.work2__filter {
  font-family: "Kanit", sans-serif; font-size: 14px; letter-spacing: .02em;
  color: #cfcfcf; background: transparent; border: 1px solid rgba(255,255,255,.16);
  padding: 10px 20px; border-radius: 100px; cursor: pointer;
  transition: all .25s ease; white-space: nowrap;
}
.work2__filter:hover { border-color: #c9f31d; color: #fff; }
.work2__filter.is-active { background: #c9f31d; border-color: #c9f31d; color: #0c0c0c; font-weight: 500; }

/* ---- grid ---- */
.work2__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 26px;
}
.work2__card {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #161616; border: 1px solid rgba(255,255,255,.06);
  cursor: pointer; text-align: left;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.work2__card:hover { transform: translateY(-6px); border-color: rgba(201,243,29,.5); box-shadow: 0 22px 55px rgba(0,0,0,.55); }
.work2__card[hidden] { display: none; }

.work2__thumb { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0c0c; }
.work2__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .6s ease; }
.work2__card:hover .work2__thumb img { transform: scale(1.05); }

.work2__cat {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: "Kanit", sans-serif; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: #0c0c0c; background: #c9f31d;
  padding: 5px 12px; border-radius: 100px;
}

.work2__body { padding: 22px 24px 26px; }
.work2__name { font-family: "Kanit", sans-serif; font-weight: 500; font-size: 22px; color: #fff; margin: 0 0 5px; }
.work2__loc { font-size: 13px; color: #8a8a8a; margin: 0 0 13px; }
.work2__desc { font-size: 14px; line-height: 1.55; color: #b3b3b3; margin: 0; }
.work2__view {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-family: "Kanit", sans-serif; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: #c9f31d;
}
.work2__view svg { width: 14px; height: 14px; }

/* ---- modal / case-study view ---- */
.work2__modal {
  font-family: "Kanit", sans-serif;
  position: fixed; inset: 0; z-index: 99999; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(8,8,8,.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.work2__modal.is-open { display: flex; }
.work2__dialog {
  position: relative; max-width: 1040px; width: 100%; max-height: 90vh; overflow: auto;
  background: #141414; border: 1px solid rgba(255,255,255,.1); border-radius: 18px;
}
.work2__dialog img { width: 100%; display: block; border-bottom: 1px solid rgba(255,255,255,.08); }
.work2__dialog-body { padding: 30px 34px 36px; }
.work2__dialog-body .work2__cat { position: static; display: inline-block; margin-bottom: 14px; }
.work2__dialog-body h3 { font-family: "Kanit", sans-serif; font-weight: 500; font-size: 32px; color: #fff; margin: 0 0 10px; }
.work2__dialog-body p { color: #b9b9b9; font-size: 15px; line-height: 1.65; margin: 0; }
.work2__close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 3; transition: all .2s ease;
}
.work2__close:hover { background: #c9f31d; color: #0c0c0c; }

/* ---- responsive ---- */
@media (max-width: 768px) {
  .work2 { padding: 58px 0 84px; }
  .work2 .work2__container { padding: 0 20px; }
  .work2__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .work2__grid { grid-template-columns: 1fr; gap: 18px; }
  .work2__filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .work2__filter { flex: 0 0 auto; }
  .work2__dialog-body { padding: 22px 22px 28px; }
  .work2__dialog-body h3 { font-size: 25px; }
}
