/* Squadra Brasil — MPDV portfolio index and category galleries */

.mpdv-activation-count {
  margin: -4px 0 clamp(54px, 4.2vw, 82px);
  color: rgba(255, 255, 255, .92);
  font-size: clamp(.78rem, .82vw, .98rem);
  letter-spacing: .01em;
  text-align: center;
  text-transform: uppercase;
}

.mpdv-activation-count strong {
  color: var(--white);
  font-weight: 800;
}

/* Portfolio index --------------------------------------------------------- */

.mpdv-portfolio {
  position: relative;
  z-index: 2;
  overflow: hidden;
  color: var(--blue);
  background-color: var(--paper);
}

.mpdv-portfolio__texture,
.portfolio-gallery__texture {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  background-image: url("../images/events/events-halftone.svg");
  background-position: center top;
  background-repeat: repeat;
  background-size: 100% auto;
  pointer-events: none;
  user-select: none;
}

.mpdv-portfolio__texture img,
.portfolio-gallery__texture img {
  visibility: hidden;
  width: calc(100% - 2px);
  max-width: none;
  height: auto;
  margin-left: 1px;
}

.mpdv-portfolio__rings {
  position: absolute;
  z-index: 2;
  width: clamp(86px, 6.4vw, 122px);
  opacity: .72;
  rotate: 90deg;
  pointer-events: none;
  animation: portfolio-ring-float 6.8s ease-in-out infinite alternate;
}

.mpdv-portfolio__rings > i { border-color: var(--pink); }

.mpdv-portfolio__rings--left {
  left: clamp(-24px, 4.5vw, 86px);
  bottom: 16%;
}

.mpdv-portfolio__rings--right {
  top: 51%;
  right: clamp(-28px, 4vw, 78px);
  animation-delay: -3.4s;
}

@keyframes portfolio-ring-float {
  from { transform: translate3d(-4px, -8px, 0); }
  to { transform: translate3d(7px, 10px, 0); }
}

.mpdv-portfolio__inner {
  position: relative;
  z-index: 3;
  width: min(1200px, calc(100% - 48px));
  padding: clamp(82px, 6.2vw, 120px) 0 clamp(100px, 8vw, 154px);
  margin-inline: auto;
}

.mpdv-portfolio__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 2.4vw, 46px);
  margin-bottom: clamp(56px, 4.7vw, 90px);
}

.mpdv-portfolio__header h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 4.5vw, 5.35rem);
  font-weight: 600;
  line-height: .95;
  text-align: center;
  text-transform: uppercase;
}

.mpdv-portfolio__dot-grid.mpdv-showcase__dots {
  position: relative;
  inset: auto;
  z-index: auto;
  display: flex;
  width: clamp(36px, 3.7vw, 56px);
  height: clamp(44px, 4.45vw, 68px);
  flex: 0 0 auto;
  gap: 12.7%;
  animation: hero-float-x-reverse 6.3s ease-in-out infinite;
}

.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: space-between;
}

.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column:nth-child(even) { transform: translateY(25%); }

.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column i {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--dot-color);
  animation: loading-dot 1.65s ease-in-out infinite both;
}

.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column--white { --dot-color: var(--blue); }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column--cyan { --dot-color: var(--cyan); }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column--yellow { --dot-color: #f5de0b; }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column--pink { --dot-color: var(--pink); }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column i:nth-child(2) { animation-delay: 80ms; }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column i:nth-child(3) { animation-delay: 160ms; }
.mpdv-portfolio__dot-grid .mpdv-showcase__dot-column i:nth-child(4) { animation-delay: 240ms; }

.mpdv-portfolio__dot-grid.mpdv-portfolio__dot-grid--right { animation-direction: reverse; }

.mpdv-portfolio__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(58px, 4.2vw, 80px) 0;
  align-items: start;
}

.mpdv-portfolio-card {
  position: relative;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  display: grid;
  gap: 12px;
  color: var(--blue);
  text-align: center;
  transition: transform var(--media-hover-duration) var(--media-hover-ease);
}

