/* ============================================================
   Portfolio page — Artland Design
   Built on tokens from style.css (--bg, --gold, --text, etc.)
   ============================================================ */

.page-portfolio {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(212, 164, 55, 0.10), transparent 35%),
    radial-gradient(ellipse at 100% 100%, rgba(212, 164, 55, 0.05), transparent 40%),
    var(--bg);
  min-height: 100vh;
}

/* push content below fixed header */
.pf-hero {
  padding: 140px 0 40px;
  position: relative;
}

/* Filter bar + grid sit in their own section below the breadcrumb so
   the Works page matches the rest of the site's hero → breadcrumb →
   body order. Top padding gives the filter pills room to breathe below
   the breadcrumb. */
.pf-body {
  padding: 28px 0 56px;
}

/* --- Image-background variant of .pf-hero ---------------------------
   Mirrors `.form-hero--image-bg` (forms.css) so the Works page hero
   matches Contact Us / Get a Free Quote / About Us in height. Activated
   by setting a Featured Image on the Works page — portfolio.php adds
   the modifier class + the `--hero-bg` CSS variable. */
.pf-hero--image-bg {
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 768px) {
  .pf-hero--image-bg { min-height: 320px; }
}
.pf-hero--image-bg::before,
.pf-hero--image-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pf-hero--image-bg::before {
  background-image: var(--hero-bg);
  background-size: cover;
  /* Default to centered; per-page Hero Image Position picker overrides
     by setting `--hero-focal` to "X% Y%" via inline style. */
  background-position: var(--hero-focal, center center);
  z-index: 0;
}
.pf-hero--image-bg::after {
  /* DEFAULT — original 3-stop vertical (lighter middle) + horizontal
     up-to-60% (slightly darker left/right than post-hero variant). */
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.30) 30%, rgba(10, 10, 10, 0.85) 100%),
    linear-gradient(90deg,  rgba(10, 10, 10, 0.70) 0%, rgba(10, 10, 10, 0.15) 60%);
  z-index: 1;
}
.pf-hero--image-bg.has-hero-overlay::after {
  /* CUSTOM — only when post has saved overlay values. */
  background:
    linear-gradient(180deg,
      rgba(10, 10, 10, var(--hero-overlay-top,    0.55)) 0%,
      rgba(10, 10, 10, var(--hero-overlay-bottom, 0.85)) 100%),
    linear-gradient(90deg,
      rgba(10, 10, 10, var(--hero-overlay-left,   0.70)) 0%,
      rgba(10, 10, 10, var(--hero-overlay-right,  0.15)) 100%);
}
.pf-hero--image-bg .container { position: relative; z-index: 2; }
.pf-hero--image-bg .pf-title { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55); }
.pf-hero--image-bg .pf-desc p { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }

/* ============================================================
   Editorial header — title (left) + description (right)
   ============================================================ */
.pf-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}
.pf-intro { min-width: 0; }

/* Refined eyebrow: small gold caps + horizontal accent line */
.pf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.pf-eyebrow-text {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.pf-eyebrow-line {
  width: 90px;
  height: 1px;
  background: linear-gradient(to right,
    var(--gold) 0%,
    rgba(212, 164, 55, 0.55) 55%,
    rgba(212, 164, 55, 0) 100%);
  display: block;
}

/* Editorial headline — Plus Jakarta Sans (home-page font),
   light weight + mixed case. Sized so it reads ~1.2× the pill height
   (matching the reference's restrained proportions). */
.pf-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
  text-transform: none;
}
.pf-title span {
  color: var(--gold);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.025em;
  text-shadow:
    0 0 22px rgba(212, 164, 55, 0.22),
    0 0 55px rgba(212, 164, 55, 0.12);
}

/* Description with left vertical gold accent bar */
.pf-desc {
  position: relative;
  padding-left: 22px;
  padding-bottom: 4px;
  max-width: 460px;
  justify-self: end;
}
.pf-desc::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom,
    rgba(212, 164, 55, 0.85) 0%,
    rgba(212, 164, 55, 0.25) 60%,
    transparent 100%);
}
.pf-desc p {
  margin: 0;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
}

/* ============================================================
   Filter bar — capsule pills + minimal view selector
   ============================================================ */
