/* NEX8 portfolio showcase: editorial photo-led cards on the public Home only.
 * The four QA demos reuse the already installed Nex8 product-photo atlas;
 * uploaded portfolio images always take precedence. */
.nex8-home .nex8-work-grid--premium{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:19px;
  align-items:stretch;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card{
  display:flex;
  flex-direction:column;
  grid-column:auto;
  min-width:0;
  min-height:0;
  overflow:hidden;
  isolation:isolate;
  border:1px solid #d9e5ed;
  border-radius:22px;
  background:#fff;
  color:#091c30;
  text-decoration:none;
  box-shadow:0 16px 40px #071e3314;
  transition:box-shadow .22s ease,transform .22s ease,border-color .22s ease;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0,53%) minmax(0,47%);
  min-height:380px;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:hover{
  transform:translateY(-4px);
  border-color:#b4d1e2;
  box-shadow:0 24px 55px #071e3326;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:after,
.nex8-public-v2 .nex8-work-grid--premium .nex8-work-card:not(:has(img)):before{
  content:none!important;
  display:none!important;
}
.nex8-home .nex8-work-grid--premium .nex8-work-visual{
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  height:210px;
  flex:0 0 auto;
  min-width:0;
  padding:11px;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 56% 43%,#2570a4 0%,#11446b 44%,transparent 72%),
    linear-gradient(135deg,#06192b 0%,#0b304e 64%,#081828 100%);
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:nth-child(2) .nex8-work-visual{
  background:radial-gradient(ellipse at 54% 40%,#466d82 0%,#153d55 46%,transparent 74%),#071a2b;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:nth-child(3) .nex8-work-visual{
  background:radial-gradient(ellipse at 54% 39%,#27668e 0%,#0b3557 48%,transparent 76%),#061b2c;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:nth-child(4) .nex8-work-visual{
  background:radial-gradient(ellipse at 55% 40%,#4b617f 0%,#1b3655 48%,transparent 76%),#0b1c31;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-visual{
  grid-column:1;
  height:100%;
  min-height:370px;
  padding:20px;
}
.nex8-home .nex8-work-grid--premium .nex8-work-visual:after{
  content:"";
  position:absolute;
  inset:auto 4% 0;
  height:22%;
  background:radial-gradient(ellipse at center,#0000003b,transparent 70%);
  pointer-events:none;
}
.nex8-home .nex8-work-grid--premium .nex8-work-visual img{
  position:relative;
  inset:auto;
  z-index:2;
  width:100%;
  max-height:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 16px 17px #0006);
  transition:transform .28s ease;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:hover .nex8-work-visual img{
  transform:scale(1.045);
}
.nex8-portfolio-demo-media{
  display:block;
  position:relative;
  z-index:2;
  flex:none;
  width:min(100%,210px);
  aspect-ratio:1/1;
  background:url('/assets/images/nex8-product-atlas-v2.avif?v=20261027c') no-repeat;
  background-size:200% 200%;
  filter:drop-shadow(0 13px 15px #0008);
  transition:transform .28s ease;
}
.nex8-portfolio-demo-media--impressos{background-position:0% 0%}
.nex8-portfolio-demo-media--carimbos{background-position:100% 0%}
.nex8-portfolio-demo-media--comunicacao{background-position:0% 100%}
.nex8-portfolio-demo-media--brindes{background-position:100% 100%}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-portfolio-demo-media{
  width:min(100%,385px);
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:hover .nex8-portfolio-demo-media{
  transform:scale(1.05);
}
.nex8-home .nex8-work-grid--premium .nex8-work-counter,
.nex8-home .nex8-work-grid--premium .nex8-work-demo-label{
  position:absolute;
  z-index:4;
  color:#e2f5ff;
  font-size:.65rem;
  font-weight:800;
  letter-spacing:.13em;
}
.nex8-home .nex8-work-grid--premium .nex8-work-counter{
  top:16px;
  left:19px;
}
.nex8-home .nex8-work-grid--premium .nex8-work-demo-label{
  right:14px;
  bottom:12px;
  max-width:90%;
  padding:6px 9px;
  border-radius:100px;
  border:1px solid #ffffff2f;
  background:#071b2aa8;
  color:#c2ddea;
  font-size:.56rem;
  letter-spacing:.075em;
  white-space:nowrap;
}
.nex8-home .nex8-work-grid--premium .nex8-work-brand-placeholder{
  position:relative;
  z-index:2;
  color:#80cfee;
  font-size:clamp(4rem,7vw,6rem);
  font-weight:850;
  opacity:.55;
}
.nex8-home .nex8-work-grid--premium .nex8-work-info{
  position:relative;
  z-index:3;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  inset:auto;
  left:auto;
  right:auto;
  bottom:auto;
  min-width:0;
  flex:1;
  padding:24px 23px 27px;
  color:#091b2b;
  background:#fff;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info{
  grid-column:2;
  justify-content:center;
  padding:clamp(30px,4vw,60px);
}
.nex8-home .nex8-work-grid--premium .nex8-work-info .nex8-work-category{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#087faf;
  font-size:.62rem;
  letter-spacing:.16em;
  font-weight:830;
  line-height:1.35;
  margin:0 0 13px;
}
.nex8-home .nex8-work-grid--premium .nex8-work-info .nex8-work-category:before{
  content:"";
  width:22px;
  height:3px;
  border-radius:10px;
  background:#ff7416;
}
.nex8-home .nex8-work-grid--premium .nex8-work-info h3{
  color:#0d1e31;
  margin:0;
  font-size:clamp(1.14rem,1.6vw,1.48rem);
  line-height:1.22;
  letter-spacing:-.035em;
  font-weight:850;
  overflow-wrap:break-word;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info h3{
  font-size:clamp(1.7rem,3vw,3rem);
  line-height:1.1;
  letter-spacing:-.05em;
}
.nex8-home .nex8-work-grid--premium .nex8-work-info p{
  margin:13px 0 0;
  color:#5f6e7a;
  line-height:1.52;
  font-size:.84rem;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info p{
  font-size:clamp(.86rem,1.18vw,1rem);
  -webkit-line-clamp:4;
}
.nex8-home .nex8-work-grid--premium .nex8-work-link{
  margin:16px 0 0;
  display:inline-flex;
  align-items:center;
  gap:12px;
  color:#ee690b;
  font-size:.85rem;
  font-weight:800;
}
.nex8-home .nex8-work-grid--premium .nex8-work-link span{
  font-size:1.12rem;
}
.nex8-home .nex8-work-grid--premium .nex8-work-info small{
  margin-top:11px;
  color:#7d8a96;
  font-size:.69rem;
  line-height:1.35;
}
@media(max-width:980px){
  .nex8-home .nex8-work-grid--premium{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child{
    grid-column:1/-1;
    min-height:340px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-visual{
    min-height:340px;
  }
}
@media(max-width:680px){
  .nex8-home .nex8-work-grid--premium{
    grid-template-columns:minmax(0,1fr);
    gap:14px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-card,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child{
    display:flex;
    flex-direction:column;
    grid-column:auto;
    min-height:0;
    border-radius:18px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-visual,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-visual{
    width:100%;
    height:clamp(190px,56vw,275px);
    min-height:0;
    padding:8px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-portfolio-demo-media,
  .nex8-home .nex8-work-grid--premium .nex8-portfolio-demo-media{
    width:min(100%,250px);
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-info,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info{
    padding:19px 21px 22px;
    flex:none;
    justify-content:flex-start;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-info h3,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info h3{
    font-size:clamp(1.3rem,5.2vw,1.63rem);
    line-height:1.18;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-info p{
    margin-top:9px;
    font-size:.78rem;
    -webkit-line-clamp:2;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-link{margin-top:12px}
}
@media(max-width:370px){
  .nex8-home .nex8-work-grid--premium .nex8-work-visual,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-visual{
    height:185px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-info,
  .nex8-home .nex8-work-grid--premium .nex8-work-card:first-child .nex8-work-info{
    padding:16px 17px 19px;
  }
  .nex8-home .nex8-work-grid--premium .nex8-work-counter{left:13px;top:12px}
}
@media(prefers-reduced-motion:reduce){
  .nex8-home .nex8-work-grid--premium .nex8-work-card,
  .nex8-home .nex8-work-grid--premium .nex8-portfolio-demo-media,
  .nex8-home .nex8-work-grid--premium .nex8-work-visual img{
    transition:none!important;
    transform:none!important;
  }
}

/* The same four demo illustrations also appear on /portfolio.
 * Scoped to the existing public Portfolio grid; never mutate uploaded images. */
.portfolio-showcase .portfolio-showcase-media:has(.nex8-portfolio-demo-media){
  display:grid;
  place-items:center;
  background:radial-gradient(ellipse at 50% 39%,#1b5a82 0%,#0d3453 54%,#061827 100%);
}
.portfolio-showcase .portfolio-showcase-media .nex8-portfolio-demo-media{
  position:relative;
  z-index:1;
  width:min(77%,220px);
  height:auto;
  aspect-ratio:1/1;
}
.portfolio-showcase .portfolio-showcase-media .nex8-portfolio-demo-label{
  position:absolute;
  z-index:3;
  right:13px;
  top:13px;
  border-radius:100px;
  border:1px solid #ffffff30;
  background:#061a29aa;
  color:#d8ecf7;
  padding:6px 10px;
  font-size:.6rem;
  font-weight:800;
  letter-spacing:.08em;
}
.portfolio-showcase .portfolio-showcase-card-body .nex8-portfolio-demo-disclaimer{
  margin:7px 0 0;
  font-size:.72rem;
  color:#7b8893;
  font-style:italic;
}