@media (min-width: 901px) {
  .mpdv-portfolio-card:nth-child(1) { grid-column: 1 / 3; justify-self: start; }
  .mpdv-portfolio-card:nth-child(2) { grid-column: 3 / 5; justify-self: end; }
  .mpdv-portfolio-card:nth-child(3) { grid-column: 5 / 7; justify-self: end; }
  .mpdv-portfolio-card:nth-child(4) { grid-column: 1 / 4; justify-self: center; }
  .mpdv-portfolio-card:nth-child(5) { grid-column: 4 / 7; justify-self: start; }
  .mpdv-portfolio-card:nth-child(6) { grid-column: 2 / 6; justify-self: center; }
}

.mpdv-portfolio-card__label {
  color: #292a32;
  font-size: clamp(.76rem, .82vw, .98rem);
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.mpdv-portfolio-card__media {
  position: relative;
  width: auto;
  max-width: 100%;
  height: min(19.583vw, 376px);
  overflow: hidden;
  background: transparent;
  border-radius: 15px;
}

.mpdv-portfolio-card:nth-child(1) .mpdv-portfolio-card__media,
.mpdv-portfolio-card:nth-child(2) .mpdv-portfolio-card__media { aspect-ratio: 387 / 376; }
.mpdv-portfolio-card:nth-child(3) .mpdv-portfolio-card__media { aspect-ratio: 305 / 376; }
.mpdv-portfolio-card:nth-child(4) .mpdv-portfolio-card__media { aspect-ratio: 388 / 376; }
.mpdv-portfolio-card:nth-child(5) .mpdv-portfolio-card__media { aspect-ratio: 471 / 376; }
.mpdv-portfolio-card:nth-child(6) .mpdv-portfolio-card__media { aspect-ratio: 599 / 376; }

.mpdv-portfolio-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  transition: border-color 220ms ease, background-color 220ms ease;
}

.mpdv-portfolio-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--media-hover-duration) var(--media-hover-ease);
}

.mpdv-portfolio-card__badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(21, 26, 55, .78);
  box-shadow: 0 10px 26px rgba(19, 24, 50, .18);
  color: var(--white);
  font-size: clamp(.67rem, .64vw, .76rem);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.mpdv-portfolio-card__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(226, 98, 160, .18);
}

.mpdv-portfolio-card:focus-visible .mpdv-portfolio-card__media::after { border-color: var(--pink); }
.mpdv-portfolio-card:focus-visible { outline: 3px solid var(--cyan); outline-offset: 8px; border-radius: 8px; }

@media (hover: hover) and (pointer: fine) {
  .mpdv-portfolio-card:hover { transform: translateY(-2px); }
  .mpdv-portfolio-card:hover .mpdv-portfolio-card__media img { transform: scale(var(--media-hover-scale)); }
  .mpdv-portfolio-card:hover .mpdv-portfolio-card__media::after {
    border-color: var(--pink);
    background: rgba(226, 98, 160, .035);
  }
}

/* Category hero ----------------------------------------------------------- */

.page-mpdv-portfolio {
  overflow-x: clip;
  overflow-y: visible;
  background: var(--paper);
}

.portfolio-page-hero {
  position: relative;
  min-height: clamp(330px, 22.8vw, 438px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
}

.portfolio-page-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(circle at 54% 45%, rgba(79, 10, 109, .28), transparent 48%);
}

.portfolio-page-hero__shape {
  position: absolute;
  z-index: 2;
  display: block;
  top: clamp(-210px, -9.4vw, -150px);
  left: 9.3vw;
  width: min(75.5vw, 1450px);
  max-width: none;
  height: auto;
  mix-blend-mode: multiply;
  transform-origin: 50% 50%;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  animation: shape-rotation 180s linear infinite;
}

.portfolio-page-hero__copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(1480px, calc(100% - 48px));
  margin: 0;
  text-align: center;
  transform: translate(-50%, -50%);
}

