/* ===== CASO (página de detalle) =====
   Reutiliza css/base.css (reset, tipografía, --accent) y css/galeria.css
   (.gl-nav, fondo oscuro) — este archivo solo define lo exclusivo de la
   página de detalle de un caso. */

.cs-body {
  background: #0b0d0c;
  min-height: 100vh;
}

/* ===== Encabezado: volver + eyebrow + título ===== */
.cs-hero {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: 160px 40px 60px;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 40px;
  transition: color 0.2s ease;
}

.cs-back:hover {
  color: #ffffff;
}

.cs-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 18px;
}

.cs-eyebrow::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cs-title {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: #ffffff;
  max-width: 900px;
}

/* ===== Foto + lista de detalles ===== */
.cs-grid {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px 120px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* líneas de grid decorativas, sutiles, como en la referencia */
.cs-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent 33.333%
  );
  pointer-events: none;
}

.cs-photo {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.cs-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-details {
  position: relative;
  z-index: 1;
  padding-top: 24px;
}

.cs-details__line {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cs-details__line:first-child {
  border-top: none;
}

.cs-more-note {
  margin-top: 36px;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.42);
}

/* ===== Navegación inferior: caso anterior / siguiente ===== */
.cs-nav-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cs-nav-bottom__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.cs-nav-bottom__link.cs-next {
  text-align: right;
  align-items: flex-end;
  margin-left: auto;
}

.cs-nav-bottom__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent);
}

.cs-nav-bottom__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  transition: color 0.2s ease;
}

.cs-nav-bottom__link:hover .cs-nav-bottom__title {
  color: var(--accent);
}

@media (max-width: 860px) {
  .cs-hero {
    padding: 130px 24px 40px;
  }

  .cs-grid {
    grid-template-columns: 1fr;
    padding: 0 24px 80px;
    gap: 32px;
  }

  .cs-nav-bottom {
    flex-direction: column;
    padding: 40px 24px 80px;
  }

  .cs-nav-bottom__link.cs-next {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }
}

.cs-photo__expand {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  background: transparent; cursor: zoom-in; color: white; font: inherit;
}
.cs-photo__expand span {
  position: absolute; right: 16px; bottom: 16px; border: 1px solid #ffffff60;
  border-radius: 100px; padding: 10px 16px; background: #111c; font-size: .8rem;
}
.cs-photo__expand:focus-visible { outline-offset: -6px; }
.cs-viewer {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 72px 24px 24px; border: 0; background: #0b0d0cf5; color: white;
}
.cs-viewer::backdrop { background: #0b0d0c; }
.cs-viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.cs-viewer figure { margin: 0; max-width: 1200px; width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cs-viewer__image { width: 100%; min-height: 0; max-height: calc(100dvh - 220px); object-fit: contain; }
.cs-viewer figcaption { text-align: center; color: #ddd; font-size: .9rem; line-height: 1.5; max-width: 760px; }
.cs-viewer button { width: 44px; height: 44px; border: 1px solid #ffffff60; border-radius: 50%; background: #ffffff10; color: white; font-size: 1.5rem; cursor: pointer; flex-shrink: 0; }
.cs-viewer__close { position: absolute; top: 20px; right: 20px; }
.cs-viewer__nav:not([hidden]) { display: flex; gap: 24px; align-items: center; }
.cs-viewer button:disabled { opacity: .3; cursor: default; }
/* Bloques opcionales para cuando un caso incorpore varias fotos y texto largo. */
.cs-photo-group { min-width: 0; display: grid; gap: 24px; }
.cs-photo-group figure { margin: 0; }
.cs-photo-group figcaption { color: #bbb; font-size: .85rem; line-height: 1.5; margin-top: 12px; }
.cs-details h2, .cs-details h3 { color: white; font-size: 1.35rem; line-height: 1.3; margin: 32px 0 12px; }
.cs-details h2:first-child, .cs-details h3:first-child { margin-top: 0; }
.cs-details__text { color: #d0d0d0; font-size: 1rem; line-height: 1.75; margin-bottom: 20px; }
.cs-viewer button[aria-disabled="true"] { opacity: .3; cursor: default; }
