/* V25.9 — Portfólio por categoria + carrossel + modal leve */

.portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.portfolio-subtitle {
  color: #b8b8b8;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.5;
}

.portfolio-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 34px;
}

.portfolio-filter {
  border: 1px solid rgba(255,255,255,.16);
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: .2s;
}

.portfolio-filter:hover,
.portfolio-filter.active {
  background: #d4af37;
  color: #111;
  border-color: #d4af37;
}

.portfolio-sections {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.portfolio-category {
  display: block;
}

.portfolio-category.hidden-category {
  display: none;
}

.portfolio-category-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.portfolio-category-head h3 {
  font-size: 28px;
  margin: 0;
  letter-spacing: -1px;
}

.portfolio-arrows {
  display: flex;
  gap: 8px;
}

.portfolio-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.portfolio-arrow:hover {
  background: #d4af37;
  color: #111;
}

.portfolio-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 360px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.portfolio-carousel::-webkit-scrollbar {
  height: 8px;
}

.portfolio-carousel::-webkit-scrollbar-track {
  background: #101010;
  border-radius: 999px;
}

.portfolio-carousel::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 999px;
}

.portfolio-carousel .portfolio-card {
  scroll-snap-align: start;
  min-height: 350px;
}

.portfolio-card.portfolio-hidden {
  display: none;
}

.portfolio-more {
  margin-top: 14px;
}

/* Vídeo com capa limpa */
.portfolio-card {
  position: relative;
}

.portfolio-media-clean,
.portfolio-video-trigger {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #171717;
  cursor: pointer;
  margin-bottom: 16px;
}

.portfolio-media-clean img,
.portfolio-video-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.portfolio-media-clean:hover img,
.portfolio-video-trigger:hover img {
  transform: scale(1.04);
}

.portfolio-video-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.42));
}

.portfolio-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 52px;
  border-radius: 16px;
  background: #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.portfolio-play::before {
  content: "";
  margin-left: 5px;
  border-left: 19px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.portfolio-expand {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  background: rgba(0,0,0,.68);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 11px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal.open {
  display: flex;
}

.video-modal-box {
  position: relative;
  width: min(1100px, 96vw);
  background: #080808;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 40px 120px rgba(0,0,0,.65);
}

.video-modal-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-modal-close {
  position: absolute;
  right: -12px;
  top: -12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #d4af37;
  color: #111;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

@media(max-width: 700px) {
  .portfolio-head,
  .portfolio-category-head {
    display: block;
  }

  .portfolio-category-head h3 {
    margin-bottom: 14px;
  }

  .portfolio-carousel {
    grid-auto-columns: minmax(270px, 84vw);
  }

  .video-modal {
    padding: 12px;
  }

  .video-modal-box {
    width: 100%;
    padding: 10px;
    border-radius: 18px;
  }

  .video-modal-close {
    right: 6px;
    top: 6px;
    z-index: 2;
  }
}
