/* =========================
   PORTFOLIO CATEGORY (Gallery pages)
   Used on: /{lang}/portfolio/{category}/index.html
========================= */

:root{
  --bg: #ffffff;
  --bg-alt: #f6f3ee;
  --text: rgba(15,23,42,.92);
  --muted: rgba(15,23,42,.66);
  --accent: #ff8a2a;

  --card: rgba(255,255,255,.92);
  --stroke: rgba(15, 23, 42, 0.10);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --shadow2: 0 22px 70px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

.pfCatPage{
  background: var(--bg);
}

/* Hero */
.pfCatHero{
  padding: clamp(42px, 5vw, 72px) 0;
  background: linear-gradient(180deg, var(--bg-alt), #fff);
  border-bottom: 1px solid var(--stroke);
}

.pfCatHero__inner{
  display: grid;
  gap: 14px;
}

.pfCatCrumbs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.pfCatCrumbs__link{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(15,23,42,.25);
}
.pfCatCrumbs__link:hover{
  color: var(--text);
  border-bottom-color: rgba(15,23,42,.45);
}

.pfCatTitle{
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pfCatLead{
  margin: 0;
  max-width: 820px;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  color: var(--muted);
}

/* Gallery section */
.pfCatSection{
  padding: clamp(36px, 4vw, 66px) 0;
}

.pfCatGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 16px);
}

.pfCatItem{
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  transform: translateZ(0);
}

.pfCatItem img{
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform .25s ease, filter .25s ease;
}

.pfCatItem::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 500px at 0% 0%, rgba(255,138,42,.16), transparent 55%),
              linear-gradient(180deg, transparent 55%, rgba(15,23,42,.22));
  opacity: 0;
  transition: opacity .25s ease;
}

.pfCatItem:hover img{
  transform: scale(1.04);
  filter: saturate(1.02) contrast(1.02);
}
.pfCatItem:hover::after{
  opacity: 1;
}

.pfCatHint{
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 900px){
  .pfCatGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .pfCatGrid{ grid-template-columns: 1fr; }
  .pfCatItem img{ aspect-ratio: 3 / 2; }
}

/* Lightbox */
.lb{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.lb[aria-hidden="false"]{
  display: block;
}

.lb__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.66);
  backdrop-filter: blur(6px);
}

.lb__dialog{
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
}

.lb__panel{
  width: min(1100px, 100%);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow2);
}

.lb__bar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  background: rgba(255,255,255,.10);
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.lb__title{
  font-size: 13px;
  color: rgba(255,255,255,.88);
  margin: 0;
}

.lb__btns{
  display: flex;
  gap: 8px;
}

.lb__btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.lb__btn:hover{ background: rgba(255,255,255,.16); transform: translateY(-1px); }
.lb__btn:active{ transform: translateY(0); }

.lb__imgWrap{
  background: rgba(0,0,0,.10);
}

.lb__img{
  width: 100%;
  height: min(72vh, 720px);
  object-fit: contain;
  display: block;
  background: rgba(0,0,0,.10);
}

@media (max-width: 560px){
  .lb__dialog{ inset: 12px; }
  .lb__img{ height: 64vh; }
  .lb__title{ display: none; }
}
