/* ================================ */
/* BLOQUE DE TÍTULO Y METADATOS     */
/* ================================ */

.project-title-v2 {
    padding-top: var(--space-l);
    background: var(--color-gray-light);
    border-bottom: var(--border-standard);
    box-sizing: border-box;
  }
  
  .project-title-v2 > .container {
    padding: 0 var(--space-m);
  }
  
  .project-title-v2 h1 {
    font-size: var(--font-hero);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-hero);
    margin: 0;
    padding: 0;
  }
  
  .project-title-meta {
    display: grid;
    grid-template-columns: 1fr .5fr 2fr;
    gap: var(--space-m);
    margin-top: var(--space-m);
    align-items: start;
    padding-bottom: var(--space-m);
  }
  
  .project-services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--font-ui);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-body);
  }
  
  .project-services-list.small {
    font-size: var(--font-body);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-body);
  }
  
  .project-description p {
    font-size: var(--font-body);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-body);
    margin: 0;
  }
  
  
/* ================================ */
/* BLOQUES DE IMAGEN                */
/* ================================ */

/* Combinamos las reglas para las imágenes y videos */
.project-image-full,
.project-image,
.project-grid-two {
  background: var(--color-white);
  padding: var(--space-s) var(--space-m) 0;
}

/* Para las imágenes y videos dentro de project-image */
.project-image img,
.project-image video,
.project-grid-two img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Estilos específicos para project-image-full */
.project-image-full img {
  object-fit: cover;
}

/* Estilos específicos para project-image (incluye video) */
.project-image img,
.project-image video {
  max-width: 1440px;
  object-fit: contain; /* Mantiene la proporción del video y las imágenes */
}

/* Estilo para las imágenes dentro de project-grid-two */
.project-grid-two {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
  box-sizing: border-box;
}

/* Espaciado adicional para el primer y último bloque de imagen */
.project-image:first-of-type {
  padding-top: var(--space-m);
}

.project-image:last-of-type {
  padding-bottom: var(--space-m);
}

  /* ============================== */
  /* BLOQUE: FRASE DESTACADA       */
  /* ============================== */

  .project-centered-quote {
    background: var(--color-white);
    padding: var(--space-m) var(--space-l);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
  }

  .project-centered-quote p {
    font-size: var(--font-display);
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-display);
    max-width: 40ch;
    margin: 0;
  }

  .project-quote-author {
    font-size: var(--font-body);
    font-weight: var(--font-weight-light);
    color: var(--color-black);
    line-height: var(--line-height-small);
  }

  
/* ============================== */
/* BLOQUE: DOS COLUMNAS (UX/UI)  */
/* ============================== */

.project-two-columns-stats {
  display: flex;
  flex-direction: row;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-l);
  background: var(--color-white);
  box-sizing: border-box;
  justify-content: space-between;
  align-items: flex-start;
}

.project-text-block,
.project-data-block {
  flex: 1;
  min-width: 0;
}

.project-subtitle {
  font-size: var(--font-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-medium);
  margin: 0 0 var(--space-xs) 0;
}

.project-text-block p,
.project-data-block p {
  font-size: var(--font-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-light);
  margin: 0;
}
  
  /* ================================ */
  /* NAVEGACIÓN ENTRE PROYECTOS       */
  /* ================================ */
  
  .project-navigation-hero {
    position: relative;
    height: 40svh;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    padding: 0 var(--space-m);
    box-sizing: border-box;
    border-top: var(--border-standard);
    overflow: hidden;
  }
  
  .project-navigation-container {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    max-width: calc(var(--space-l) * 6.25);
    height: var(--height-button);
    border: var(--border-standard);
    background: var(--color-white);
    box-sizing: border-box;
  }
  
  .project-nav-button,
  .project-nav-info {
    all: unset;
    flex: 1;
    cursor: pointer;
    font-size: var(--font-small);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-right: var(--border-standard);
    transition: background 0.2s ease, color 0.2s ease;
  }
  
  .project-nav-info {
    flex: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .project-nav-button:last-child {
    border-right: none;
  }
  
  .project-nav-button:hover {
    background: var(--color-black);
    color: var(--color-white);
  }
  
  .project-nav-button.disabled {
    pointer-events: none;
    color: rgba(0, 0, 0, 0.3);
    background: var(--color-white);
  }
  
  .explore-label {
    position: absolute;
    font-size: var(--font-hero);
    font-weight: var(--font-weight-medium);
    color: var(--color-black);
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    line-height: var(--line-height-hero);
  }

  /* ================================ */
  /* BOTÓN "UP" FLOTANTE              */
  /* ================================ */

  .scroll-up-button {
    position: fixed;
    bottom: var(--space-l);
    right: var(--space-m);
    width: var(--space-l);
    height: var(--space-l);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-black);
    font-size: var(--font-small);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    border: var(--border-standard);
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }  

  .scroll-up-button.visible {
    opacity: 1;
  }

  .scroll-up-button.bump,
  .scroll-up-button:hover {
    transform: translateY(-10px);
  }

  .scroll-up-button.stuck-in-nav {
    position: absolute;
    top: 50%;
    right: var(--space-m);
    bottom: auto;
    transform: translateY(-50%) translateX(0);
  }

