/* ===== PROJECTS PAGE ===== */

/* Banner */
.pj-banner { position: relative; overflow: hidden; color: var(--white); padding: 88px 0 80px; background: linear-gradient(120deg, #303791 0%, #4054B2 100%); }
.pj-banner::before { content: ""; position: absolute; right: -120px; top: -140px; width: 460px; height: 460px; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); }
.pj-banner::after { content: ""; position: absolute; right: 18%; bottom: -90px; width: 200px; height: 200px; border-radius: 50%; background: rgba(234,36,37,.22); filter: blur(12px); }
.pj-banner .container { position: relative; z-index: 1; }
.pj-banner h1 { font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 50px; line-height: 1.15; }
.pj-banner p { margin-top: 14px; font-size: 17px; line-height: 1.7; opacity: .95; max-width: 620px; }
.pj-banner p strong { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 20px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.crumbs a { opacity: .85; }
.crumbs a:hover { opacity: 1; text-decoration: underline; }
.crumbs span { opacity: .6; }

/* Sticky filter tabs */
.filter-bar { position: sticky; top: 80px; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.filter-tabs { display: flex; justify-content: center; gap: 10px; padding: 14px 0; }
.ftab { flex: none; font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 15px; color: var(--text); background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 10px 22px; cursor: pointer; transition: .2s; }
.ftab:hover { border-color: var(--primary); color: var(--primary); }
.ftab.active { background: var(--secondary); border-color: var(--secondary); color: var(--white); box-shadow: 0 6px 16px rgba(234,36,37,.3); }

/* Gallery (masonry) */
.gallery { background: var(--soft); padding: 48px 0 88px; min-height: 60vh; }
.g-grid { column-count: 3; column-gap: 18px; }
.g-item { break-inside: avoid; margin: 0 0 18px; border-radius: 14px; overflow: hidden; background: var(--primary); box-shadow: 0 8px 26px rgba(48,55,145,.12); animation: pop .45s ease both; }
.g-item[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.g-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.g-btn img { display: block; width: 100%; height: auto; transition: transform .6s; }
.g-item:hover .g-btn img { transform: scale(1.05); }
.g-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(48,55,145,.1), rgba(22,23,24,.6)); opacity: 0; transition: opacity .3s; }
.g-item:hover .g-btn::after, .g-btn:focus-visible::after { opacity: 1; }
.g-zoom { position: absolute; z-index: 1; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--secondary); display: grid; place-items: center; opacity: 0; transform: scale(.7); transition: .3s; }
.g-zoom svg { width: 26px; height: 26px; fill: #fff; }
.g-item:hover .g-zoom, .g-btn:focus-visible .g-zoom { opacity: 1; transform: none; }
.g-btn:focus-visible { outline: 3px solid var(--secondary); outline-offset: -3px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,30,.94); display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #fff; font-weight: 700; }
.lb-tools { display: flex; gap: 10px; }
.lb-btn, .lb-nav { border: 0; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.lb-btn:hover, .lb-nav:hover { background: var(--secondary); }
.lb-btn svg, .lb-nav svg { width: 24px; height: 24px; fill: #fff; }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: auto; padding: 64px 70px 56px; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; cursor: zoom-in; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop .3s ease; }
.lb.zoomed .lb-stage { place-items: start center; padding: 64px 0 0; }
.lb.zoomed .lb-stage img { max-width: none; max-height: none; width: min(2000px, 220vw); border-radius: 0; cursor: zoom-out; }
.lb-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 3; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; text-align: center; color: #fff; font-weight: 600; padding: 12px 70px 16px; background: linear-gradient(0deg, rgba(10,12,30,.85), transparent); pointer-events: none; }
.lb.zoomed .lb-cap { display: none; }

/* Stats (shared look with About page) */
.stats { background: var(--primary); color: var(--white); padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat { padding: 8px 16px; border-right: 1px solid rgba(255,255,255,.2); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 48px; line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-weight: 600; opacity: .9; }

/* Tablet */
@media (max-width: 1024px) {
  .pj-banner { padding: 72px 0 64px; }
  .g-grid { column-count: 2; }
  .stat strong { font-size: 40px; }
}

/* Mobile */
@media (max-width: 767px) {
  .pj-banner { padding: 52px 0 48px; }
  .pj-banner h1 { font-size: 34px; }
  .pj-banner p { font-size: 16px; }
  .pj-banner p strong { font-size: 18px; }
  .filter-bar { top: 64px; }
  .filter-tabs { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 12px 20px; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .ftab { padding: 9px 18px; font-size: 14px; }
  .gallery { padding: 32px 0 56px; }
  .g-grid { column-gap: 12px; }
  .g-item { margin-bottom: 12px; border-radius: 10px; }
  .g-zoom { display: none; }
  .lb-stage { padding: 60px 8px 52px; }
  .lb-nav { top: auto; bottom: 8px; margin: 0; width: 40px; height: 40px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-cap { padding: 12px 60px 16px; font-size: 14px; }
  .stats { padding: 40px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat strong { font-size: 36px; }
}