.pf-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Pill containers */
.pf-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  min-width: 0;
}

/* Primary (category) capsule pill
   - Tall solid-dark capsule, no gradient noise
   - Inactive: subtle gray border
   - Active: gold ring + outer halo + bright bottom drop + laser line under */
.pf-pill {
  position: relative;
  isolation: isolate;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: #0d0d0d;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 8px 30px;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6);
  transition:
    color .3s var(--ease),
    border-color .3s var(--ease),
    box-shadow .45s var(--ease);
  white-space: nowrap;
  overflow: visible;
}
/* Keep text + caret above the pseudo highlights */
.pf-pill > * { position: relative; z-index: 2; }

.pf-pill:hover {
  color: var(--text);
  border-color: rgba(212, 164, 55, 0.35);
  box-shadow:
    0 8px 22px -10px rgba(0, 0, 0, 0.6),
    0 0 26px -8px rgba(212, 164, 55, 0.22);
}
.pf-pill .pf-pill-caret {
  color: var(--text-muted);
  transition: color .3s var(--ease);
  flex-shrink: 0;
}
.pf-pill:hover .pf-pill-caret,
.pf-pill.is-active .pf-pill-caret { color: var(--gold); }

/* Active primary pill — gold ring + restrained outer halo */
.pf-pill.is-active {
  color: var(--gold);
  border-color: rgba(212, 164, 55, 0.65);
  background: #0d0d0d;
  box-shadow:
    0 0 0 1px rgba(212, 164, 55, 0.16),
    0 0 16px -4px rgba(212, 164, 55, 0.22),
    0 0 42px -18px rgba(212, 164, 55, 0.15),
    0 6px 18px -10px rgba(0, 0, 0, 0.5),
    inset 0 0 12px rgba(212, 164, 55, 0.03);
}

/* Highlights are ALWAYS rendered (so they can animate),
   but opacity 0 until the pill is active. opacity is what fades. */

/* Highlight #1 — soft gold drop at the bottom-center INSIDE the pill */
.pf-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .45s var(--ease);
  background: radial-gradient(ellipse 16px 5px at 50% 100%,
    rgba(255, 222, 130, 0.75) 0%,
    rgba(255, 200, 90, 0.28) 40%,
    transparent 80%);
}

/* Highlight #2 — thin laser line UNDER the pill */
.pf-pill::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(255, 222, 130, 0.75) 50%,
    transparent 100%);
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: center;
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}

.pf-pill.is-active::after { opacity: 1; }
.pf-pill.is-active::before {
  opacity: 1;
  transform: scaleX(1);
}

/* Sub-pill row — sits below cat row, more breathing room */
.pf-pills--sub {
  gap: 6px 6px;
  margin: 6px 0 32px;
  padding-left: 4px;
}

/* Sub pills: text-style by default, compact glowing capsule when active */
.pf-pills--sub .pf-pill {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: var(--text-dim);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  font-weight: 600;
  padding: 6px 24px;
}
.pf-pills--sub .pf-pill:hover {
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}
.pf-pills--sub .pf-pill.is-active {
  color: var(--gold);
  border-color: rgba(212, 164, 55, 0.55);
  background: #0d0d0d;
  box-shadow:
    0 0 0 1px rgba(212, 164, 55, 0.14),
    0 0 14px -4px rgba(212, 164, 55, 0.20),
    0 0 32px -14px rgba(212, 164, 55, 0.12),
    inset 0 0 10px rgba(212, 164, 55, 0.03);
}

/* Sub-pill drop — softer/smaller than the cat pill */
.pf-pills--sub .pf-pill::after {
  background: radial-gradient(ellipse 12px 4px at 50% 100%,
    rgba(255, 222, 130, 0.70) 0%,
    rgba(255, 200, 90, 0.22) 40%,
    transparent 80%);
}
/* Sub-pill laser line — wider, softer */
.pf-pills--sub .pf-pill::before {
  left: 20%;
  right: 20%;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(255, 222, 130, 0.70) 50%,
    transparent 100%);
}

/* ============================================================
   View / sort selector — minimal, no boxed dropdown
   ============================================================ */
