/* ============================================================
   BRAGOO — PORTAFOLIO AISLADO
   Clases prefijadas con pf- para no chocar con styles.css
   ============================================================ */

body.pf-page a,
body.pf-page a:visited,
body.pf-page a:active,
body.pf-page a:focus {
  text-decoration: none;
}

body.pf-page {
  --bg: #0b0b0f;
  --bg-2: #101116;
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.70);
  --muted-2: rgba(255, 255, 255, 0.52);
  --pink: #C91C52;
  --blue: #00519B;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --gap: 25px;
}

body.pf-page {
  background:
    radial-gradient(circle at 20% 20%, rgba(201, 28, 82, 0.16), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(0, 81, 155, 0.16), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(201, 28, 82, 0.10), transparent 40%),
    linear-gradient(180deg, #09090c 0%, #0d0d12 100%);
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  padding: 110px 0 0;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.pf-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 85%);
}

/* =========================
   PAGE WRAP
========================= */
.pf-page-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
  flex: 1;
}

@media (max-width: 768px) {
  .pf-page-wrap {
    padding: 0 18px;
  }
}

/* =========================
   HERO CABECERA
========================= */
.pf-portfolio-hero {
  position: relative;
  margin-bottom: 55px;
  padding: 38px 36px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

.pf-portfolio-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: -120px;
  top: -160px;
  background: radial-gradient(circle, rgba(201, 28, 82, 0.22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.pf-portfolio-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(0, 81, 155, 0.22), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}

.pf-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.pf-hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 0 18px rgba(201, 28, 82, 0.8);
}

.pf-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 26px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.pf-hero-title {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: .96;
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 16px;
  max-width: 820px;
}

.pf-hero-title span {
  background: linear-gradient(90deg, #fff 0%, #f7bfd0 28%, #badbff 70%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pf-hero-subtitle {
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.pf-hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pf-hero-chip {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  min-height: 110px;
}

.pf-hero-chip strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.pf-hero-chip span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

/* =========================
   TITULOS DE SECCION
========================= */
.pf-section-head {
  margin-bottom: 28px;
}

.pf-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 10px;
}

.pf-title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -.03em;
}

.pf-subtitle {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .68);
}

/* =========================
   BLOQUES DE SECCION
========================= */
.pf-section-block {
  margin-bottom: 90px;
}

.pf-section-shell {
  position: relative;
  border-radius: 30px;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)),
    rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pf-section-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 30%);
}

/* =========================
   CARRUSEL
========================= */
.pf-carousel-wrapper {
  position: relative;
  padding: 0 36px;
  /* FIX: el wrapper toma la altura de su contenido */
  display: block;
}

.pf-carousel {
  display: flex;
  gap: var(--gap);
  overflow: hidden;
  width: 100%;
}

.pf-track {
  display: flex;
  gap: var(--gap);
  transition: transform .6s ease;
  will-change: transform;
}

/* =========================
   FLECHAS — FIX POSICION
========================= */
.pf-arrow {
  position: absolute;
  /* FIX: mitad de la altura de la card (320px / 2 = 160px) */
  top: 160px;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: background .25s, transform .25s;
  user-select: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.pf-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  /* FIX: mantiene el translateY fijo al hacer hover */
  transform: translateY(-50%) scale(1.04);
}

.pf-arrow.pf-prev { left: 0; }
.pf-arrow.pf-next { right: 0; }


/* =========================
   CARD PRINCIPAL — FIX IMAGENES
========================= */
.pf-card {
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  /* FIX: fondo negro visible cuando la imagen tiene transparencia/padding */
  background: transparent;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  transition: transform .3s ease, border-color .3s ease;
}

.pf-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.12);
}

/* FIX CLAVE: imágenes completas, centradas, sobre fondo negro */
.pf-card img {
  width: 100%;
  height: 100%;
  /* contain = imagen completa sin recorte */
  object-fit: cover;
  /* center center = centrado horizontal y vertical */
  object-position: center;
  transition: transform .45s ease, opacity .35s ease;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  /* fondo negro para los espacios vacíos alrededor de la imagen */
  background: transparent;
}

.pf-card img.pf-second {
  opacity: 0;
  z-index: 2;
}

/* =========================
   OVERLAY
========================= */
.pf-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(8, 8, 10, .92) 0%,
      rgba(8, 8, 10, .58) 45%,
      rgba(8, 8, 10, .12) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  padding: 24px;
  z-index: 3;
  transition: .35s ease;
}

.pf-card-text {
  transform: translateY(10px);
  transition: transform .35s ease, opacity .35s ease;
  opacity: .88;
}

.pf-card-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
  margin-bottom: 10px;
}

.pf-card-title {
  font-size: 26px;
  line-height: 1.08;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}