.portfolio-page-hero h1 {
  max-width: 100%;
  margin: 0;
  color: var(--pink);
  font-family: var(--font-display);
  font-size: clamp(5.4rem, 9vw, 10.6rem);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: .78;
  text-transform: uppercase;
  animation: hero-copy-in 900ms 100ms cubic-bezier(.2, .75, .25, 1) both;
}

.portfolio-page-hero__arrows {
  position: absolute;
  z-index: 4;
  top: calc(50% - clamp(88px, 5.5vw, 106px));
  left: calc(50% - min(164px, 18vw));
  width: clamp(92px, 8.45vw, 162px);
  animation: hero-float-x 5.1s ease-in-out infinite;
}

.portfolio-page-hero__arrows .decor-loader__track i { background: #a600f4; }

.portfolio-page-hero__dots {
  position: absolute;
  z-index: 4;
  top: calc(50% + clamp(70px, 5.2vw, 100px));
  left: calc(50% - 30px);
  display: flex;
  gap: 9px;
  animation: hero-float-x-reverse 5.8s ease-in-out infinite;
}

.portfolio-page-hero__dots i {
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  animation: hero-dot-pulse 1.8s ease-in-out infinite;
}

.portfolio-page-hero__dots i:nth-child(2) { animation-delay: 120ms; }
.portfolio-page-hero__dots i:nth-child(3) { animation-delay: 240ms; }
.portfolio-page-hero__dots i:nth-child(4) { animation-delay: 360ms; }

/* Category gallery -------------------------------------------------------- */

.portfolio-gallery {
  position: relative;
  overflow: hidden;
  color: #292a32;
  background-color: var(--paper);
}

.portfolio-gallery__inner {
  position: relative;
  z-index: 3;
  width: min(1160px, calc(100% - 48px));
  padding: clamp(44px, 3.2vw, 62px) 0 clamp(112px, 8vw, 160px);
  margin-inline: auto;
}

.portfolio-gallery__back {
  display: inline-flex;
  margin-bottom: clamp(52px, 5vw, 92px);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color 180ms ease, transform 180ms ease;
}

.portfolio-gallery__back:hover,
.portfolio-gallery__back:focus-visible { color: var(--pink); transform: translateX(-4px); }

.portfolio-gallery__heading {
  margin: calc(clamp(52px, 5vw, 92px) * -0.56) 0 clamp(48px, 4.6vw, 78px);
  text-align: center;
}

.portfolio-gallery__heading p {
  margin: 0 0 7px;
  color: var(--pink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.portfolio-gallery__heading h2 {
  margin: 0;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 5.4rem);
  font-weight: 600;
  line-height: .9;
  text-transform: uppercase;
}

.portfolio-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(58px, 5.2vw, 100px) clamp(48px, 5.6vw, 108px);
  align-items: start;
}

.portfolio-project {
  min-width: 0;
  width: 100%;
  max-width: 520px;
  justify-self: center;
}

.portfolio-project--wide {
  max-width: 860px;
  grid-column: 1 / -1;
}

.portfolio-project h2 {
  margin: 0 0 15px;
  font-size: clamp(1rem, 1.22vw, 1.42rem);
  font-weight: 400;
  line-height: 1.25;
}

.portfolio-project h2 strong { font-weight: 800; }

.portfolio-project-slider { width: 100%; }
.portfolio-project-slider .events-project-slider__thumb img { height: 100%; aspect-ratio: auto; }

.portfolio-project--single .portfolio-project__media {
  width: min(100%, 680px);
  aspect-ratio: 1.42 / 1;
}

.portfolio-project__media {
  position: relative;
  margin: 0;
  aspect-ratio: 1.25 / 1;
  overflow: hidden;
  background: #ececf1;
  border-radius: 15px;
  box-shadow: 0 15px 32px rgba(24, 24, 70, .1);
}

.portfolio-project--portrait { max-width: 420px; }
.portfolio-project--portrait .portfolio-project__media { aspect-ratio: .86 / 1; }
.portfolio-project--wide .portfolio-project__media { aspect-ratio: 1.72 / 1; }

.portfolio-project__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--media-hover-duration) var(--media-hover-ease);
}