.pf-view {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.pf-view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  width: 22px;
  height: 18px;
}
.pf-view-sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
}
.pf-view-label {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.28em;
  font-weight: 600;
  text-transform: uppercase;
}
.pf-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Trigger button — looks like "FEATURED ⌄" inline text */
.pf-select-trigger {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: color .2s var(--ease);
}
.pf-select-trigger:hover { color: var(--gold-bright, #e7b943); }
.pf-select-trigger .pf-select-caret {
  position: static;
  transform: none;
  color: currentColor;
  transition: transform .25s var(--ease);
}
.pf-select-trigger[aria-expanded="true"] .pf-select-caret {
  transform: rotate(180deg);
}

/* Custom dropdown menu — themed, replaces native option panel */
.pf-select-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 180px;
  background: rgba(13, 13, 13, 0.96);
  border: 1px solid rgba(212, 164, 55, 0.35);
  border-radius: 10px;
  box-shadow:
    0 16px 40px -10px rgba(0, 0, 0, 0.75),
    0 0 28px -10px rgba(212, 164, 55, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  pointer-events: none;
}
.pf-select-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pf-select-option {
  padding: 11px 16px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 6px;
  transition: color .18s var(--ease), background-color .18s var(--ease);
  user-select: none;
}
.pf-select-option:hover {
  background: rgba(212, 164, 55, 0.08);
  color: var(--gold);
}
.pf-select-option.is-active {
  color: var(--gold);
  background: rgba(212, 164, 55, 0.06);
}

/* ----- Counter / meta line ----- */
.pf-meta {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 4px 0 18px;
}

/* ----- Bento grid -----
   Pattern (desktop): every 6 cards form one bento block.
     • Item 1 spans 2 cols × 2 rows (featured)
     • Items 2–5 are normal 1×1 cells
     • Item 6 wide (2 cols × 1 row) on first row of next block, etc.
   We use a 4-column grid with auto rows and let JS apply size classes.
*/
.pf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 18px;
}

.pf-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition:
    transform .45s var(--ease),
    border-color .25s var(--ease),
    box-shadow .35s var(--ease);
  isolation: isolate;
  min-height: 0;
}
.pf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 164, 55, 0.45);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 164, 55, 0.25);
}

/* Bento size variants */
.pf-card--feat   { grid-column: span 2; grid-row: span 2; }   /* hero card */
.pf-card--wide   { grid-column: span 2; grid-row: span 1; }
.pf-card--tall   { grid-column: span 1; grid-row: span 2; }
.pf-card--large  { grid-column: span 2; grid-row: span 2; }

/* Image fill */
.pf-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .9s var(--ease);
  z-index: 0;
}
.pf-card:hover .pf-card-img { transform: scale(1.06); }

/* Gradient & content overlay */
.pf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(10,10,10,0) 30%,
    rgba(10,10,10,0.55) 70%,
    rgba(10,10,10,0.92) 100%);
  pointer-events: none;
  transition: background .35s var(--ease);
}
.pf-card:hover::after {
  background: linear-gradient(180deg,
    rgba(10,10,10,0.05) 20%,
    rgba(10,10,10,0.65) 65%,
    rgba(10,10,10,0.95) 100%);
}

/* Featured badge */
.pf-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(212, 164, 55, 0.55);
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.pf-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 6px var(--gold);
}

/* Card text + arrow */
.pf-card-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.pf-card-text { min-width: 0; flex: 1; }
.pf-card-cat {
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pf-card-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Hidden for now — markup kept so we can flip it back on without touching JS */
.pf-card-title { display: none; }
.pf-card-sub {
  color: var(--text-dim);
  font-size: 10.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 500;
}

/* The featured cards get larger type */
.pf-card--feat .pf-card-title,
.pf-card--large .pf-card-title { font-size: 24px; }

/* Circular arrow CTA */
.pf-card-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212, 164, 55, 0.55);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.pf-card-arrow svg { width: 14px; height: 14px; }
.pf-card:hover .pf-card-arrow {
  background: var(--gold);
  color: #0a0a0a;
  transform: rotate(-12deg);
}

/* Video play icon for animation cards */
.pf-card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pf-card-play-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(212, 164, 55, 0.95);
  color: #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(212, 164, 55, 0.15);
  transition: transform .25s var(--ease);
}
.pf-card:hover .pf-card-play-circle { transform: scale(1.1); }
.pf-card-play-circle svg { width: 22px; height: 22px; margin-left: 3px; }