/* ================================ */
/* MEDIA QUERY: TABLET (≤1024px)   */
/* ================================ */

@media (max-width: 1024px) {

  /* ===== BLOQUE DE TÍTULO Y METADATOS ===== */
  
  .project-title-v2 {
    padding-top: var(--space-xl);
  }
  
  .project-title-v2 > .container {
    max-width: 100%;
    padding-inline: var(--space-m);
  }

  .project-title-meta {
    grid-template-columns: .5fr 1.25fr 5fr;
    gap: var(--space-m);
  }

  .project-two-columns-stats {
    flex-direction: column;
    gap: var(--space-m);
    padding: var(--space-m) var(--space-m);
  }

  /* ===== NAVEGADOR ===== */
  .project-navigation-hero {
    max-height: 25svh;
  }
}

/* ================================ */
/* MEDIA QUERY: MOBILE (≤640px)    */
/* ================================ */

@media (max-width: 640px) {

  /* ===== BLOQUE DE TÍTULO Y METADATOS ===== */

  .project-title-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    margin-top: var(--space-m);
    padding-bottom: var(--space-s);
  }

  .project-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    padding: 0;
    margin: 0;
  }

  .project-services-list li {
    display: inline-block;
    padding-right: var(--space-xs);
  }

  /* ===== BLOQUE DE FRASE DESTACADA ===== */
  .project-centered-quote {
    padding: var(--space-m) var(--space-s);
  }

  /* ===== NAVEGADOR ===== */
  .explore-label {
    display: none;
  }

  .project-navigation-hero {
    min-height: 12.5svh;
  }
}

/* ============================== */
/* PLAYGROUND — HERO CENTRADO    */
/* ============================== */

.playground-hero {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--color-white);
  text-align: center;
  padding: var(--space-l) var(--space-m);
  box-sizing: border-box;
  border-bottom: none;
}

.playground-hero h1 {
  font-size: var(--font-hero);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-hero);
  margin: 0 0 var(--space-s) 0;
}

.playground-description {
  font-size: var(--font-body);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-body);
  max-width: 60ch;
  margin: 0 auto;
}

/* ============================== */
/* PLAYGROUND — FLOATING IMAGES  */
/* ============================== */

.floating-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.floating-image {
  position: absolute;
  width: 250px;
  aspect-ratio: 4 / 3;
  border: var(--border-standard);
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease, filter 0.3s ease;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay completo tipo WORK pero centrado */
.floating-image::after {
  content: attr(data-title);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-body);
  font-weight: var(--font-weight-light);
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: var(--space-s);
  box-sizing: border-box;
  pointer-events: none;
}

.floating-image:hover::after {
  opacity: 1;
}

.floating-image:hover {
  filter: brightness(0.5);
  z-index: 100;
}

.floating-paused {
  animation-play-state: paused !important;
}

/* ============================== */
/* PLAYGROUND — PROJECT MODAL     */
/* ============================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-l) var(--space-m);
  overflow-y: auto;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-inner {
  width: 100%;
  max-width: 960px;
  background: var(--color-white);
  border: var(--border-standard);
  box-sizing: border-box;
  padding: var(--space-m);
  position: relative;       /* CLAVE para posicionar el botón relativo a esto */
}

.modal-close {
  all: unset;
  position: fixed;
  top: var(--space-m);
  right: var(--space-m);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-black);
  z-index: 1000;
}

.hidden {
  display: none !important;
}

/* Contenedor principal del modal */
.modal-inner {
  width: 100%;
  max-width: 960px;
  background: var(--color-white);
  border: var(--border-standard);
  box-sizing: border-box;
  padding: var(--space-m);
}

/* Encabezado: 2 columnas en desktop, 1 en móvil */
.modal-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-s);               /* menos espacio */
  margin-bottom: var(--space-s);     /* menos espacio */
}

/* MISMA jerarquía tipográfica en título y párrafo */
.modal-header h2,
.modal-header p {
  font-size: var(--font-small);
  line-height: var(--line-height-small);
  font-weight: var(--font-weight-light);
  margin: 0;
}

/* Galería: imágenes apiladas SIN borde */
.modal-gallery img,
.modal-gallery video {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--space-s);
  border: none;          /* sin contorno */
}



/* Responsive: pantalla ≤ 768 px → header a 1 columna */
@media (max-width: 768px) {
  .modal-header {
    grid-template-columns: 1fr;
  }
}
