/* ===========================
   File: /css/portfolio.css
   Portfolio V3 — Scoped, Netlify-safe, no conflicts
   NOTE: All styles are scoped to body.portfolio-page
   Load AFTER /css/style.css
   =========================== */

body.portfolio-page{
  --pv-primary: var(--primary, #70bf44);
  --pv-primary-600: #5aa636;
  --pv-ink: rgba(11, 18, 32, .92);
  --pv-muted: rgba(11, 18, 32, .70);

  --pv-border: rgba(0,0,0,.10);
  --pv-shadow: 0 18px 55px rgba(0,0,0,.08);
  --pv-shadow-lg: 0 28px 80px rgba(0,0,0,.14);

  --pv-radius: 26px;
  --pv-radius-sm: 18px;

  --pv-navy: rgba(1,10,53,.92);
}

/* ---------------------------
   HERO (borrows system from Services/About: image + overlay + crumb)
--------------------------- */
body.portfolio-page .page-hero{
  position: relative;
  isolation: isolate;
  background: var(--page-hero) center/cover no-repeat;
  min-height: 46vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

body.portfolio-page .page-hero--compact{ min-height: 44vh; }

body.portfolio-page .page-hero__overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(112,191,68,.18) 0%, rgba(112,191,68,0) 35%),
    linear-gradient(90deg, rgba(1,10,53,.88) 0%, rgba(0,16,100,.62) 52%, rgba(1,10,53,.18) 100%);
  z-index: 0;
}

body.portfolio-page .page-hero__grain{
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .16;
  mix-blend-mode: overlay;
  z-index: 0;
}

body.portfolio-page .page-hero__wrap{
  position: relative;
  z-index: 1;
  max-width: 980px;
}

body.portfolio-page .page-hero__kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  font-size: .78rem;
  opacity: .95;
}

body.portfolio-page .page-hero__kicker::before{
  content:"";
  width: 46px;
  height: 2px;
  border-radius: 999px;
  background: rgba(112,191,68,.95);
}

body.portfolio-page .page-hero__title{
  margin: 14px 0 10px;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-size: clamp(2.0rem, 4vw, 3.2rem);
}

body.portfolio-page .page-hero__lead{
  margin: 0 0 16px;
  opacity: .92;
  line-height: 1.75;
  font-size: 1.05rem;
}

body.portfolio-page .page-hero__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

body.portfolio-page .hero-chip{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 800;
  font-size: .92rem;
  white-space: nowrap;
}

body.portfolio-page .hero-chip i{ color: var(--pv-primary); }

body.portfolio-page .page-hero__crumbs{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
  opacity: .95;
}

body.portfolio-page .page-hero__crumbs a{
  color: rgba(255,255,255,.92);
  text-decoration: none;
}

body.portfolio-page .page-hero__crumbs a:hover{ text-decoration: underline; }

body.portfolio-page .page-hero__crumbs .dot{
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.70);
  display: inline-block;
}

/* ---------------------------
   SECTION HEADINGS
--------------------------- */
body.portfolio-page .section-kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
  font-size: .78rem;
  opacity: .90;
  color: rgba(11,18,32,.78);
}

body.portfolio-page .section-kicker::before{
  content:"";
  width: 46px;
  height: 2px;
  border-radius: 999px;
  background: rgba(112,191,68,.85);
}

body.portfolio-page .section-title{
  font-weight: 900;
  line-height: 1.12;
  margin: 12px 0 8px;
  letter-spacing: -0.02em;
  color: var(--pv-ink);
}

body.portfolio-page .section-subtitle{
  opacity: .90;
  line-height: 1.75;
  color: var(--pv-muted);
}

/* ---------------------------
   INTRO STATS
--------------------------- */
body.portfolio-page .pv-stats{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}

body.portfolio-page .pv-stat{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  padding: 14px 14px;
}

body.portfolio-page .pv-stat__k{
  font-weight: 900;
  color: rgba(11,18,32,.90);
  margin: 0 0 4px;
}

body.portfolio-page .pv-stat__v{
  margin: 0;
  font-weight: 800;
  color: rgba(11,18,32,.68);
}

/* ---------------------------
   SERVICE SHOWCASE CARDS (portfolio-only, same “Services page” feel)
--------------------------- */
body.portfolio-page .pv-showcases{
  background: #fff;
}

body.portfolio-page .pv-service-card{
  position: relative;
  display: block;
  border-radius: var(--pv-radius);
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  min-height: 460px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--pv-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

body.portfolio-page .pv-service-card:hover{
  transform: translateY(-8px);
  box-shadow: var(--pv-shadow-lg);
}

body.portfolio-page .pv-service-card__media{
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform .55s ease;
}

body.portfolio-page .pv-service-card:hover .pv-service-card__media{
  transform: scale(1.10);
}

body.portfolio-page .pv-service-card__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 70% 25%, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.55) 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64));
}

body.portfolio-page .pv-service-card__top{
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
}

body.portfolio-page .pv-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.portfolio-page .pv-pill__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pv-primary);
  box-shadow: 0 0 0 4px rgba(112, 191, 68, .18);
}

body.portfolio-page .pv-service-card__content{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;

  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  padding: 18px 18px 14px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transform: translateY(18px);
  transition: transform .25s ease;
}

body.portfolio-page .pv-service-card:hover .pv-service-card__content{
  transform: translateY(0);
}