/* Image-load reveal */
.pf-card-img {
  opacity: 0;
  transition: opacity .55s ease, transform .9s var(--ease);
}
.pf-card-img.is-loaded { opacity: 1; }

/* Empty state */
.pf-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 80px 20px;
  font-size: 14px;
  letter-spacing: 0.15em;
}

/* ============================================================
   Bottom CTA
   ============================================================ */
.pf-cta {
  padding: 50px 0 80px;
  position: relative;
}
.pf-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.pf-cta-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.pf-cta-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212, 164, 55, 0.08);
  border: 1px solid rgba(212, 164, 55, 0.35);
  color: var(--gold);
  flex-shrink: 0;
}
.pf-cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.pf-cta-sub {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 2px;
}
.pf-cta-btn { flex-shrink: 0; }

/* ============================================================
   Lightbox
   ============================================================ */
.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 5, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;             /* Was 40px — that shrunk the image area on every side. */
  animation: pfFadeIn .25s ease;
}
/* [hidden] would normally apply display:none, but our display:flex above
   overrides it. Re-assert it so the lightbox/pill row stays hidden until opened. */
.pf-lightbox[hidden] { display: none; }
.pf-pills[hidden]    { display: none; }
.pf-empty[hidden]    { display: none; }
@keyframes pfFadeIn { from { opacity: 0; } to { opacity: 1; } }
.pf-lightbox-stage {
  /* Plain box that fills the viewport exactly. NOT a flex column —
     caption is positioned absolutely so it doesn't shrink the image. */
  position: relative;
  width: 100vw;
  height: 100vh;
  display: block;
}
.pf-lightbox img {
  /* True fit-to-screen: IMG element is exactly 100vw × 100vh, the image
     content scales via object-fit: contain to fill the larger axis. */
  display: block;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: transparent;
}
/* Restore the `hidden` attribute — without this, our display: block above
   out-specifies the browser-default [hidden]{display:none}, so video items
   would render the IMG element as a broken image with its alt text. */
.pf-lightbox img[hidden] { display: none !important; }
.pf-lightbox iframe {
  /* Centered inside the now-block stage. */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 1280px);
  height: min(56.25vw, calc(100vh - 140px));   /* 16:9 ratio */
  border: 0;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  background: #000;
}
.pf-lightbox-caption {
  /* Floats over the bottom of the image — taken out of the flow so it
     does NOT subtract from the image's height. */
  position: absolute;
  left: 50%;
  bottom: 88px;            /* sits above the toolbar (toolbar is at bottom: 22px + 50px tall) */
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  z-index: 8;
}
.pf-lightbox-caption strong { color: var(--gold); margin-right: 8px; font-weight: 700; }
.pf-lightbox-close,
.pf-lightbox-nav {
  position: absolute;
  /* Liquid-glass on a DARK substrate. The previous mix
     (rgba(255,255,255,0.07) white tint + white icons + white border)
     vanished entirely on bright-image backgrounds — see the silver
     motorcycle render against a near-white background. A dark glass
     fill keeps the icons legible on any subject while preserving the
     iOS-style frosted look. */
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 10px 30px -8px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  z-index: 10;
}
/* Hover lift — keep the prev/next translateY(-50%) centering and add a scale */
.pf-lightbox-close:hover { transform: scale(1.05); }
.pf-lightbox-nav:hover { transform: translateY(-50%) scale(1.05); }
.pf-lightbox-close { top: 20px; right: 20px; font-size: 26px; line-height: 1; }
.pf-lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.pf-lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.pf-lightbox-close:hover,
.pf-lightbox-nav:hover {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}

/* Image-zoom transform live on the <img> itself. JS toggles is-panning
   to suspend the transition during drag. */
.pf-lightbox img {
  transform-origin: center center;
  transition: transform .25s var(--ease), opacity .15s ease-out;
  will-change: transform;
}
.pf-lightbox img.is-panning { transition: none; }

/* Loading state — JS adds `.is-loading` to the lightbox while the next
   image's src is downloading. We dim the (still-visible) previous frame
   and overlay a gold ring spinner so the click feels acknowledged. The
   class is removed on either `load` or `error`, so the spinner never
   hangs even on slow CDNs. */
