/* =============================================
   UniqDzyns — Portfolio Stylesheet
   portfolio.css
   ============================================= */

/* PAGE HEADER */
.pf-header {
  background: linear-gradient(160deg, #fdfcfa 0%, #f5f0f8 50%, #f0f5ee 100%);
  padding: 5rem 3rem 4rem;
  text-align: center;
  border-bottom: 0.5px solid #ede8e2;
  position: relative;
  overflow: hidden;
}

.pf-header-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }

.pf-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  color: #5c4a7a;
  line-height: 1;
  margin-bottom: 1rem;
}

.pf-header p {
  font-size: 0.95rem;
  color: #7a7470;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* FILTER BAR */
.pf-filter-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem 3rem;
  background: #fff;
  border-bottom: 0.5px solid #ede8e2;
  position: sticky;
  top: 70px;
  z-index: 90;
}

.pf-filter {
  background: transparent;
  border: 0.5px solid #ccc8c2;
  color: #7a7470;
  padding: 0.45rem 1.3rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.pf-filter:hover {
  border-color: #5c4a7a;
  color: #5c4a7a;
}

.pf-filter.active {
  background: #5c4a7a;
  border-color: #5c4a7a;
  color: #fff;
}

/* MAIN PORTFOLIO AREA */
.pf-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem;
}

/* CASE STUDY BLOCK */
.pf-case {
  margin-bottom: 1rem;
  transition: opacity 0.3s;
}

.pf-case.hidden {
  display: none;
}

.pf-case-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.pf-client-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b8956a;
  margin-bottom: 0.4rem;
}

.pf-case-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  color: #5c4a7a;
  margin-bottom: 0.35rem;
}

.pf-scope {
  font-size: 0.8rem;
  color: #9a9490;
  letter-spacing: 0.04em;
}

.pf-years {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: #b8956a;
  white-space: nowrap;
  padding-top: 1.8rem;
}

/* IMAGE GRIDS */
.pf-case-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Tanner — tall desktop + 2 mobile stacked */
.tanner-grid {
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: auto;
}

.tanner-grid .tall {
  grid-row: span 2;
}

/* Carlin Bay — logo + 3 menus */
.carlin-grid {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.carlin-grid .logo-wrap {
  background: #e8f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 6px;
}

.carlin-grid .logo-wrap img {
  object-fit: contain;
  max-height: 200px;
}

/* Black Chamber — 3 equal */
.chamber-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Keller Williams — 2 wide */
.kw-grid {
  grid-template-columns: 1fr 1fr;
}

/* Acerlogic — single centered */
.acerlogic-grid {
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
}

/* UniqDzyns — logo + 2 */
.ud-grid {
  grid-template-columns: 1fr 1fr 1fr;
}

.ud-logo-wrap {
  background: #f5f0f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 6px;
}

.ud-logo-wrap img {
  object-fit: contain;
  max-height: 180px;
}

/* IMAGE WRAP */
.pf-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 0.5px solid #e8e4df;
  background: #faf9f7;
  cursor: zoom-in;
}

.pf-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pf-img-wrap:hover img {
  transform: scale(1.03);
}

.pf-img-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(92, 74, 122, 0.85);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.pf-img-wrap:hover .pf-img-label {
  transform: translateY(0);
}

/* TAGS */
.pf-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pf-tag {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a6890;
  background: #f0ecf8;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}

/* DIVIDER BETWEEN CASES */
.pf-divider {
  width: 100%;
  height: 0.5px;
  background: #ede8e2;
  margin: 3.5rem 0;
}

/* LIGHTBOX */
.pf-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 40, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.pf-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.pf-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.pf-lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pf-lightbox-close:hover { background: rgba(255,255,255,0.25); }

.pf-lightbox-caption {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

/* CTA STRIP */
.pf-cta-strip {
  background: linear-gradient(135deg, #f5f0f8, #f0f5ee);
  padding: 5rem 3rem;
  text-align: center;
}

.pf-cta-strip h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: #5c4a7a;
  margin-bottom: 0.75rem;
}

.pf-cta-strip p {
  font-size: 0.9rem;
  color: #7a7470;
  margin-bottom: 2.5rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .tanner-grid { grid-template-columns: 1fr 1fr; }
  .tanner-grid .tall { grid-row: span 1; }
  .carlin-grid { grid-template-columns: 1fr 1fr; }
  .chamber-grid { grid-template-columns: 1fr 1fr; }
  .ud-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .pf-header { padding: 3.5rem 1.5rem 3rem; }
  .pf-main { padding: 3rem 1.5rem; }
  .pf-filter-bar { padding: 1.5rem; gap: 0.5rem; }
  .tanner-grid,
  .carlin-grid,
  .chamber-grid,
  .kw-grid,
  .ud-grid { grid-template-columns: 1fr; }
  .pf-case-header { flex-direction: column; gap: 0.5rem; }
  .pf-years { padding-top: 0; }
}

/* =============================================
   LOGO & CONTAIN IMAGE HELPERS
   ============================================= */
.logo-bg {
  background: #f5f0f8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 200px;
}

.contain-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  max-height: 220px;
}

/* Constrained size for presentation/flyer thumbnails */
.contain-img-md {
  width: 100%;
  object-fit: contain !important;
  max-height: 180px;
}

/* PDF badge overlay */
.pf-pdf-wrap {
  cursor: pointer;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #faf9f7;
}

.pf-pdf-badge {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5c4a7a;
  background: rgba(92,74,122,0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  border: 0.5px solid #c4b8d8;
  transition: background 0.2s;
}

.pf-pdf-wrap:hover .pf-pdf-badge {
  background: #5c4a7a;
  color: #fff;
}

/* =============================================
   IMAGE-LEVEL FILTERING
   ============================================= */
.pf-img-wrap.pf-hidden {
  display: none;
}

/* When a case has no visible images, hide the whole case + its divider */
.pf-case.pf-case-empty {
  display: none;
}

.pf-case.pf-case-empty + .pf-divider {
  display: none;
}
