/* Portfolio gallery — apply / candidate / admin / client / matching */
.pg-wrap { margin-top: 20px; }
.pg-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #15233F;
  font-weight: 600;
  margin: 0 0 8px;
}
.pg-hint {
  font-size: 13px;
  color: #5C6678;
  margin: 0 0 12px;
  line-height: 1.5;
}
.pg-on-dark .pg-label { color: #15233F; }
.pg-on-dark .pg-hint { color: #5C6678; }
.pg-on-dark .pg-caption {
  background: #FFFFFF;
  border-color: #E3DACB;
  color: #15233F;
}
.pg-on-dark .pg-item { background: transparent; }
.pg-drop {
  border: 1.5px dashed #E3DACB;
  background: #F6F1E8;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  color: #15233F;
  transition: border-color 0.15s, background 0.15s;
}
.pg-drop:hover,
.pg-drop.pg-dragover {
  border-color: #C45D2E;
  background: #FCFAF4;
}
.pg-drop-icon {
  display: block;
  margin: 0 auto 10px;
  width: 32px;
  height: 32px;
  color: #15233F;
}
.pg-drop-title {
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 4px;
}
.pg-drop-sub {
  font-size: 12px;
  color: #5C6678;
  margin: 0;
}
.pg-drop.pg-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.pg-err {
  color: #B23A2C;
  font-size: 13px;
  margin-top: 8px;
}
.pg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.pg-item {
  position: relative;
  background: #FCFAF4;
  border-radius: 8px;
  overflow: hidden;
}
.pg-item img,
.pg-thumb-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(21, 35, 63, 0.12);
  cursor: pointer;
  background: #E3DACB;
}
.pg-item-editable img { cursor: grab; }
.pg-item.pg-dragging { opacity: 0.45; }
.pg-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(21, 35, 63, 0.78);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.pg-caption {
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  border: 1px solid #E3DACB;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #15233F;
  -webkit-text-fill-color: #15233F;
  background: #fff;
  color-scheme: light;
  box-sizing: border-box;
}
.pg-caption-ro {
  font-size: 12px;
  color: #5C6678;
  margin-top: 6px;
  line-height: 1.4;
  min-height: 0;
}
.pg-section-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #15233F;
  margin: 16px 0 10px;
  font-weight: 600;
}
.pg-section-title.pg-light { color: #15233F; }
.pg-section-title.pg-navy { color: #15233F; }

/* Admin / client dark-ish contexts still use cream cards for samples */
.pg-grid-view .pg-item {
  background: transparent;
}
.pg-grid-view .pg-item img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.pg-strip {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pg-strip img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  background: #E3DACB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Lightbox */
.pg-lb {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pg-lb.open { display: flex; }
.pg-lb-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: min(920px, 100%);
  max-height: 90vh;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.pg-lb-img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F6F1E8;
  border-radius: 8px;
  overflow: hidden;
}
.pg-lb-img-wrap img {
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  display: block;
}
.pg-lb-cap {
  margin-top: 12px;
  font-size: 14px;
  color: #15233F;
  line-height: 1.5;
  text-align: center;
  min-height: 1.2em;
}
.pg-lb-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #15233F;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.pg-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(21, 35, 63, 0.85);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.pg-lb-prev { left: 8px; }
.pg-lb-next { right: 8px; }
.pg-lb-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.pg-lb-count {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 12px;
  color: #5C6678;
}

@media (max-width: 640px) {
  .pg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pg-lb { padding: 12px; }
}
