/* Portfolio — j5/oraz masonry thumbs + hover plus + lightbox */
.portfolio-page {
  padding: 40px 0 72px;
}
.portfolio-page .container {
  max-width: 1240px;
}
.portfolio-page .pgs-section-head {
  margin: 8px 0 36px;
  max-width: 720px;
}
.portfolio-page .pgs-section-title {
  margin: 6px 0 10px;
}
.portfolio-page .pgs-lead {
  margin: 0;
  color: var(--ink-2, #1a2433);
  font-size: 17px;
  line-height: 1.55;
}

/* Showcase grid — same language as homepage .pgs-shots */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pf-grid .pgs-shot {
  position: relative;
  display: block;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eef3fb;
  box-shadow: 0 16px 36px rgba(15, 40, 80, 0.12);
  text-decoration: none !important;
}
.pf-grid .pgs-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease, filter 0.55s ease;
}
.pf-grid .pgs-shot:hover img {
  transform: scale(1.07);
}

/* hover scrim + title + zoom */
.pf-shot-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, rgba(3, 20, 50, 0) 42%, rgba(3, 20, 50, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.pf-grid .pgs-shot:hover .pf-shot-info {
  opacity: 1;
}
.pf-shot-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.pf-shot-tag {
  color: #9ec2ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

@media (max-width: 991px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
  .pf-grid { grid-template-columns: 1fr; }
}
.pf-gallery {
  columns: 3 280px;
}
.pf-cover {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 8px 0 18px;
}
.pf-desc {
  margin: 18px 0 28px;
  max-width: 860px;
}
.item-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 16px;
  font-size: 14px;
}
.item-nav a {
  color: #0345BF;
  text-decoration: none;
  font-weight: 600;
}
.item-nav-sep { color: #999; }

/* lightbox — must stack ABOVE #pf-modal (10050) */
#pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: grid;
  place-items: center;
  padding: 24px;
}
#pf-lightbox[hidden] { display: none !important; }
.pf-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.82);
  cursor: zoom-out;
}
.pf-lb-fig {
  position: relative;
  margin: 0;
  max-width: min(1100px, 96vw);
  max-height: 90vh;
}
.pf-lb-fig img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.pf-lb-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0b1220;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.pf-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0b1220;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.pf-lb-prev { left: 18px; }
.pf-lb-next { right: 18px; }
.pf-lb-nav:hover { background: #fff; }
.pf-lb-caption {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  pointer-events: none;
}
.pf-lb-counter { opacity: 0.95; }

/* ===== J3 TZ Portfolio modal (fancybox / tmpl=component) ===== */
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
}
.pf-modal[hidden] { display: none !important; }
.pf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.72);
  cursor: zoom-out;
}
.pf-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.pf-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #0b1220;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.pf-modal-body { padding: 28px 28px 24px; }

.tp-pf-modal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.tp-pf-media .main-image {
  border-radius: 10px;
  overflow: hidden;
  background: #f1f3f7;
}
.tp-pf-media .main-image img {
  display: block;
  width: 100%;
  height: auto;
}
.tp-pf-media .tprow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.tp-pf-media .subimage {
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f7;
}
.tp-pf-media .subimage .bgimage {
  width: 100%;
  padding-top: 75%;
  background-size: cover;
  background-position: center;
}
.tp-pf-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.tp-pf-title {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.25;
  color: #0b1220;
}
.tp-pf-text .introtext {
  font-size: 15px;
  line-height: 1.7;
  color: #1a2433;
}
.tp-pf-text .introtext h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #0b1220;
}
.tp-pf-text .introtext h3 {
  font-size: 17px;
  margin: 16px 0 8px;
  color: #0b1220;
}
.tp-pf-text .introtext p { margin: 0 0 12px; }
.tp-pf-text .introtext ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.tp-pf-text .introtext li { margin: 0 0 6px; }
.tp-pf-text .introtext strong { font-weight: 700; }
.tpArticleExtraField { margin-top: 18px; }
.tpExtraFields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.tp_extrafield-label { color: #5b6b85; }
.tp_extrafield-value { font-weight: 700; color: #0b1220; }
.pf-year { margin: 4px 0 14px; color: #5b6b85; font-size: 14px; }
.pf-loading, .pf-muted { color: #5b6b85; }

@media (max-width: 900px) {
  .tp-pf-modal { grid-template-columns: 1fr; gap: 18px; }
  .pf-modal { padding: 12px; }
  .pf-modal-body { padding: 18px 14px 14px; }
  .tp-pf-title { font-size: 22px; }
}

@media (max-width: 991px) {
  .pf-grid { columns: 2 160px; }
  .pf-gallery { columns: 2 160px; }
}
@media (max-width: 576px) {
  .pf-grid, .pf-gallery { columns: 1; }
}
