:root{
  --max: 1120px;

  /* Paleta tipo reporte */
  --bg: #ffffff;
  --surface: #f7f8fa;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-2: #0f172a;

  /* Estilo */
  --card-radius: 16px;
  --shadow: 0 8px 20px rgba(17,24,39,.08);

  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Base ===== */
*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* Links */
a{ color: var(--accent); }
a:hover{ text-decoration: underline; }

/* ===== Topbar ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  width: min(var(--max), 92vw);
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.brand-logo{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.brand-text{
  font-weight: 900;
  letter-spacing: .22em;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Nav */
.nav{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-link{
  text-decoration: none;
  color: var(--muted);
  font-weight: 800;
  font-size: 15px;
}

.nav-link:hover{
  color: var(--text);
  text-decoration: underline;
}

/* ===== Layout de página ===== */
.page{
  width: min(var(--max), 92vw);
  margin: 0 auto;
  padding: 44px 0 30px;
}

/* Justificar texto SOLO dentro del contenido principal */
.page p,
.page li{
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.fig figcaption{
  text-align: center;
}


/* ===== Hero ===== */
.hero{
  max-width: 980px;
  margin: 0 auto;
}

.hero h1{
  font-size: 44px;
  margin: 0 0 12px;
  color: var(--accent-2);
  letter-spacing: -0.02em;
}

.hero p{
  margin: 0;
  font-size: 18px;
  max-width: 900px;
  color: var(--muted);
}

/* ===== Cards (reutilizable) ===== */
.card{
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3{
  margin: 0 0 8px;
  color: var(--accent-2);
}

/* Dentro de .card: márgenes en 0; el espaciado lo controla la regla universal */
.card p{
  color: var(--text);
}

/* Espaciado universal entre elementos dentro de .card */
.card > * + *{
  margin-top: 1rem;
}

/* Arreglo específico: tabla + párrafo no se peguen */
.card .table + p{
  margin-top: 1rem;
}

.card .fig{
  margin-bottom: 1rem;
}

/* ===== Figuras (imagen + caption) ===== */
.fig{
  margin: 0;
  text-align: center;
}

.fig img{
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 760px;     /* único valor (sin duplicados) */
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.fig figcaption{
  margin-top: 8px;
  margin-bottom: .5rem; /* extra después del caption */
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Dos figuras lado a lado */
.fig-grid{
  margin-top: 0; /* separación la pone .card > * + * */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.fig-grid .fig{
  margin: 0;
  text-align: center;
}

/* ===== Tablas ===== */
.table{
  width: 100%;
  border-collapse: collapse;
  margin: 0; /* separación la pone .card > * + * */
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.table th,
.table td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table thead th{
  background: var(--surface);
  color: var(--accent-2);
  font-weight: 900;
}

.table tbody tr:last-child td{
  border-bottom: none;
}

/* ===== Weeks list ===== */
.weeks-list{
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.week-item{
  display: grid;
  grid-template-columns: 150px 1fr; /* más espacio para detalle */
  gap: 18px;
  align-items: center;

  padding: 18px;
  border-radius: var(--card-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.week-item:hover{
  box-shadow: 0 12px 26px rgba(17,24,39,.12);
  border-color: #d1d5db;
  background: #ffffff;
}

.week-thumb{
  width: 150px;
  height: 150px;

  /* sin recorte */
  object-fit: contain;
  object-position: center;

  /* consistencia visual */
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;

  display: block;
  transition: transform .18s ease;
}

.week-item:hover .week-thumb{
  transform: scale(1.03);
}

.week-top{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.week-num{
  font-weight: 900;
  letter-spacing: .18em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* Título (texto normal y link comparten estilo) */
.week-title,
.week-title-link{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--accent-2);
}

.week-title-link{
  text-decoration: none;
  display: inline-block;
}

.week-title-link:hover{
  color: var(--accent);
  text-decoration: underline;
}

.week-desc{
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ===== About page ===== */
.about-grid{
  margin-top: 22px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
}

.about-photo img{
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  display: block;
}

.about-text p{
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 750px;
}

/* ===== Botón/link de descarga ===== */
.download-link{
  display: inline-block;
  margin-top: 10px;
  font-weight: 900;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.download-link:hover{
  color: var(--accent);
}

/* ===== Video ===== */
.card video{
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

/* ===== Footer ===== */
.footer{
  width: min(var(--max), 92vw);
  margin: 0 auto;
  padding: 22px 0 46px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .hero h1{ font-size: 38px; }
}

@media (max-width: 800px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-photo{ max-width: 260px; }
}

@media (max-width: 760px){
  .fig-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .hero h1{ font-size: 32px; }
  .brand-text{ letter-spacing: .18em; }

  .week-item{
    grid-template-columns: 110px 1fr;
    padding: 12px;
    gap: 14px;
  }

  .week-thumb{
    width: 110px;
    height: 110px;
    padding: 8px;
  }

  .week-title,
  .week-title-link{
    font-size: 18px;
  }
}

.card p{
  margin: 0 0 1rem 0;  /* ✅ espacio DESPUÉS de cada párrafo */
}

/* ===== Code blocks (inside cards or anywhere) ===== */
.code-block{
  margin: 0;                 /* el espaciado lo maneja .card * + * */
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0f172a;       /* estilo editor oscuro */
  color: #e5e7eb;
  overflow-x: auto;          /* scroll horizontal si se pasa */
  line-height: 1.55;
  font-size: 14px;
}

/* Tipografía monoespaciada solo para código */
.code-block code{
  display: block;            /* para que respete saltos */
  white-space: pre;          /* preserva espacios/indentación */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
              "Liberation Mono", "Courier New", monospace;
}

/* Asegura que no se justifique (por tus reglas de .page) */
.page .code-block,
.page .code-block code{
  text-align: left;
}

.code-block{
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}














