 :root{
    --bg:#ea1bb2;        /* page background */
    --text:#fff;
    --accent:#42c6e9;    /* aqua text/buttons if needed */
    --gap:24px;
  }


section#portfolio {
    background: #ea43cd;
    padding: 160px 0px;
    max-width: 100%;
    margin: 0 auto;    
}


  /* Top row: Prev (left), Next (right) — on mobile they move */
  #portfolio .nav-row{
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom: clamp(14px,3vw,28px);
    padding: 0px 10em;
  }
  #portfolio .btn{
    appearance: none;
    border: 2px solid #fff;
    background: #ffffff73;
    color: #fff;
    font-size: clamp(16px,2vw,24px);
    letter-spacing: 12px;
    padding: 12px 17px;
    border-radius: 0px;
    cursor: pointer;
    font-weight: 800;
    width: 255px;
    height: 69px;
    text-align: center;
    font-family: 'Montserrat';
  }
  #portfolio .btn:disabled{opacity:.4; cursor:not-allowed}

  /* Carousel area */
  #portfolio .carousel-shell{
    position:relative;
    width:100%;
    overflow:hidden;
    margin: 3em auto;
  }
  #portfolio #rail{
    display:flex;
    gap:var(--gap);
    transition: transform .4s ease;
    will-change: transform;
	justify-content: center;
  }
  #portfolio #rail .card{
    flex:0 0 auto;
    width: calc((100% - 2*var(--gap))/3);   /* 3-up desktop */
    border-radius:0px;
    overflow:hidden;
    background:#f3f3f3;
    position:relative;
	max-width:551px;
	max-height:353px;
  }
  #portfolio #rail img, #portfolio #rail video{
    display:block; width:100%; height:auto; object-fit:cover;
  }
  /* Group badge (before/after) */
  #portfolio .badge{
    position:absolute; right:12px; bottom:12px;
    background:#5b5b5b; color:#fff; font-size:12px; padding:6px 10px;
    border-radius:999px; text-transform:uppercase; letter-spacing:.12em;
  }

  /* Before/After toggles */



  /* Hover pause hint (optional) */
  #portfolio .carousel-shell:hover{ cursor:grab }

  /* Responsive: 2-up tablet, 1-up mobile.
     Also move Next button to bottom on mobile, keep Prev on top */
  @media (max-width: 1024px){
    #portfolio #rail .card{ width: calc((100% - var(--gap))/2); }
  }
  @media (max-width: 640px){
    #portfolio .layout{
      display:grid; grid-template-rows:auto auto auto 1fr auto auto; row-gap:16px;
    }
    #portfolio .nav-row{ order:0; justify-content:center; }
    #portfolio .nav-bottom{ order:6; display:flex; justify-content:center; }
	#portfolio .nav-row .btn{    padding: 12px 11px;width:196px;height:43px; }
    #portfolio .btn{    padding: 12px 11px;width:196px;height:43px;margin-top:60px; }
    #portfolio .nav-row .btn.next{ display:none; }
    #portfolio .nav-bottom .btn.next{ display:inline-block; }
    #portfolio #rail .card{ width:100%; }
    #portfolio .client{ order:4; width:60%; }
    #portfolio .filters{ order:5; }
	#portfolio .footer {
	  padding:0px !important;
	      flex-direction: column;
	}
	#portfolio .footer .client{text-align:center;}
	  #portfolio .footer{
		  gap:40px;
	  } 
	  #portfolio .nav-bottom{
		  margin-bottom:30px;
	  }
  }
  .nav-bottom{display:none;}
#portfolio .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 10em;
}
#portfolio .footer .client{
    color: #FFF;
    font-size: clamp(16px,2vw,36px);
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 12px;
	line-height:24px;
    text-transform: uppercase;
}
#portfolio .footer .filters{
    border: 2px solid #FFF;
    background: rgba(255, 255, 255, 0.60);
    display: flex;
    align-items: flex-start;
}
#portfolio .footer .filters button {
    display: flex;
    padding: clamp(16px,2vw,20px);
    align-items: center;
    gap: 8px;
    align-self: stretch;
    border: 0 solid #FFF;
    background: rgba(255, 255, 255, 0.60);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    color: #42C6E9;
    font-size: clamp(16px,2vw,24px);
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 9.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
#portfolio .footer .filters button.active {
    border: 0 solid #FFF;
    background: rgba(66, 198, 233, 0.60);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    color: #FFF;
    font-size: clamp(16px,2vw,24px);
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 9.6px;
    text-transform: uppercase;
}

/* ----------- LIGHTBOX (vanilla) ----------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.open { display: flex; }
.lightbox__stage {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
}

.lightbox__close, .lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.12em;
  user-select: none;
}
.lightbox__nav { top: 50%; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__close {
  top: 16px;
  right: 16px;
  transform: none;
}
.lightbox__caption {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  color: #ddd;
  font-size: 14px;
  padding: 8px 12px;
  opacity: .9;
}
