/* ── PAGE HERO ── */
.page-hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  padding-top: 100px;
  background: var(--preto);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(147,51,234,.2) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(249,115,22,.15) 0%, transparent 50%);
}
.page-hero-content { position: relative; z-index: 2; margin-bottom: 20px;}
.page-hero h1 {
  font-family: 'Rubik', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: white;
  line-height: 1.08;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .7s .2s forwards;
}
.page-hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero p {
  color: #666;
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp .7s .4s forwards;
}

/* ── FILTROS ── */
.portfolio-section {
  padding: 6rem 5%;
  background: var(--branco);
}

.filtros {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  justify-content: center;
}

.filtro-btn {
  padding: .5rem 1.3rem;
  border-radius: 100px;
  border: 1.5px solid #ddd;
  background: transparent;
  font-family: 'Rubik', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  color: var(--cinza);
  cursor: pointer;
  transition: all .2s;
}
.filtro-btn:hover,
.filtro-btn.ativo {
  background: var(--grad);
  border-color: transparent;
  color: white;
}

/* ── GRID ── */
.portfolio-grid {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  min-height: 200px;
}

.portfolio-grid-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.port-item {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform .3s;
}
.port-item:hover { transform: scale(1.02); }

.port-thumb {
  width: 100%;
  aspect-ratio: var(--ratio, 16/9);
  position: relative;
  overflow: hidden;
}

.port-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform .4s;
}
.port-item:hover .port-bg { transform: scale(1.08); }

.port-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.port-item:hover .port-bg-img { transform: scale(1.08); }

.port-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  z-index: 2;
}
.port-item:hover .port-overlay { opacity: 1; }

.port-info h4 {
  font-family: 'Rubik', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: white;
  margin-bottom: .25rem;
}
.port-info span { font-size: .72rem; color: rgba(255,255,255,.55); }

.port-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,.45);
  color: white;
  font-size: .68rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 100px;
  letter-spacing: .08em;
  text-transform: uppercase;
  z-index: 3;
}

/* ── PAGINAÇÃO ── */
.paginacao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 2.5rem;
}

.pag-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  background: transparent;
  font-family: 'Rubik', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  color: var(--cinza);
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.pag-btn:hover,
.pag-btn.ativo {
  background: var(--grad);
  border-color: transparent;
  color: white;
}
.pag-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 1rem;
  overflow-y: auto;
}
.lightbox.open { display: flex; }

.lb-inner {
  position: relative;
  width: 92%;
  max-width: 900px;
  margin: auto;
  animation: lbIn .25s ease;
}

.lb-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 80vh;
}

.lb-img-wrap img,
.lb-img-wrap video {
  width: 100%;
  height: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lb-info {
  padding: 1.2rem 0 .5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.lb-info h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}
.lb-info p {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-top: .2rem;
}
.lb-counter {
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
}

.lb-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.lb-nav:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
.lb-nav:disabled { opacity: .25; cursor: default; }
.lb-nav.prev { left: -60px; }
.lb-nav.next { right: -60px; }

.lb-close {
  position: absolute;
  top: -48px; right: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  background: transparent;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.lb-close:hover { background: rgba(255,255,255,.1); }

/* ── STATS TOPO ── */
.port-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.port-stat-item {
  text-align: center;
}
.port-stat-num {
  display: block;
  font-family: 'Rubik', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: .25rem;
}
.port-stat-label {
  font-size: .78rem;
  color: var(--cinza);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── FILTROS — ATUALIZAÇÃO ── */
.filtros {
  gap: .6rem;
}
.filtro-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ── FOOTER DO CARD ── */
.port-item {
  background: var(--branco);
  border: 1px solid #f0f0f0;
}
.port-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  gap: .5rem;
  flex-wrap: wrap;
}
.port-tag {
  position: static;
  background: none;
  backdrop-filter: none;
  color: var(--cinza);
  font-size: .68rem;
  font-weight: 600;
  padding: 0;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.port-tags-row {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.port-chip {
  background: #f5f5f5;
  color: #666;
  font-size: .65rem;
  padding: .2rem .6rem;
  border-radius: 50px;
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  border: 1px solid #ebebeb;
}

/* ── BOTÃO LINK NO CARD ── */
.port-link-btn {
  display: inline-block;
  margin-top: .75rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: .75rem;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.port-link-btn:hover { background: rgba(255,255,255,.25); }

/* ── ESTADO VAZIO ── */
.port-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--cinza);
}
.port-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.port-empty p {
  font-size: .9rem;
}

/* ── CTA FINAL ── */
.port-cta {
  text-align: center;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.port-cta p {
  font-size: 1.1rem;
  color: var(--cinza);
}

/* ── LIGHTBOX — TAGS E LINK ── */
.lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
}
.lb-tags .port-chip {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
}
.lb-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .5rem;
  flex-shrink: 0;
}
.lb-link-btn {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.2);
  padding: .4rem .9rem;
  border-radius: 50px;
  transition: all .2s;
  white-space: nowrap;
}
.lb-link-btn:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* ── CARROSSEL NO CARD ── */
.port-carousel {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.port-carousel::-webkit-scrollbar { display: none; }

.port-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}
.port-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.port-carousel-slide .port-bg {
  position: absolute;
  inset: 0;
}

.port-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 4;
}
.port-carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transition: background .2s;
}
.port-carousel-dots span.ativo {
  background: #fff;
}

/* ── LIGHTBOX — CARROSSEL INTERNO ── */
.lb-img-wrap {
  position: relative;
}
.lb-foto-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.45);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.lb-foto-nav:hover { background: rgba(0,0,0,.7); border-color: rgba(255,255,255,.5); }
.lb-foto-nav:disabled { opacity: .2; cursor: default; pointer-events: none; }
.lb-foto-nav.prev { left: 10px; }
.lb-foto-nav.next { right: 10px; }

.lb-foto-counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  background: rgba(0,0,0,.4);
  padding: .15rem .5rem;
  border-radius: 50px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* ── ÍCONE DE PLAY NO CARD ── */
.port-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 2px solid rgba(255,255,255,.7);
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  backdrop-filter: blur(4px);
  padding-left: 3px;
}

/* ── RESPONSIVO ATUALIZADO ── */
@media (max-width: 560px) {
  .port-stats { gap: 1.5rem; }
  .port-stat-num { font-size: 1.8rem; }
  .lb-info { flex-direction: column; }
  .lb-info-right { align-items: flex-start; }
  .port-overlay { opacity: 1; }
}

/* ── RESPONSIVO ── */
@media (max-width: 860px) {
  .portfolio-grid { gap: 1rem; }
  .lb-nav.prev { left: 0; top: auto; bottom: -56px; transform: none; }
  .lb-nav.next { right: 0; top: auto; bottom: -56px; transform: none; }
  .lb-inner { padding-bottom: 60px; }
  .port-overlay { opacity: 1; }
}
@media (max-width: 560px) {
  .portfolio-grid { flex-direction: column; }
  .portfolio-grid-col { flex-direction: row; flex-wrap: wrap; }
  .portfolio-grid-col .port-item { flex: 1 1 calc(50% - .5rem); }
  .port-overlay { opacity: 1; }
}