/* ================================================================
   portfolio.css — Aria Studio Portfolio Page
   ================================================================ */

/* ── Compact hero ─────────────────────────────────────────────── */
.ptf-hero {
  padding: calc(var(--header-h) + 56px) 0 56px;
  background: var(--espresso);
  min-height: 390px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.ptf-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.ptf-hero .container { width: 100%; }
.ptf-hero h1 { font-size: clamp(40px, 5.5vw, 68px); margin-top: 6px; }
.ptf-hero-lead {
  font-size: 17px;
  line-height: 1.75;
  color: var(--taupe);
  max-width: 520px;
  margin-top: 18px;
}

/* ── Gallery section ─────────────────────────────────────────── */
.ptf-section {
  padding: 72px 0 100px;
  background: var(--obsidian);
}
.ptf-wide {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Portfolio Finder ─────────────────────────────────────────── */
.ptf-finder {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.ptf-finder .eyebrow { margin-bottom: 10px; font-size: 12px; }
.ptf-finder-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.5vw, 26px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
}
.ptf-finder-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--taupe);
  margin-bottom: 20px;
  max-width: 520px;
}
.ptf-search-row {
  display: flex;
  gap: 10px;
  max-width: 640px;
}
.ptf-search-input {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(185,133,69,0.35);
  border-radius: 3px;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.ptf-search-input::placeholder { color: var(--taupe); font-size: 14px; }
.ptf-search-input:focus {
  border-color: var(--champagne);
  background: rgba(255,255,255,0.07);
}
.ptf-search-btn {
  min-height: 48px;
  padding: 0 24px;
  background: var(--gold);
  border: none;
  border-radius: 3px;
  color: var(--obsidian);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.ptf-search-btn:hover { background: var(--champagne); }
.ptf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ptf-pill {
  padding: 7px 15px;
  border: 1px solid rgba(185,133,69,0.28);
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--taupe);
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
}
.ptf-pill:hover { border-color: var(--gold); color: var(--gold); }

/* Search results container */
.ptf-results { margin-bottom: 24px; }

/* ── Category filters ─────────────────────────────────────────── */
.ptf-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.ptf-filters::-webkit-scrollbar { display: none; }
.ptf-filter-tab {
  padding: 9px 22px;
  border: 1px solid rgba(185,133,69,0.28);
  border-radius: 100px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248,242,234,0.55);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.ptf-filter-tab:hover {
  border-color: var(--gold);
  color: var(--champagne);
}
.ptf-filter-tab.active {
  background: rgba(185,133,69,0.14);
  border-color: var(--gold);
  color: var(--champagne);
}

/* ── Gallery grid ─────────────────────────────────────────────── */
/*
  Flexbox wrap, justified centre so incomplete final rows
  are centred automatically — no JS row-counting needed.
  3 columns desktop → 2 tablet → 1 mobile.
*/
.ptf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.ptf-card {
  flex: 0 0 calc(33.333% - 11px);
  overflow: hidden;
  position: relative;
  background: var(--espresso);
  border-radius: 2px;
  cursor: pointer;
}

/* Per-card aspect ratios */
.ptf-card.ratio-4-5 { aspect-ratio: 4/5; }
.ptf-card.ratio-3-4 { aspect-ratio: 3/4; }
.ptf-card.ratio-1-1 { aspect-ratio: 1/1; }

/* Image fills card — no distortion, no stretch */
.ptf-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top; /* default; overridden inline where needed */
  display: block;
  transition: transform 0.38s ease;
  aspect-ratio: unset !important; /* override global masonry-item img rule */
}

/* ── Hover overlay ─────────────────────────────────────────────── */
.ptf-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15,12,10,0.72) 0%,
    rgba(15,12,10,0.18) 45%,
    rgba(15,12,10,0)    72%
  );
  opacity: 0;
  transition: opacity 0.38s ease;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 18px 16px;
}
.ptf-tag {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--champagne);
  transform: translateY(5px);
  transition: transform 0.38s ease;
}
.ptf-card:hover img { transform: scale(1.03); }
.ptf-card:hover .ptf-overlay { opacity: 1; }
.ptf-card:hover .ptf-tag { transform: translateY(0); }

/* Hidden state (used by both filter + load-more) */
.ptf-grid .masonry-item.hidden { display: none !important; }

/* Reset masonry bottom-margin so gap handles spacing */
.ptf-grid .masonry-item { margin-bottom: 0; }

/* ── Load More ────────────────────────────────────────────────── */
.ptf-load-wrap {
  text-align: center;
  margin-top: 56px;
}
.ptf-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 44px;
  border: 1px solid rgba(185,133,69,0.5);
  border-radius: 2px;
  background: transparent;
  color: var(--champagne);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ptf-load-btn:hover {
  background: rgba(185,133,69,0.1);
  border-color: var(--gold);
}
.ptf-load-btn[hidden] { display: none; }

/* ── WedMeGood ────────────────────────────────────────────────── */
.ptf-wmg {
  padding: 52px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
.ptf-wmg p {
  font-size: 15px;
  color: var(--taupe);
  margin-bottom: 14px;
  line-height: 1.65;
}
.ptf-wmg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--champagne);
  border-bottom: 1px solid rgba(210,175,120,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.ptf-wmg-link:hover { color: var(--ivory); border-color: var(--champagne); }

/* ── Responsive: tablet 640–1024 ─────────────────────────────── */
@media (max-width: 1024px) {
  .ptf-grid { gap: 12px; }
  .ptf-card { flex: 0 0 calc(50% - 6px); }
  .ptf-wide { padding: 0 24px; }
}

/* ── Responsive: mobile <640 ──────────────────────────────────── */
@media (max-width: 640px) {
  .ptf-wide { padding: 0 20px; }
  .ptf-section { padding: 52px 0 72px; }
  .ptf-hero {
    min-height: auto;
    padding: calc(var(--header-h) + 36px) 0 44px;
  }
  .ptf-hero h1 { font-size: clamp(32px, 9vw, 48px); }
  .ptf-hero-lead { font-size: 15px; margin-top: 14px; }
  .ptf-grid { gap: 10px; }
  .ptf-card { flex: 0 0 100%; }
  .ptf-search-row { flex-direction: column; }
  .ptf-search-btn { min-height: 44px; }
  .ptf-pills { gap: 6px; }
  .ptf-finder { margin-bottom: 28px; padding-bottom: 28px; }
  .ptf-filters { gap: 6px; }
  .ptf-filter-tab { padding: 8px 18px; font-size: 11px; }
  .ptf-load-wrap { margin-top: 40px; }
}

/* ── Lightbox improvements ────────────────────────────────────── */
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 2px;
}
.lightbox-close {
  font-size: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }
.lightbox-prev,
.lightbox-next {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.16); }
