:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #eef3fb;
  --text: #1f2937;
  --muted: #5f6b7a;
  --line: #d9e2ef;
  --primary: #295c88;
  --primary-soft: #dcecff;
  --accent: #238775;
  --accent-soft: #ddf5ee;
  --warm: #d48a43;
  --warm-soft: #fbe9d7;
  --rose: #c4688d;
  --rose-soft: #fae6ef;
  --sky-soft: #eaf4ff;
  --mint-soft: #e9fbf4;
  --peach-soft: #fff1e6;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

header[id],
section[id] {
  scroll-margin-top: 112px;
}

body {
  margin: 0;
  font-family: "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(66, 133, 244, 0.12), transparent 0 22%),
    radial-gradient(circle at top right, rgba(35, 135, 117, 0.10), transparent 0 18%),
    radial-gradient(circle at bottom left, rgba(212, 138, 67, 0.09), transparent 0 18%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--primary);
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
}

.topbar-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem 0;
  flex-wrap: nowrap;
}

.topbar-brand {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

.topbar-nav {
  margin-left: auto;
  display: flex;
  gap: 0.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  padding: 0.25rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.topbar-nav a {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.topbar-nav a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

.section-menu {
  padding: 1rem 0 0.45rem;
}

.section-menu-scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.35rem;
  scrollbar-width: none;
}

.section-menu-scroll::-webkit-scrollbar {
  display: none;
}

.section-chip {
  flex: 0 0 auto;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 226, 239, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.section-chip:nth-child(3n + 1) {
  background: linear-gradient(180deg, #ffffff 0%, var(--sky-soft) 100%);
}

.section-chip:nth-child(3n + 2) {
  background: linear-gradient(180deg, #ffffff 0%, var(--mint-soft) 100%);
}

.section-chip:nth-child(3n) {
  background: linear-gradient(180deg, #ffffff 0%, var(--peach-soft) 100%);
}

.section-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(41, 92, 136, 0.35);
  color: var(--primary);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(41, 92, 136, 0.16), transparent 0 35%),
    radial-gradient(circle at bottom right, rgba(35, 135, 117, 0.13), transparent 0 28%),
    linear-gradient(135deg, #f8fbff 0%, #eef6ff 48%, #f2fbf7 100%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31, 78, 121, 0.3), transparent);
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: 40px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 122, 107, 0.12), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.4rem;
  align-items: start;
  padding: 2.1rem 0 1.8rem;
}

.hero-grid > div:first-child {
  max-width: 680px;
  padding-top: 0.3rem;
}

.eyebrow,
.card-label {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 1rem;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.lead,
.section-head p,
.info-card p,
.simple-card p,
.process-card p,
.list-panel p,
.hero-card p {
  color: var(--muted);
}

.lead {
  max-width: 62ch;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2c6aa0 0%, #238775 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(41, 92, 136, 0.22);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #fff8f2 100%);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.95rem;
  box-shadow: var(--shadow-soft);
}

.hero-meta li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(41, 92, 136, 0.08);
  flex: 0 0 auto;
}

.hero-card,
.info-card,
.simple-card,
.process-card,
.table-card,
.takeaways,
.list-panel,
.agenda-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

main {
  position: relative;
}

main .section:nth-child(odd) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
}

.hero-card {
  align-self: start;
  padding: 1.35rem;
  border-top: 4px solid rgba(31, 78, 121, 0.85);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, #eff6fc 100%);
}

.hero-card h2 {
  margin-bottom: 0.9rem;
}

.hero-note {
  margin-top: 0.8rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(31, 78, 121, 0.22);
}

.hero-note span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-note p {
  margin: 0;
}

.mini-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.mini-flow span {
  display: block;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.72rem 0.65rem;
  font-weight: 700;
}

.intro-strip {
  margin-top: 0;
  padding: 0.35rem 0 1rem;
}

.agenda-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.agenda-item {
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.agenda-item span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warm);
  font-weight: 700;
}

.agenda-item:nth-child(2) {
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf8 100%);
}

.agenda-item:nth-child(3) {
  background: linear-gradient(180deg, #ffffff 0%, #fff8f1 100%);
}

.agenda-item:nth-child(4) {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7ff 100%);
}

.snapshot {
  padding: 0.4rem 0 1rem;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.snapshot-card {
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 5px solid var(--primary);
  background: linear-gradient(135deg, #ffffff 0%, #eef7ff 55%, #f5fcf8 100%);
  box-shadow: var(--shadow-soft);
}

.snapshot-card h2 {
  max-width: 14ch;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

.snapshot-card p:last-child {
  margin-bottom: 0;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-self: start;
}

.stat-box {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 98px;
  padding: 0.9rem 0.7rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.stat-box:nth-child(1) {
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 100%);
}

.stat-box:nth-child(2) {
  background: linear-gradient(180deg, #ffffff 0%, #e7fbf3 100%);
}

.stat-box:nth-child(3) {
  background: linear-gradient(180deg, #ffffff 0%, #fff1e4 100%);
}

.stat-box strong {
  display: block;
  font-size: 1.95rem;
  line-height: 1;
  color: var(--primary);
}

.stat-box span {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: linear-gradient(180deg, #eef6ff 0%, #f6fbff 48%, #f0fbf7 100%);
  border-top: 1px solid rgba(217, 226, 239, 0.75);
  border-bottom: 1px solid rgba(217, 226, 239, 0.75);
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.section-head h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}

.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 74px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.process-grid,
.card-grid,
.two-col,
.summary-grid {
  display: grid;
  gap: 1rem;
}

.process-grid {
  grid-template-columns: repeat(3, 1fr);
}

.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid.two-col-grid {
  grid-template-columns: repeat(2, 1fr);
}

.components-grid {
  grid-template-columns: repeat(5, 1fr);
}

.summary-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.info-card,
.simple-card,
.process-card,
.takeaways,
.table-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.info-card::before,
.simple-card::before,
.process-card::before,
.table-card::before,
.takeaways::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.info-card:hover,
.simple-card:hover,
.process-card:hover,
.table-card:hover,
.takeaways:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.11);
}

.process-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.card-grid.three .simple-card:nth-child(1) {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}

.card-grid.three .simple-card:nth-child(2) {
  background: linear-gradient(180deg, #ffffff 0%, #ebfbf4 100%);
}

.card-grid.three .simple-card:nth-child(3) {
  background: linear-gradient(180deg, #ffffff 0%, #fff3e8 100%);
}

.card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  display: block;
  background: var(--sky-soft);
}

.list-panel > div:nth-child(1) {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}

.list-panel > div:nth-child(2) {
  background: linear-gradient(180deg, #ffffff 0%, #ebfbf4 100%);
}

.list-panel > div:nth-child(3) {
  background: linear-gradient(180deg, #ffffff 0%, #fff3e8 100%);
}

.list-panel > div:nth-child(4) {
  background: linear-gradient(180deg, #ffffff 0%, #f7efff 100%);
}

.list-panel > div:nth-child(5) {
  background: linear-gradient(180deg, #ffffff 0%, #fff7de 100%);
}

.accent-blue {
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
}

.accent-green {
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
}

.featured {
  border-color: rgba(31, 78, 121, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

.process-card:nth-child(2)::before,
.simple-card:nth-child(3n + 2)::before {
  background: linear-gradient(90deg, var(--accent), #4aa693);
}

.process-card:nth-child(3)::before,
.simple-card:nth-child(3n)::before {
  background: linear-gradient(90deg, var(--warm), #d9a465);
}

.info-card ul,
.takeaways ul,
.simple-card ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
  color: var(--muted);
}

.card-example {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.85rem;
  background: var(--surface-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.card-example strong {
  color: var(--primary);
}

/* ── LOGO SO ──────────────────────────────────────────────── */
.so-logo {
  display: block;
  width: auto;
  height: 56px;
  object-fit: contain;
  margin-bottom: 1rem;
  border-radius: 6px;
}

.simple-card li,
.info-card li,
.takeaways li {
  margin-bottom: 0.35rem;
}

.list-panel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.list-panel > div {
  background: var(--surface);
  padding: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

th,
td {
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--primary);
  font-size: 0.9rem;
}

blockquote {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--primary);
  background: var(--surface-soft);
  border-radius: 0 12px 12px 0;
  color: #3e4c5f;
}

.mini-questions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.mini-questions h4 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  color: var(--text);
}

/* ── HOME HERO ────────────────────────────────────────────── */
.home-hero {
  background: var(--primary);
  padding: 5rem 0 4rem;
  text-align: center;
}

.home-hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.home-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0.4rem 0 1rem;
}

.home-hero .lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto;
}

/* ── HOME CLASES GRID ─────────────────────────────────────── */
.home-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.home-class-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.5rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
}

.home-class-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.home-class-num {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.home-class-body {
  flex: 1;
  min-width: 0;
}

.home-class-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.25rem;
}

.home-class-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--primary);
}

.home-class-body p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.home-class-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-class-tags li {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.home-class-arrow {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--primary);
  opacity: 0.5;
  align-self: center;
  transition: opacity 0.2s, transform 0.2s;
}

.home-class-card:hover .home-class-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ── ESCRITORIO GRID ──────────────────────────────────────── */
.win-diagram {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.14);
  margin-bottom: 2.5rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.win-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

.escritorio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.1rem;
}

.escritorio-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1.5px solid var(--line);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.escritorio-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.escritorio-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.escritorio-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
  flex-shrink: 0;
}

.escritorio-icon svg {
  width: 26px;
  height: 26px;
}

/* ── TABLA RESUMEN AJUSTE 3 COLUMNAS ─────────────────────── */
.table-card table code {
  background: var(--surface-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.82rem;
  color: var(--primary);
}

/* ── NAVEGACIÓN ENTRE CLASES ──────────────────────────────── */
.class-nav {
  background: var(--primary);
  padding: 1.25rem 0;
}

.class-nav-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.class-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
  color: #fff;
  text-decoration: none;
  min-width: 200px;
}

.class-nav-link:not(.disabled):hover {
  background: rgba(255, 255, 255, 0.2);
}

.class-nav-link.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.class-nav-link.next {
  text-align: right;
  margin-left: auto;
}

.class-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.7);
}

.class-nav-title {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  margin-top: 0;
  padding: 1.6rem 0 2.5rem;
  background: linear-gradient(180deg, #1e2937 0%, #18212d 100%);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #d7e1eb;
  font-size: 0.95rem;
}

.footer-content strong {
  color: #ffffff;
}

/* ── VIDEOS ───────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 640px), 1fr));
  gap: 1.25rem;
  justify-content: center;
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.11);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── TABLET (≤ 980 px) ─────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid,
  .two-col,
  .summary-grid,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid > div:first-child {
    max-width: none;
  }

  /* 2 columnas en tablet */
  .process-grid,
  .card-grid.three,
  .agenda-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .components-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .list-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── MÓVIL (≤ 640 px) ─────────────────────────────────────── */
@media (max-width: 640px) {
  /* Topbar apilado vertical */
  .topbar-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.55rem 0;
  }

  .topbar-nav {
    width: 100%;
    margin-left: 0;
  }

  /* Más espacio para el topbar alto */
  header[id],
  section[id] {
    scroll-margin-top: 90px;
  }

  /* Grillas a 1 columna */
  .process-grid,
  .card-grid.three,
  .card-grid.two-col-grid,
  .agenda-panel,
  .two-col,
  .list-panel,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  /* Componentes: 2 por fila en móvil */
  .components-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero-grid {
    padding: 2rem 0 1.5rem;
  }

  /* Tabla con scroll horizontal */
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Secciones */
  .section {
    padding: 2.5rem 0;
  }

  .section-head {
    max-width: none;
  }

  /* Tipografía */
  h1 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  h2 {
    font-size: clamp(1.3rem, 6vw, 1.75rem);
  }

  .lead {
    font-size: 1rem;
    max-width: none;
  }

  /* Imagen de tarjetas */
  .card-img {
    height: 130px;
  }

  /* Botones */
  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Hero meta pills más chicas */
  .hero-meta li {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
  }

  /* Hero card */
  .hero-card {
    padding: 1rem;
  }

  /* Blockquote */
  blockquote {
    font-size: 0.95rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.88rem;
    text-align: center;
  }
}

/* ── MÓVIL PEQUEÑO (≤ 400 px) ─────────────────────────────── */
@media (max-width: 400px) {
  .components-grid {
    grid-template-columns: 1fr;
  }

  .topbar-brand {
    font-size: 0.82rem;
  }
}
