/* ============================================================================
   Shared project card grid + custom lightbox styles.
   Used by project.php (grid) and index.php (ongoing carousel).
   ========================================================================== */

/* ---- Grid: equal-height cards, exactly 4 per row ---- */
.projects-grid {
  align-items: stretch;
  row-gap: 26px;
}
.projects-grid .column {
  display: flex;
  -ms-flex: 0 0 25%;
  flex: 0 0 25%;
  max-width: 25%;
}
@media screen and (max-width: 800px) {
  .projects-grid .column {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
}
@media screen and (max-width: 600px) {
  .projects-grid .column {
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ---- Card ---- */
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.06);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: #e2e2e2;
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.16);
}

/* Media */
.project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f1f2f4;
}
.project-card__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  margin: 0 !important;
  transition: transform .6s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.07); }
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0) 55%);
  opacity: 0;
  transition: opacity .35s ease;
}
.project-card:hover .project-card__media::after { opacity: 1; }

.project-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(6, 94, 172, 0.95);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .22);
}
.project-card__badge svg { width: 13px; height: 13px; }

.project-card__view {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
}
.project-card:hover .project-card__view { transform: translateY(0); opacity: 1; }
.project-card__view svg { width: 15px; height: 15px; }

/* Body */
.project-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  border-top: 3px solid #CEE002;
}
.project-card__title {
  margin: 0 0 7px;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2933;
}
.project-card__caption {
  margin: 0;
  font-size: .85rem;
  line-height: 1.55;
  color: #6b7280;
}

/* ---- Custom lightbox (matches reference design) ---- */
.pglb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.pglb.is-open { opacity: 1; visibility: visible; }

.pglb__stage {
  position: relative;
  width: 100%;
  max-width: 64rem;
  height: 80vh;
  margin: 0 5rem;
}
.pglb__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pglb__btn {
  position: absolute;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}
.pglb__btn:hover { background: rgba(255, 255, 255, .22); }
.pglb__btn svg { width: 24px; height: 24px; }

.pglb__close { top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; }
.pglb__close svg { width: 20px; height: 20px; }
.pglb__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.pglb__prev { left: 1.5rem; }
.pglb__next { right: 1.5rem; }
.pglb__btn[disabled] { opacity: .3; cursor: default; }
.pglb__btn[disabled]:hover { background: rgba(255, 255, 255, .12); }

.pglb__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
}
.pglb__bottom-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.pglb__counter {
  margin: 0 0 4px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
  letter-spacing: 1px;
}
.pglb__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 300;
  color: #fff;
}
.pglb__thumbs {
  display: flex;
  gap: 8px;
  max-width: 65%;
  overflow-x: auto;
  padding: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.pglb__thumbs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.pglb__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  border: none;
  padding: 0;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s ease, box-shadow .2s ease;
}
.pglb__thumb img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; }
.pglb__thumb:hover { opacity: .85; }
.pglb__thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, .5);
}

.pglb__hints {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  display: flex;
  gap: 1rem;
  font-size: .72rem;
  color: rgba(255, 255, 255, .4);
}
.pglb__hints kbd {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .6);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: .72rem;
}

@media screen and (max-width: 767px) {
  .pglb__stage { margin: 0 1rem; height: 62vh; }
  .pglb__nav { width: 40px; height: 40px; }
  .pglb__prev { left: .5rem; }
  .pglb__next { right: .5rem; }
  .pglb__hints { display: none; }
  .pglb__thumbs { display: none; }
  .pglb__bottom-inner { justify-content: center; text-align: center; }
}
