/* =========================
   BODY Y VIDEO DE FONDO
========================= */
body {
  font-family: Helvetica, Arial, sans-serif;
  letter-spacing: -0.07em;
  color: #333;
  margin: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

#background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: -1;
  border-radius: 10px;
  object-fit: cover;
}

/* =========================
   HEADER
========================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  overflow: visible;
}

/* Contenedor interno */
header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* LOGO */
header h1 {
  font-size: 2rem;       /* grande */
  font-weight: bold;
  color: #333;           /* mismo color que el texto */
  margin: 0;
  cursor: pointer;       /* cursor pointer para indicar que es clicable */
  text-decoration: none; /* quita subrayado si lo estuviera heredando */
  transition: color 0.3s;
}

header h1:hover {
  color: gray;           /* gris al hover */
}

/* MENÚ */
nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s;
}

nav a:hover {
  color: gray;
}

/* =========================
   WRAPPER GENERAL
========================= */
.jm-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 6rem;
}

/* =========================
   FILAS
========================= */
.jm-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin: 6rem 0;
  gap: 2rem;
}

.jm-row:last-of-type {
  margin-bottom: 0;
}

/* =========================
   BLOQUES
========================= */
.jm-text-small {
  width: 25%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.jm-text-full {
  width: 50%;
}

.jm-img-small,
.jm-video-small {
  width: 25%;
}

.jm-img-medium,
.jm-video-medium {
  width: 50%;
}

.jm-img-full,
.jm-video-big {
  width: 50%;
}

/* =========================
   MEDIA ELEMENTS
========================= */
img,
video,
iframe {
  width: 100%;
  display: block;
}

.jm-video-small video,
.jm-video-big video {
  height: auto;
}

.jm-full-bleed-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.jm-full-bleed-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.jm-full-bleed-img {
  width: 100%;
  margin-top: 10rem;
  margin-bottom: 0;
}

/* =========================
   ABOUT COLLAGE
========================= */
.about-collage {
  width: 75%;
  position: relative;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.about-collage.visible {
  opacity: 1;
}

.collage-item {
  position: absolute;
  cursor: grab;
  width: 150px;
  user-select: none;
  opacity: 0;
  transition: transform 0.1s ease, opacity 0.5s ease;
}

.collage-item img {
  width: 100%;
  display: block;
  border-radius: 0;
}

.collage-item p {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.3rem;
}

/* =========================
   PROJECTS
========================= */
.projects-page {
  padding-top: 120px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem;
}

.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  transition: transform 0.3s ease;
}

.project-video:hover {
  transform: scale(1.04);
}

/* =========================
   QUESTIONS
========================= */
#questionContainer {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: 120px;
}

.question {
  position: absolute;
  max-width: 260px;
  text-align: center;
  transition: all 0.4s ease;
}

.prev {
  opacity: 0.25;
  font-size: 0.7em;
  pointer-events: none;
}

button.choiceBtn {
  margin: 0.4rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

.question select {
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.5rem;
  border-radius: 5px;
  border: 1px solid #999;
  font-size: 1rem;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.3s;
}

.question select:hover {
  border-color: #555;
}

.question select:disabled {
  background-color: #eee;
  cursor: not-allowed;
}

input[type="range"] {
  width: 160px;
  margin: 0.5rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 160px;
  margin: 0 auto;
  font-weight: bold;
}

/* =========================
   ABOUT CONTENT
========================= */
#aboutContent {
  padding: 2rem;
  font-size: 1.2rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .jm-row {
    flex-direction: column;
    gap: 1rem;
    margin-top: 6rem;
  }

  .jm-text-small {
    width: 100%;
    order: -1;
    margin-bottom: 1rem;
    align-items: center;
  }

  .about-collage {
    width: 100%;
    height: auto;
    position: static;
    opacity: 1;
  }

  .collage-item {
    position: static;
    width: 48%;
    margin: 1%;
    opacity: 1;
    transform: none;
    cursor: default;
  }

  .collage-item p {
    text-align: center;
  }
}

@media (max-width: 600px) {
  header {
    height: auto;
  }

  header .container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem;
  }

  nav {
    width: 100%;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 1rem;
    margin-right: 1rem;
  }

  .question {
    left: 50% !important;
    transform: translateX(-50%);
  }

  .question select {
    font-size: 0.9rem;
  }
}
