/* ============================================================
   7PM ARQUITECTURA — Ficha de Obra
   Mobile first
   ============================================================ */

/* ─── Body override para esta página ─────────────────────── */
body.page-obra {
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════
   MOBILE (<768px)
   Layout: info arriba → imágenes en scroll → volver abajo
   ══════════════════════════════════════════════════════════ */

/* ─── Wrapper ────────────────────────────────────────────── */
.obra {
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 40px;
}

/* ─── Info: aparece primero en mobile, sin fixed ─────────── */
.obra__info {
  padding: 0 24px 40px;
}

/* ─── Nombre de obra ─────────────────────────────────────── */
.obra__eyebrow {
  font-family: var(--font-tabular);
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--color-gray);
  display: block;
  margin-bottom: 8px;
}

.obra__titulo {
  font-family: var(--font-satoshi);
  font-size: 36px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-black);
  margin-bottom: 32px;
}

/* ─── Grid de datos ──────────────────────────────────────── */
.obra__datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 16px;
  margin-bottom: 32px;
}

.obra__dato-label {
  font-family: var(--font-tabular);
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--color-gray);
  display: block;
  margin-bottom: 5px;
}

.obra__dato-valor {
  font-family: var(--font-satoshi);
  font-size: 13px;
  color: var(--color-black);
  line-height: 1.4;
}

/* ─── Memoria descriptiva ────────────────────────────────── */
.obra__memoria-label {
  font-family: var(--font-tabular);
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--color-gray);
  display: block;
  margin-bottom: 10px;
}

.obra__memoria-texto {
  font-family: var(--font-satoshi);
  font-size: 13px;
  color: var(--color-black);
  line-height: 1.65;
}

.obra__memoria-texto p + p {
  margin-top: 12px;
}

/* ─── Imágenes en scroll — mobile ────────────────────────── */
.obra__galeria {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obra__foto {
  width: 100%;
  position: relative;
  /* Fade in/out con IntersectionObserver */
  opacity: 0;
  transition: opacity 0.55s ease;
}

.obra__foto.is-visible {
  opacity: 1;
}

.obra__foto img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}


/* ══════════════════════════════════════════════════════════
   DESKTOP (≥768px)
   Layout: panel info fijo abajo-izq + imágenes en scroll
   ══════════════════════════════════════════════════════════ */

@media (min-width: 768px) {

  /* Reset del wrapper */
  .obra {
    padding-top: 0;
    padding-bottom: 0;
  }

  /* ─── Info: caja fija abajo izquierda ─────────────────── */
  .obra__info {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 240px;
    background-color: #ffffff;
    padding: 28px 28px 24px;
    z-index: 10;
    /* Sin borde, fondo blanco puro sobre imagen */
  }

  /* ─── Galería: ocupa todo el viewport menos el panel info */
  .obra__galeria {
    /* El scroll es del body — las imágenes se apilan */
    display: block;
    /* Sin gap en desktop — cada imagen llena el viewport */
  }

  /* ─── Cada foto ocupa el 100vh ────────────────────────── */
  .obra__foto {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.65s ease;
  }

  .obra__foto.is-visible {
    opacity: 1;
  }

  .obra__foto img {
    width: 80vw;
    height: calc(100dvh - 60px);
    object-fit: contain;
    object-position: center;
  }

  /* ─── Bullets + flechas — derecha centro ─────────────── */
  .obra__nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }


}

/* ─── Flechas ────────────────────────────────────────────── */
.obra__flecha {
  display: none; /* Solo desktop */
}

@media (min-width: 768px) {
  .obra__flecha {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
    transition: color 160ms ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
  }

  .obra__flecha:hover {
    color: var(--color-black);
  }

  .obra__flecha.is-disabled {
    opacity: 0.2;
    pointer-events: none;
  }

  .obra__flecha svg {
    width: 14px;
    height: 14px;
  }
}

/* ─── Bullets de obra ────────────────────────────────────── */
.obra__bullets {
  display: none; /* Solo desktop */
}

@media (min-width: 768px) {
  .obra__bullets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

.obra__bullet {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-gray);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background-color 200ms ease,
    transform        200ms ease;
}

.obra__bullet.is-active {
  background-color: var(--color-black);
  transform: scale(1.75);
}