.pf-lightbox.is-loading img {
  opacity: 0.35;
  filter: blur(2px);
}
.pf-lightbox-stage::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--gold);
  opacity: 0;
  pointer-events: none;
  transform: rotate(0deg);
  transition: opacity 0.15s ease-out;
  z-index: 9;
}
.pf-lightbox.is-loading .pf-lightbox-stage::after {
  opacity: 1;
  animation: pf-lightbox-spin 0.8s linear infinite;
}
@keyframes pf-lightbox-spin {
  to { transform: rotate(360deg); }
}

/* Floating toolbar — dark liquid-glass effect for contrast on any
   underlying image. Same recipe as the close + nav buttons above. */
.pf-lightbox-tools {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    0 10px 30px -8px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  z-index: 12;  /* above nav buttons too */
}
.pf-lightbox-tool {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.pf-lightbox-tool:hover {
  background: var(--gold);
  color: #0a0a0a;
}
.pf-lightbox-tool[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.pf-lightbox-tool[disabled]:hover {
  background: transparent;
  color: var(--text);
}
.pf-lightbox-tool svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}
.pf-lightbox-tool-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 4px;
}

/* Hide image-zoom tools when the active item is a video (zoom doesn't
   apply to iframes). Fullscreen + separator stay. */
.pf-lightbox.is-video .pf-lightbox-tool--zoom,
.pf-lightbox.is-video .pf-lightbox-tool-sep { display: none; }

/* (caption is now absolute-positioned over the image — no extra margin needed) */

/* In native fullscreen, lose the dark backdrop padding so the image
   uses the whole screen. */
.pf-lightbox:fullscreen {
  background: #000;
  padding: 0;
}
.pf-lightbox:fullscreen .pf-lightbox-stage { max-width: 100vw; max-height: 100vh; }
.pf-lightbox:fullscreen .pf-lightbox-img    { max-width: 100vw; max-height: 100vh; }

/* For VIDEO items in fullscreen: expand the iframe (which is normally
   centered at min(90vw, 1280px)) to fill the entire wrapper so YouTube
   plays at true full-screen size. */
.pf-lightbox:fullscreen iframe {
  position: absolute;
  left: 0;
  top: 0;
  transform: none;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}
/* In fullscreen, hide only the caption (cleaner view). Close + prev/next
   stay visible so the user can navigate and exit without leaving fullscreen. */
.pf-lightbox:fullscreen .pf-lightbox-caption { display: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .pf-hero-head {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }
  .pf-desc {
    justify-self: start;
    max-width: 560px;
  }
  .pf-title { font-size: clamp(40px, 6.5vw, 60px); }
  .pf-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }
  .pf-card--feat,
  .pf-card--large { grid-column: span 2; grid-row: span 2; }
  .pf-card--wide { grid-column: span 3; }
}

@media (max-width: 720px) {
  .pf-hero { padding-top: 110px; }
  .pf-hero-head { margin-bottom: 36px; }
  .pf-title { font-size: clamp(34px, 9vw, 48px); }
  .pf-eyebrow-line { width: 56px; }
  .pf-desc { padding-left: 18px; }
  .pf-desc p { font-size: 14px; line-height: 1.7; }

  .pf-filterbar { gap: 14px; }
  .pf-pill { font-size: 10.5px; letter-spacing: 0.20em; padding: 10px 18px; }
  .pf-pills--sub .pf-pill { padding: 7px 12px; }
  .pf-view { gap: 10px; }
  .pf-view-sep { height: 18px; }

  .pf-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 12px;
  }
  .pf-card--feat,
  .pf-card--large,
  .pf-card--wide { grid-column: span 2; grid-row: span 2; }
  .pf-card--tall { grid-column: span 1; grid-row: span 2; }

  .pf-card-title { font-size: 15px; }
  .pf-card--feat .pf-card-title,
  .pf-card--large .pf-card-title { font-size: 18px; }
  .pf-card-arrow { width: 30px; height: 30px; }

  .pf-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .pf-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .pf-card--feat,
  .pf-card--large,
  .pf-card--wide,
  .pf-card--tall { grid-column: span 1; grid-row: span 1; }
}