@media (hover: hover) and (pointer: fine) {
  .portfolio-project__media:hover img { transform: scale(var(--media-hover-scale)); }
}

.portfolio-project__video {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 17px 22px;
  color: var(--white);
  background: rgba(184, 34, 62, .78);
  font-size: clamp(.82rem, 1vw, 1rem);
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 900px) {
  .mpdv-portfolio__texture,
  .portfolio-gallery__texture {
    background-image: url("../images/events/events-halftone-mobile.svg");
    background-size: 100% auto;
  }

  .mpdv-portfolio__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mpdv-portfolio-card { width: auto; justify-self: center; }
  .mpdv-portfolio-card__media { height: min(36vw, 300px); }

  .portfolio-page-hero__shape {
    top: -120px;
    left: -5%;
    width: 900px;
  }

  .portfolio-page-hero h1 { font-size: clamp(4.7rem, 14vw, 8.2rem); }
  .portfolio-page-hero__arrows {
    top: calc(50% - 95px);
    left: calc(50% - 135px);
  }
  .portfolio-page-hero__dots { top: calc(50% + 78px); }
  .portfolio-projects { gap: 60px 32px; }
}

@media (max-width: 680px) {
  .mpdv-activation-count { margin-top: -16px; }

  .mpdv-portfolio__inner,
  .portfolio-gallery__inner { width: min(100% - 36px, 560px); }

  .mpdv-portfolio__header { gap: 10px; }
  .mpdv-portfolio__header h2 { font-size: clamp(2.75rem, 12vw, 4rem); }
  .mpdv-portfolio__dot-grid.mpdv-showcase__dots { width: 30px; height: 40px; }
  .mpdv-portfolio__rings { width: 82px; opacity: .58; }
  .mpdv-portfolio__rings--left { left: -28px; bottom: 11%; }
  .mpdv-portfolio__rings--right { right: -30px; top: 54%; }
  .mpdv-portfolio__grid { grid-template-columns: 1fr; gap: 48px; }
  .mpdv-portfolio-card { width: min(100%, 360px); }
  .mpdv-portfolio-card__media { width: 100%; height: auto; }
  .mpdv-portfolio-card__badge { top: 10px; right: 10px; }

  .portfolio-page-hero { min-height: 360px; }
  .portfolio-page-hero__shape { top: -40px; left: -42%; width: 650px; }
  .portfolio-page-hero__copy { width: calc(100% - 28px); }
  .portfolio-page-hero h1 { font-size: clamp(3.4rem, 15vw, 5.6rem); line-height: .82; }
  .portfolio-page-hero__arrows {
    top: calc(50% - 94px);
    left: calc(50% - 132px);
    width: 102px;
  }
  .portfolio-page-hero__dots {
    top: calc(50% + 76px);
    left: calc(50% - 28px);
  }

  .portfolio-projects { grid-template-columns: 1fr; gap: 62px; }
  .portfolio-gallery__heading { margin-top: -18px; }
  .portfolio-project--wide { grid-column: auto; }
  .portfolio-project,
  .portfolio-project--portrait,
  .portfolio-project--wide { max-width: 100%; }
  .portfolio-project--single .portfolio-project__media { width: 100%; }
  .portfolio-project--portrait .portfolio-project__media { aspect-ratio: 1 / 1.08; }
  .portfolio-project--wide .portfolio-project__media { aspect-ratio: 1.35 / 1; }

}

@media (prefers-reduced-motion: reduce) {
  .mpdv-portfolio-card,
  .mpdv-portfolio-card__media img,
  .portfolio-project__media img { transition: none; }

  .mpdv-portfolio-card:hover,
  .mpdv-portfolio-card:hover .mpdv-portfolio-card__media img,
  .portfolio-project__media:hover img { transform: none !important; }
}