body.portfolio-page .pv-service-icon{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(112, 191, 68, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pv-primary);
  font-size: 22px;
  margin-bottom: 12px;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

body.portfolio-page .pv-service-card:hover .pv-service-icon{
  background: var(--pv-primary);
  color: #fff;
  transform: translateY(-1px);
}

body.portfolio-page .pv-service-name{
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgba(11,18,32,.92);
  font-size: 20px;
  line-height: 1.2;
}

body.portfolio-page .pv-service-desc{
  margin: 0 0 12px;
  color: rgba(11, 18, 32, .72);
  line-height: 1.6;
  font-size: 14.5px;
}

body.portfolio-page .pv-service-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 18, 32, .08);
  color: rgba(11, 18, 32, .88);
  font-weight: 900;
  font-size: 13px;
}

body.portfolio-page .pv-service-cta i{
  transition: transform .25s ease;
}

body.portfolio-page .pv-service-card:hover .pv-service-cta i{
  transform: translateX(7px);
}

/* ---------------------------
   SERVICE WORK SECTIONS
--------------------------- */
body.portfolio-page .pv-section{
  background: #fff;
}

body.portfolio-page .pv-section + .pv-section{
  border-top: 1px solid rgba(0,0,0,.06);
}

body.portfolio-page .pv-head{ max-width: 980px; }

body.portfolio-page .pv-bullets{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

body.portfolio-page .pv-bullet{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
  color: rgba(11,18,32,.74);
  font-weight: 900;
  font-size: .92rem;
}

body.portfolio-page .pv-bullet i{ color: var(--pv-primary); }

/* ---------------------------
   WORK CARDS (gallery)
--------------------------- */
body.portfolio-page .pv-work-card{
  border-radius: var(--pv-radius-sm);
  background: #fff;
  border: 1px solid var(--pv-border);
  box-shadow: var(--pv-shadow);
  overflow: hidden;
  height: 100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

body.portfolio-page .pv-work-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--pv-shadow-lg);
  border-color: rgba(0,0,0,.16);
}

body.portfolio-page .pv-work-media{
  position: relative;
  width: 100%;
  aspect-ratio: 16/11;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
}

body.portfolio-page .pv-work-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .35s ease;
}

body.portfolio-page .pv-work-card:hover .pv-work-media img{
  transform: scale(1.06);
}

body.portfolio-page .pv-badge{
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 9px 10px;
  border-radius: 999px;
  background: rgba(1,10,53,.72);
  border: 1px solid rgba(255,255,255,.20);
  color: #fff;
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .06em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.portfolio-page .pv-zoom{
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: .92;
}

body.portfolio-page .pv-work-body{
  padding: 14px 14px 16px;
}

body.portfolio-page .pv-work-title{
  font-weight: 900;
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: rgba(11,18,32,.92);
}

body.portfolio-page .pv-work-text{
  margin: 0;
  color: rgba(11,18,32,.68);
  line-height: 1.7;
  font-weight: 600;
}

/* ---------------------------
   CTA PANEL (end)
--------------------------- */
body.portfolio-page .pv-cta{
  border-radius: calc(var(--pv-radius-sm) + 8px);
  border: 1px solid rgba(0,0,0,.10);
  background: linear-gradient(135deg, rgba(0,16,100,.06), rgba(112,191,68,.10));
  box-shadow: var(--pv-shadow);
  overflow: hidden;
}

body.portfolio-page .pv-cta__inner{
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

body.portfolio-page .pv-cta__kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  font-size: .75rem;
  opacity: .85;
}

body.portfolio-page .pv-cta__kicker::before{
  content:"";
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: rgba(112,191,68,.85);
}

body.portfolio-page .pv-cta__title{
  margin: 10px 0 8px;
  font-weight: 900;
  color: rgba(11,18,32,.92);
}

body.portfolio-page .pv-cta__text{
  color: rgba(11,18,32,.70);
  line-height: 1.75;
  font-weight: 600;
}

body.portfolio-page .pv-cta__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------------------
   LIGHTBOX
--------------------------- */
body.portfolio-page .pv-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

body.portfolio-page .pv-lightbox.is-open{ display: block; }

body.portfolio-page .pv-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(1,10,53,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.portfolio-page .pv-lightbox__dialog{
  position: relative;
  margin: 5vh auto;
  width: min(980px, 92vw);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 40px 90px rgba(0,0,0,.35);
}

body.portfolio-page .pv-lightbox__close{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body.portfolio-page .pv-lightbox__media{
  width: 100%;
  background: #0b1438;
  display: grid;
  place-items: center;
}

body.portfolio-page .pv-lightbox__media img{
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

body.portfolio-page .pv-lightbox__caption{
  padding: 14px 16px;
  font-weight: 700;
  color: rgba(0,0,0,.72);
  line-height: 1.6;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* ---------------------------
   Sticky navbar offset
--------------------------- */
body.portfolio-page :where(section[id], div[id], header[id]){
  scroll-margin-top: 120px;
}

/* ---------------------------
   RESPONSIVE
--------------------------- */
@media (max-width: 991.98px){
  body.portfolio-page .page-hero,
  body.portfolio-page .page-hero--compact{ min-height: 42vh; }

  body.portfolio-page .page-hero__lead{ font-size: 1rem; }

  body.portfolio-page .pv-stats{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  body.portfolio-page .pv-service-card{
    min-height: 420px;
  }

  body.portfolio-page .pv-service-card__content{
    transform: translateY(0);
  }
}

@media (max-width: 575.98px){
  body.portfolio-page .hero-chip{
    font-size: .88rem;
    padding: 9px 10px;
  }

  body.portfolio-page .pv-lightbox__dialog{
    margin: 7vh auto;
  }

  body.portfolio-page .pv-stats{
    grid-template-columns: 1fr;
  }

  body.portfolio-page .pv-service-card{
    min-height: 380px;
    border-radius: 20px;
  }
}
