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

/* Variables suaves (preparado para modo oscuro) */
:root {
  --bg: #f5f5f7;
  --text: #111;
  --soft-text: #777;
  --card: #ffffff;
  --accent: #f3dfe6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* Header elegante */

.header {
  text-align: center;
  padding: 90px 20px 50px;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--soft-text);
  margin-top: 12px;
  font-size: 0.95rem;
}

/* Contenedor */

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
}

/* Tarjeta estética */

.card {
  background: var(--card);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.05);
  margin-bottom: 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.08);
}

.card h2 a {
  text-decoration: none;
  color: var(--text);
}

.card p {
  margin-top: 10px;
  color: #555;
}

.date {
  display: block;
  margin-top: 16px;
  color: #999;
  font-size: 0.85rem;
}

/* Footer */

.footer {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 0.8rem;
}

/* Botón volver arriba */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.container > a {
  display: inline-block;
  margin-bottom: 20px;
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
}

.container > a:hover {
  text-decoration: underline;
}

/* ===== LAYOUT CON SIDEBAR ===== */

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
}

/* Post principal */

.post {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.05);
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 40px;
  height: fit-content;
  font-size: 0.9rem;
  color: #555;
}

.sidebar h3 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  margin-top: 24px;
  color: #111;
}

/* ===== ajuste embed spotify ===== */

.sidebar iframe {
  width: 100%;
  height: 152px;
  border-radius: 12px;
  margin-top: 8px;
}

/* ===== carrusel portada ===== */