.pf-card-subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .80);
  max-width: 92%;
  margin-bottom: 16px;
}

.pf-card-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  transition: background .25s ease;
  backdrop-filter: blur(8px);
  display: inline-block;
}

.pf-card-link:hover {
  background: rgba(255, 255, 255, .14);
}

.pf-card:hover img.pf-first {
  transform: scale(1.04);
}

.pf-card:hover img.pf-second {
  opacity: 1;
  transform: scale(1.04);
}

.pf-card:hover .pf-card-text {
  transform: translateY(0);
  opacity: 1;
}

/* =========================
   CARD SIMPLE
========================= */
.pf-card.pf-simple {
  height: 280px;
  border-radius: 22px;
  background: #0d0d0d;
}

.pf-card.pf-simple img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* simple también usa contain para verse completa */
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
  background: none;
  z-index: 1;
  opacity: 1;
}

.pf-card.pf-simple:hover img {
  transform: scale(1.04);
}

/* =========================
   VIDEOS — FIX PLAY BUTTON
========================= */
.pf-video-section {
  margin-bottom: 80px;
}

.pf-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.pf-video-item {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pf-video-card {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.pf-video-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: opacity .3s ease, transform .4s ease;
  z-index: 1;
}

.pf-video-card:hover img {
  transform: scale(1.03);
}

.pf-video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

/* FIX: overlay bien centrado para el play button */
.pf-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, .10));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s ease;
  z-index: 2;
}

.pf-video-card:hover .pf-video-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, .18));
}

/* FIX: play button limpio, sin icono raro del navegador */
.pf-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, background .25s ease;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .30);
  pointer-events: none;
  position: relative;
  z-index: 3;
  /* FIX: triángulo SVG inline via pseudo, sin depender del glifo ▶ */
}

/* FIX: triángulo puro con CSS, sin depender del glifo del navegador */
.pf-play-btn::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  /* triángulo apuntando a la derecha */
  border-width: 11px 0 11px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  /* pequeño offset visual para centrar óptico */
  margin-left: 4px;
}

.pf-video-card:hover .pf-play-btn {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.24);
}

.pf-video-meta {
  padding: 6px 4px 0;
}

.pf-video-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}

.pf-video-subtitle {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .70);
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width: 1100px) {
  .pf-hero-grid {
    grid-template-columns: 1fr;
  }

  .pf-hero-side {
    max-width: 700px;
  }
}

@media(max-width: 900px) {
  .pf-video-grid {
    grid-template-columns: 1fr;
  }

  .pf-video-card {
    height: 340px;
  }

  .pf-title {
    font-size: 34px;
  }

  .pf-portfolio-hero,
  .pf-section-shell {
    padding: 24px;
  }
}

@media(max-width: 768px) {
  body.pf-page {
    padding: 96px 0 0;
  }

  .pf-hero-side {
    grid-template-columns: 1fr;
  }

  .pf-card {
    height: 250px;
  }

  .pf-card.pf-simple {
    height: 220px;
  }

  .pf-carousel {
    min-height: 250px;
  }

  .pf-arrow.pf-prev {
    left: 0;
  }

  .pf-arrow.pf-next {
    right: 0;
  }
}

@media(max-width: 576px) {
  .pf-portfolio-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .pf-section-shell {
    padding: 20px;
    border-radius: 24px;
  }

  .pf-card {
    height: 220px;
  }

  .pf-card.pf-simple {
    height: 200px;
  }

  .pf-video-card {
    height: 240px;
  }

  .pf-carousel {
    min-height: 220px;
  }

  .pf-arrow {
    width: 40px;
    height: 40px;
  }

  .pf-arrow.pf-prev {
    left: 0;
  }

  .pf-arrow.pf-next {
    right: 0;
  }

  .pf-card-title {
    font-size: 22px;
  }

  .pf-play-btn {
    width: 60px;
    height: 60px;
  }

  .pf-play-btn::after {
    border-width: 9px 0 9px 16px;
    margin-left: 3px;
  }
}

/* ══════════════════════════════════════
   REVEAL ON SCROLL
══════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   MARQUEE
══════════════════════════════════════ */
.pf-marquee-wrap {
  overflow: hidden;
  background: #C91C52;
  padding: 16px 0;
  white-space: nowrap;
}

.pf-marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee 22s linear infinite;
}

.pf-marquee-track span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 0 28px;
  color: rgba(255, 255, 255, 0.9);
}

.pf-marquee-track span.dot {
  color: rgba(255, 255, 255, 0.5);
  padding: 0;
  font-size: 8px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Ajuste responsive */
@media(max-width: 768px) {
  .pf-arrow { top: 125px; } /* mitad de 250px */
}
@media(max-width: 576px) {
  .pf-arrow { top: 110px; } /* mitad de 220px */
}