/* ====== Museo Virtual — estilos ====== */
:root {
  --fondo: #f5f1ea;
  --panel: #ffffff;
  --tinta: #2b2620;
  --tinta-suave: #6c6459;
  --acento: #8d6b3f;
  --acento-osc: #6d5230;
  --linea: #d9d2c5;
  --sombra: 0 2px 12px rgba(43, 38, 32, .10);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--fondo);
  color: var(--tinta);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Cabecera ---------- */
.cabecera {
  background: #241f19;
  color: #f5f1ea;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.marca {
  display: flex;
  align-items: center;
  gap: .8rem;
  color: inherit;
  text-decoration: none;
  width: fit-content;
}
.marca-icono { font-size: 1.9rem; color: #d3b17c; }
.marca strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: .05em;
  display: block;
  line-height: 1.2;
}
.marca small { color: #b8ad9c; font-size: .8rem; }

/* ---------- Contenido ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.miga {
  font-size: .85rem;
  color: var(--tinta-suave);
  margin-bottom: 1.4rem;
}
.miga a { color: var(--acento); text-decoration: none; }
.miga a:hover { text-decoration: underline; }

.portada-intro { text-align: center; margin-bottom: 2.5rem; }
.portada-intro h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: normal;
  margin-bottom: .5rem;
}
.portada-intro p { color: var(--tinta-suave); max-width: 640px; margin: 0 auto; }

/* ---------- Línea de tiempo ---------- */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: .55rem;
  top: .4rem;
  bottom: .4rem;
  width: 3px;
  background: linear-gradient(#c8b48e, var(--acento), #4a3a26);
  border-radius: 2px;
}

.hito { position: relative; margin-bottom: 2rem; }
.hito::before {
  content: "";
  position: absolute;
  left: -2.19rem;
  top: 1.35rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--acento);
  border: 3px solid var(--fondo);
  box-shadow: 0 0 0 2px var(--acento);
}

.hito-tarjeta {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 10px;
  box-shadow: var(--sombra);
  display: flex;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hito-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(43,38,32,.16); }

.hito-imagen {
  flex: 0 0 170px;
  min-height: 150px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.hito-cuerpo { padding: 1rem 1.3rem 1.1rem; flex: 1; }

.hito-epoca {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acento-osc);
  font-weight: 600;
}
.hito-cuerpo h2 { font-family: var(--serif); font-weight: normal; font-size: 1.45rem; margin: .1rem 0 .25rem; }
.hito-cuerpo h2 a { color: inherit; text-decoration: none; }
.hito-cuerpo h2 a:hover { color: var(--acento-osc); }
.hito-resumen { font-size: .92rem; color: var(--tinta-suave); margin-bottom: .7rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-block;
  background: #f0e8da;
  border: 1px solid #ddd0b8;
  color: #57452a;
  border-radius: 999px;
  padding: .22rem .8rem;
  font-size: .84rem;
  text-decoration: none;
  transition: background .15s ease;
}
.chip:hover { background: #e4d5bb; }

/* ---------- Página de corriente ---------- */
.corriente-cab { margin-bottom: 1.6rem; }
.corriente-cab .hito-epoca { font-size: .85rem; }
.corriente-cab h1 { font-family: var(--serif); font-weight: normal; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.corriente-descripcion {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-left: 5px solid var(--acento);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  box-shadow: var(--sombra);
  margin-bottom: 2.2rem;
  font-size: 1.02rem;
  text-align: justify;
}

.seccion-titulo {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--linea);
  padding-bottom: .4rem;
}

.tarjetas-artista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.3rem;
}
.tarjeta-artista {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--sombra);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.tarjeta-artista:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(43,38,32,.18); }
.tarjeta-artista-img { height: 190px; background-size: cover; background-position: center top; }
.tarjeta-artista-cuerpo { padding: .9rem 1.1rem 1.1rem; }
.tarjeta-artista-cuerpo h3 { font-family: var(--serif); font-weight: normal; font-size: 1.15rem; }
.tarjeta-artista-cuerpo .vida { color: var(--tinta-suave); font-size: .85rem; margin-bottom: .35rem; }
.tarjeta-artista-cuerpo .n-obras { color: var(--acento-osc); font-size: .82rem; }

/* ---------- Página de artista ---------- */
.artista-cab { margin-bottom: 1.4rem; }
.artista-cab h1 { font-family: var(--serif); font-weight: normal; font-size: clamp(1.7rem, 4vw, 2.3rem); }
.artista-cab .vida { color: var(--tinta-suave); }
.artista-bio {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 1.1rem 1.4rem;
  box-shadow: var(--sombra);
  margin-bottom: 2rem;
}

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.3rem;
}
.obra {
  background: var(--panel);
  border: 1px solid var(--linea);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--sombra);
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}
.obra:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(43,38,32,.18); }
.obra img { width: 100%; height: 230px; object-fit: cover; display: block; background: #e8e2d6; }
.obra-cuerpo { padding: .75rem 1rem .9rem; }
.obra-cuerpo h3 { font-size: .98rem; font-weight: 600; line-height: 1.35; }
.obra-cuerpo .anio { color: var(--acento-osc); font-size: .85rem; }
.obra-cuerpo .detalle { color: var(--tinta-suave); font-size: .8rem; margin-top: .15rem; }

/* ---------- Pie ---------- */
.pie {
  background: #241f19;
  color: #9b9082;
  text-align: center;
  font-size: .78rem;
  padding: 1.1rem 1rem;
  line-height: 1.7;
}

/* ---------- Visor con zoom ---------- */
.visor {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 8, .95);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visor.oculto { display: none; }

.visor-lienzo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.visor-lienzo.arrastrando { cursor: grabbing; }
.visor-lienzo img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  user-select: none;
  will-change: transform;
}

.visor-btn {
  background: rgba(245, 241, 234, .12);
  color: #f5f1ea;
  border: 1px solid rgba(245, 241, 234, .35);
  border-radius: 8px;
  font-size: 1.15rem;
  line-height: 1;
  padding: .5rem .75rem;
  cursor: pointer;
  transition: background .15s ease;
}
.visor-btn:hover { background: rgba(245, 241, 234, .28); }

.visor-cerrar { position: absolute; top: 1rem; right: 1rem; z-index: 102; }
.visor-ant, .visor-sig {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 102;
  font-size: 2rem;
  padding: .4rem .9rem;
}
.visor-ant { left: .9rem; }
.visor-sig { right: .9rem; }

.visor-controles {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 102;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: rgba(12, 10, 8, .55);
  padding: .4rem .7rem;
  border-radius: 10px;
}
.visor-controles span { color: #f5f1ea; font-size: .9rem; min-width: 4.2em; text-align: center; }

.visor-pie {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  background: linear-gradient(transparent, rgba(12,10,8,.92) 40%);
  color: #f5f1ea;
  text-align: center;
  padding: 2.2rem 4.5rem 1rem;
  pointer-events: none;
}
.visor-pie h3 { font-family: var(--serif); font-weight: normal; font-size: 1.25rem; }
.visor-pie p { color: #c9bfae; font-size: .88rem; }
.visor-ayuda { font-size: .72rem !important; color: #8d8271 !important; margin-top: .3rem; }

/* ---------- Adaptación móvil ---------- */
@media (max-width: 640px) {
  .hito-tarjeta { flex-direction: column; }
  .hito-imagen { flex-basis: auto; height: 150px; }
  .timeline { padding-left: 1.7rem; }
  .hito::before { left: -1.72rem; }
  .visor-pie { padding: 2rem .8rem .8rem; }
  .visor-ant { left: .35rem; }
  .visor-sig { right: .35rem; }
}