.carousel {
  position: relative;
  max-width: 1100px;
  margin: 20px auto 40px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-track img {
  width: 100%;
  flex-shrink: 0;
  height: 260px;
  object-fit: contain;
  border-radius: 0;
}

/* flechas */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 28px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  z-index: 5;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* ===== layout dos columnas index ===== */

.two-columns {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

/* columnas */

.col-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* tarjeta dark */

.card-dark {
  background: #111;
  color: white;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

.card-dark h2 {
  color: white;
}

.card-dark .date {
  color: #bbb;
}
.card-dark h2 a {
  color: white;
  text-decoration: none;
}

.card-dark h2 a:hover {
  opacity: 0.8;
}

/* ===== modo dark para posts especiales (fix fuerte) ===== */

.dark-post {
  background: #0f0f10;
  color: #f2f2f2;
}

/* TARJETA PRINCIPAL — override fuerte */

.dark-post .post {
  background: #151517 !important;
  color: #f2f2f2 !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}

/* textos */

.dark-post .post p,
.dark-post .post h1,
.dark-post .post h2,
.dark-post .post h3 {
  color: #f2f2f2;
}

/* enlaces */

.dark-post a {
  color: #ffffff;
}

/* fechas */

.dark-post .date {
  color: #b5b5b5;
}

/* sidebar */

.dark-post .sidebar {
  color: #d0d0d0;
}

.dark-post .sidebar h3 {
  color: #ffffff;
}

/* ===== FIX DEFINITIVO DARK POST ===== */

body.dark-post .post {
  background: #151517 !important;
  color: #f2f2f2 !important;
}

body.dark-post {
  background: #0f0f10 !important;
}

/* ===== DARK PARA TARJETAS EN POSTS OSCUROS ===== */

body.dark-post .card {
  background: #151517 !important;
  color: #f2f2f2 !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}

body.dark-post .card h1,
body.dark-post .card h2,
body.dark-post .card p,
body.dark-post .card a {
  color: #f2f2f2 !important;
}


/* ===== slides con texto ===== */

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: center;
}

.slide img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  border-radius: 16px;
  background: #f4f4f6;
}

.slide img {
  position: relative;
  z-index: 1;
}

.slide-text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

/* ===== imágenes post estilo limpio ===== */

.post-image {
  margin: 24px 0;
}

.post-image img {
  width: 100%;
  display: block;
}

/* ===== quitar frame galería ===== */

.carousel-track img,
.slide img {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


}

/* ===== post dark sin estructura de tarjeta ===== */

.post-content {
  max-width: 720px;
  margin: 0 auto;
}

.dark-post .post-content h1 {
  margin-top: 0;
}

/* ===== SALAS · estética museo ===== */

.sala-title {
  font-size: 2.6rem;
  margin-bottom: 6px;
}

.sala-subtitle {
  font-size: 1.05rem; /* un poco mayor que el texto */
  color: #e6e6e6;
  margin-bottom: 42px;
}

/* ===== pieza museo ===== */

.pieza-museo {
  display: grid;
  grid-template-columns: 1fr 260px; /* imagen izq · texto dcha */
  gap: 40px;
  align-items: center;
  margin: 56px 0;
}

/* centrado perfecto independientemente del tamaño */

.pieza-media,
.pieza-texto {
  display: flex;
  align-items: center;
}

/* imagen */

.pieza-media img,
.pieza-media iframe,
.pieza-media video {
  width: 100%;
  display: block;
}

/* texto */

.pieza-texto {
  font-size: 0.95rem;
  color: #f2f2f2;
  line-height: 1.5;
}

.pieza-caption {
  margin: 0;
}

/* ===== SALAS · centrado conjunto ===== */

.pieza-museo {
  display: grid;
  grid-template-columns: auto 260px; /* obra + cartela */
  gap: 40px;
  align-items: center;

  /* 🔥 CLAVE: centra el conjunto */
  justify-content: center;

  /* 🔥 CLAVE: limita ancho museo */
  max-width: 900px;
  margin: 56px auto;
}

/* centrado interno perfecto */

.pieza-media,
.pieza-texto {
  display: flex;
  align-items: center;
}

/* imagen */

.pieza-media img,
.pieza-media iframe,
.pieza-media video {
  max-width: 520px;   /* ← tamaño museo elegante */
  width: 100%;
  display: block;
}

/* texto */

.pieza-texto {
  font-size: 0.95rem;
  color: #f2f2f2;
  line-height: 1.5;
}

.pieza-caption {
  margin: 0;
}

.pieza-museo {
  display: grid;
  grid-template-columns: minmax(0, 520px) 260px;
  gap: 40px;
  align-items: center;
  justify-content: center;   /* centra la composición */
  margin: 56px 0;
}

/* centrado interno perfecto */

.pieza-media,
.pieza-texto {
  display: flex;
  align-items: center;
}

/* imagen */

.pieza-media img,
.pieza-media iframe,
.pieza-media video {
  width: 100%;
  display: block;
  max-width: 520px;
}

/* ===== YOUTH · posts centrados ===== */

.youth-posts {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== ARCHIVE · lista de salas ===== */

.archive-posts {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== YOUTH POSTS ===== */

.youth-posts {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== GALERÍA 3-UP ===== */

.carousel {
  position: relative;
  max-width: 1100px;
  margin: 20px auto 40px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.slide {
  flex: 0 0 100%;
  padding: 0;
}

.slide img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  display: block;
}

/* flechas */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 28px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  z-index: 5;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

/* ===== TARJETAS SALAS (ARCHIVE) ===== */

.card-dark {
  background: #1c1c1f;   /* gris oscuro elegante */
  border: 1px solid #2a2a2e;
}

.card-dark h2 a {
  color: #ffffff;
}

.card-dark p,
.card-dark .date {
  color: #bfbfc4;
}

/* ===== ARCHIVE — misma tarjeta que youth ===== */

.card-dark {
  background: #2a2a2e;   /* gris oscuro visible */
  color: #f2f2f2;
}

/* ===== ARCHIVE — MISMA TARJETA QUE YOUTH ===== */

.card.card-dark {
  background: #2a2a2e !important;
  color: #f2f2f2;
}

/* ===== ARCHIVE — MISMA TARJETA PERO GRIS ===== */

.card.card-dark {
  background: #2a2a2e;
}

/* ===== FIX: las salas SÍ son tarjetas ===== */

body.dark-post .card.card-dark {
  background: #1a1a1d !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.25) !important;
  border-radius: 20px !important;
  padding: 30px !important;
}

/* ===== HOME LANDING ===== */

.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.home-inner {
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.home-photo {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 28px;
}

.home-title {
  font-size: 2.6rem;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.home-subtitle {
  margin-top: 10px;
  color: var(--soft-text);
  font-size: 0.95rem;
}

.home-links {
  margin-top: 48px;
  display: flex;
  flex-direction: column;   /* ← uno debajo del otro */
  align-items: center;
  gap: 18px;
}

/* ===== subrayado fino estilo enlace ===== */

/* ===== subrayado limpio home ===== */

.home-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* ===== ARCHIVE sin outline ===== */

.card.card-dark {
  border: none !important;
}

/* ===== ARCHIVE — quitar halo de tarjeta ===== */

.archive-posts .card.card-dark {
  box-shadow: none !important;
}

/* ===== cartela en columna (museo) ===== */

.pieza-texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* crédito de foto */

.photo-credit {
  font-size: 0.75rem;
  color: #9a9aa0;
  margin-top: 12px;
}

/* ===== portada debajo del texto ===== */

.card-cover {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  margin-top: 18px;   /* espacio respecto al texto */
}

/* ===== subrayado real home (FORCE) ===== */

.home-link,
.home-link:visited {
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  color: inherit !important;
}

/* ===== tamaño enlaces home ===== */

.home-link {
  font-size: 1.6rem;
}
