/*
Theme Name: Matecitos
Theme URI: https://matecitos.com/
Author: Matecitos
Author URI: https://matecitos.com/
Description: Tema ligero, accesible y orientado a actividades de Matemáticas de Primaria.
Version: 0.8.56
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: matecitos
*/

:root {
  --ink: #11213f;
  --ink-soft: #3d4a62;
  --paper: #fffdf8;
  --paper-blue: #eef8ff;
  --white: #fff;
  --line: #dbe8ef;
  --blue: #2364dc;
  --blue-dark: #174cad;
  --sky: #89d6ee;
  --yellow: #ffd84a;
  --orange: #ff813d;
  --coral: #fa615f;
  --green: #4fac78;
  --teal: #198f92;
  --violet: #8669db;
  --shadow-sm: 0 8px 22px rgba(17, 33, 63, 0.08);
  --shadow: 0 18px 48px rgba(17, 33, 63, 0.12);
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 36px;
  --wrap: min(1180px, calc(100% - 40px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-rounded, "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 4px solid rgba(35, 100, 220, 0.32);
  outline-offset: 3px;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  color: var(--white);
  background: var(--ink);
  font-weight: 800;
}

.site-wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(17, 33, 63, 0.08);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
}

.admin-bar .site-header {
  top: 32px;
  /* WordPress desplaza visualmente la cabecera bajo su barra, pero conserva
     su hueco original. Reservamos ese desplazamiento para que no tape las
     migas ni el comienzo de ninguna página mientras se está conectado. */
  margin-bottom: 32px;
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.brand .brand-logo-original {
  border-radius: 50%;
  filter: drop-shadow(0 5px 9px rgba(17, 33, 63, 0.18));
}

.brand .brand-wordmark {
  width: clamp(132px, 14vw, 176px);
  height: auto;
  border-radius: 0;
  object-fit: contain;
}

.brand-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.brand-fallback::before {
  content: "∑";
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav .menu,
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: var(--paper-blue);
  color: var(--blue-dark);
}

.header-cta,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 14px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 7px 0 var(--blue-dark);
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.header-cta {
  min-height: 42px;
  padding: 10px 15px;
  box-shadow: none;
  font-size: 0.9rem;
}

.button:hover,
.header-cta:hover {
  color: var(--white);
  background: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-2px);
}

.button:active {
  box-shadow: 0 3px 0 var(--blue-dark);
  transform: translateY(4px);
}

.button-secondary {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
  box-shadow: 0 7px 0 #cfdee7;
}

.button-secondary:hover {
  color: var(--ink);
  background: var(--paper-blue);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  background: var(--paper-blue);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 4px auto;
  border-radius: 3px;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 7vw, 92px) 0 66px;
  background:
    radial-gradient(circle at 6% 14%, rgba(255, 216, 74, 0.46) 0 76px, transparent 77px),
    radial-gradient(circle at 93% 17%, rgba(137, 214, 238, 0.6) 0 108px, transparent 109px),
    linear-gradient(180deg, #fffdf8 0%, #f4fbff 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -145px;
  width: 340px;
  height: 340px;
  border: 54px solid rgba(250, 97, 95, 0.08);
  border-radius: 50%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  align-items: center;
  gap: clamp(38px, 6vw, 76px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 4px;
  border-radius: 4px;
  background: var(--orange);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.65rem, 5.6vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--blue);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 0;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  list-style: none;
}

.hero-trust li::before {
  content: "✓";
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
}

.hero-visual {
  position: relative;
  max-width: 540px;
  justify-self: end;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.33 / 1;
  padding: 12px;
  border: 1px solid rgba(17, 33, 63, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  object-position: center;
}

.math-sticker {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 6px solid var(--white);
  border-radius: 24px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: var(--shadow-sm);
  font-size: 1.7rem;
  font-weight: 950;
  transform: rotate(-9deg);
}

.math-sticker-one {
  top: -22px;
  right: -22px;
}

.math-sticker-two {
  bottom: -18px;
  left: -24px;
  color: var(--white);
  background: var(--coral);
  transform: rotate(8deg);
}

.hero-note {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: -22px;
  display: flex;
  max-width: 245px;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-note strong {
  display: block;
  color: var(--blue-dark);
}

.hero-note-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--paper-blue);
  font-size: 1.2rem;
}

.section {
  padding: clamp(66px, 8vw, 108px) 0;
}

.section-soft {
  background: var(--paper-blue);
}

.section-coral {
  background: #fff2ec;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2,
.content-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-heading p {
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.course-card {
  --course-color: var(--orange);
  --course-bg: #fff3ed;
  position: relative;
  display: flex;
  min-height: 258px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 24px 16px 20px;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -35px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--course-bg);
}

.course-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-7px);
}

.course-card img {
  width: 98px;
  height: 98px;
  object-fit: contain;
}

.course-card .course-number {
  display: block;
  color: var(--course-color);
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1;
}

.course-card .course-name {
  display: block;
  font-size: 1.03rem;
  font-weight: 850;
}

.course-card .course-age {
  display: block;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.course-1 { --course-color: #e7523f; --course-bg: #ffe9e5; }
.course-2 { --course-color: #db5a42; --course-bg: #fff0e9; }
.course-3 { --course-color: #3b9271; --course-bg: #e3f5e9; }
.course-4 { --course-color: #068685; --course-bg: #ddf4f3; }
.course-5 { --course-color: #4a8d70; --course-bg: #e3f2e9; }

.learning-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.learning-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.learning-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
}

.learning-icon {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 22px;
  background: var(--paper-blue);
}

.learning-card:nth-child(2) .learning-icon { background: #fff7d6; }
.learning-card:nth-child(3) .learning-icon { background: #e8f7e9; }
.learning-card:nth-child(4) .learning-icon { background: #fff0ed; }

.learning-icon img {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.learning-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
}

.learning-card p {
  margin: 10px 0 16px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.text-link {
  margin-top: auto;
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

.feature-panel {
  display: grid;
  overflow: hidden;
  grid-template-columns: 0.92fr 1.08fr;
  border-radius: var(--radius-lg);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 6vw, 68px);
  color: var(--white);
}

.feature-copy .eyebrow {
  color: var(--yellow);
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.feature-copy > p {
  margin: 18px 0 0;
  color: #dfe9f7;
}

.feature-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 26px 0 30px;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.feature-list li::before {
  content: "→";
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--ink);
  background: var(--yellow);
  font-weight: 950;
}

.feature-copy .button {
  align-self: flex-start;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 7px 0 #d29e00;
}

.feature-copy .button:hover {
  background: #ffe874;
}

.feature-course-board {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: clamp(26px, 4vw, 42px);
  border: 8px solid var(--white);
  border-radius: 30px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.feature-course-board > strong {
  display: block;
  margin-bottom: 22px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.feature-course-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.feature-course-list a {
  display: grid;
  min-height: 86px;
  place-items: center;
  padding: 10px 5px;
  border-radius: 17px;
  color: var(--ink);
  background: var(--paper-blue);
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.feature-course-list a:nth-child(2) { background: #fff4c9; }
.feature-course-list a:nth-child(3) { background: #e8f7e9; }
.feature-course-list a:nth-child(4) { background: #fff0ed; }
.feature-course-list a:nth-child(5) { background: #eee9ff; }

.feature-course-list a:hover {
  transform: translateY(-4px);
}

.feature-course-list span {
  font-size: 1.45rem;
  font-weight: 950;
}

.feature-course-list small {
  font-weight: 800;
}

.feature-course-board > p {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 750;
}

.feature-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  padding: 46px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.25) 0 12%, transparent 13%),
    linear-gradient(135deg, #7fd3e8, #3aa6d8);
}

.number-board {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  padding: 28px;
  border: 8px solid var(--white);
  border-radius: 28px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  text-align: center;
  transform: rotate(-2deg);
}

.number-board > strong {
  display: block;
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-size: 1.18rem;
}

.number-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 950;
}

.number-box {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 4px solid var(--blue);
  border-radius: 15px;
  color: var(--blue-dark);
  background: var(--paper-blue);
}

.mini-points {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

.mini-point {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  color: var(--ink);
  background: #eef8ff;
  font-size: 0.78rem;
  font-weight: 850;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.activity-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.activity-grid-five .activity-art {
  min-height: 126px;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.activity-grid-five .activity-body {
  padding: 19px;
}

.activity-card:nth-child(4) .activity-art { background: #ffe6df; }
.activity-card:nth-child(5) .activity-art { background: #eee9ff; }

.activity-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.activity-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-6px);
}

.activity-art {
  display: grid;
  min-height: 148px;
  place-items: center;
  color: var(--ink);
  background: #dff3ff;
  font-size: 3.15rem;
  font-weight: 950;
}

.activity-card:nth-child(2) .activity-art { background: #fff2be; }
.activity-card:nth-child(3) .activity-art { background: #e5f5e9; }

.activity-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-tag {
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--blue-dark);
  background: var(--paper-blue);
}

.activity-card h3 {
  margin: 0;
  font-size: 1.27rem;
  line-height: 1.25;
}

.activity-card p {
  margin: 10px 0 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 6vw, 72px);
  align-items: center;
}

.trust-copy h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.trust-copy > p {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.trust-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.trust-point {
  padding: 18px;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: 18px;
  background: var(--white);
}

.trust-point strong {
  display: block;
  margin-bottom: 5px;
}

.trust-point span {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.quote-card {
  position: relative;
  padding: clamp(30px, 5vw, 50px);
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--teal);
  box-shadow: var(--shadow);
}

.quote-card::before {
  content: "“";
  position: absolute;
  top: 8px;
  right: 28px;
  color: rgba(255, 255, 255, 0.23);
  font-family: Georgia, serif;
  font-size: 8rem;
  line-height: 1;
}

.quote-card blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.5;
}

.quote-card cite {
  display: block;
  margin-top: 24px;
  color: #dff7f0;
  font-size: 0.9rem;
  font-style: normal;
}

.expert-summary {
  padding: clamp(30px, 5vw, 50px);
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(145deg, var(--teal), #167c76);
  box-shadow: var(--shadow);
}

.expert-summary strong {
  display: block;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  line-height: 1.2;
}

.expert-summary p {
  margin: 18px 0;
  color: #e5fffb;
}

.expert-summary .text-link {
  color: var(--white);
}

.expert-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.expert-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(30, 62, 92, 0.08);
}

.expert-card blockquote {
  flex: 1;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  font-weight: 650;
  line-height: 1.7;
}

.expert-card blockquote::first-letter {
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 2.3em;
  line-height: 0;
}

.expert-profile {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 33, 63, 0.1);
}

.expert-profile img {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 4px solid #e9f7f5;
  border-radius: 50%;
  object-fit: cover;
}

.expert-profile cite {
  min-width: 0;
  font-style: normal;
}

.expert-profile strong,
.expert-profile span {
  display: block;
}

.expert-profile span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.media-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(17, 33, 63, 0.09);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(30, 62, 92, 0.08);
}

.media-card > img {
  width: 100%;
  height: 104px;
  padding: 10px;
  border-radius: 18px;
  object-fit: contain;
  background: #f5f9fc;
}

.media-card-copy {
  min-width: 0;
}

.media-kicker {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.media-card-copy > p:not(.media-kicker) {
  margin: 10px 0 16px;
  color: var(--ink-soft);
}

.media-card audio {
  display: block;
  width: 100%;
  max-width: 100%;
}

.media-card .text-link {
  display: inline-block;
  margin-top: 14px;
}

.section-press {
  background: #f8fafc;
}

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.press-card {
  display: flex;
  min-width: 0;
  min-height: 164px;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: 20px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 12px 30px rgba(30, 62, 92, 0.06);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.press-card:hover,
.press-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(30, 62, 92, 0.12);
}

.press-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
}

.press-card span {
  font-size: 0.88rem;
  font-weight: 800;
}

.site-footer {
  padding: 58px 0 26px;
  color: #dce7f7;
  background: var(--ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 38px;
}

.footer-brand img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.26));
}

.footer-logo {
  display: inline-flex;
  border-radius: 50%;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.social-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease, filter 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--white);
  filter: brightness(1.12);
  transform: translateY(-3px);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.social-x {
  background: #111;
}

.social-facebook {
  background: #1877f2;
}

.social-instagram {
  background: linear-gradient(145deg, #833ab4, #fd1d1d 55%, #fcb045);
}

.social-youtube {
  background: #ff0000;
}

.footer-brand p {
  max-width: 360px;
  margin: 18px 0 0;
  color: #b8c8dd;
  font-size: 0.92rem;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-column a {
  color: #cbd8e9;
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9fb2cb;
  font-size: 0.8rem;
}

.content-shell {
  width: min(850px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.content-shell > article {
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-title {
  margin-bottom: 28px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content h2,
.entry-content h3 {
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.entry-content img {
  border-radius: 16px;
}

.empty-state {
  min-height: 55vh;
  text-align: center;
}

@media (max-width: 1080px) {
  .header-cta {
    display: none;
  }

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

  .learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-bar .site-header {
    top: 46px;
    margin-bottom: 46px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    right: 14px;
    bottom: auto;
    width: min(360px, 90vw);
    align-items: stretch;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    box-shadow: -20px 30px 55px rgba(17, 33, 63, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(105%);
    transition: transform 180ms ease, opacity 180ms ease;
    visibility: hidden;
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .primary-nav .menu,
  .primary-nav ul {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav a {
    padding: 13px 15px;
    font-size: 1rem;
  }

  .hero-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .expert-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy .eyebrow,
  .hero-actions,
  .hero-trust {
    justify-content: center;
  }

  .hero-copy > p:not(.eyebrow) {
    margin-inline: auto;
  }

  .hero-visual {
    width: min(600px, 92%);
    justify-self: center;
  }

  .feature-panel {
    grid-template-columns: 1fr;
  }

  .feature-visual {
    min-height: 440px;
  }

  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  :root {
    --wrap: min(100% - 28px, 1180px);
  }

  body {
    font-size: 16px;
  }

  .header-inner {
    min-height: 70px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand .brand-wordmark {
    width: clamp(112px, 35vw, 150px);
    height: auto;
  }

  .hero {
    padding-top: 44px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-trust {
    align-items: center;
    flex-direction: column;
  }

  .math-sticker {
    width: 64px;
    height: 64px;
    border-width: 4px;
    border-radius: 18px;
    font-size: 1.3rem;
  }

  .hero-note {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: none;
    margin: 14px 8px 0;
  }

  .course-grid,
  .learning-grid,
  .activity-grid,
  .footer-grid,
  .trust-points {
    grid-template-columns: 1fr;
  }

  .media-card {
    grid-template-columns: 1fr;
  }

  .media-card > img {
    width: 124px;
    height: 92px;
  }

  .press-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .press-card {
    min-height: 142px;
    padding: 18px;
  }

  .press-card img {
    height: 66px;
  }

  .course-card {
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 18px;
    text-align: left;
  }

  .course-card img {
    width: 74px;
    height: 74px;
  }

  .course-card-text {
    display: grid;
    gap: 4px;
  }

  .learning-card {
    min-height: 0;
  }

  .feature-copy {
    padding: 36px 26px;
  }

  .feature-copy .button {
    width: 100%;
  }

  .feature-visual {
    min-height: 350px;
    padding: 26px 18px;
  }

  .number-board {
    padding: 20px 14px;
  }

  .number-row {
    gap: 6px;
  }

  .number-box {
    width: 58px;
    height: 58px;
  }

  .mini-points {
    flex-direction: column;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Información legal y contacto */
.legal-main {
  padding-bottom: clamp(64px, 8vw, 110px);
  background:
    radial-gradient(circle at 92% 6%, rgba(255, 216, 74, 0.2) 0 130px, transparent 132px),
    linear-gradient(180deg, var(--paper-blue) 0 460px, var(--paper) 460px 100%);
}

.legal-hero {
  padding: clamp(42px, 7vw, 82px) 0 clamp(34px, 5vw, 62px);
}

.legal-hero-inner {
  max-width: 930px;
  text-align: center;
}

.legal-hero .eyebrow {
  justify-content: center;
  margin-bottom: 12px;
}

.legal-hero h1 {
  max-width: 18ch;
  margin: 0 auto 18px;
  font-size: clamp(2.45rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.legal-hero-inner > p:last-child {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 52px);
}

.legal-sidebar {
  position: sticky;
  top: 112px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.admin-bar .legal-sidebar {
  top: 144px;
}

.legal-nav-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-nav {
  display: grid;
  gap: 7px;
}

.legal-nav a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  color: var(--ink);
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  color: var(--blue-dark);
  background: var(--paper-blue);
}

.legal-nav a[aria-current="page"] {
  color: var(--white);
  background: var(--blue);
}

.legal-document {
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.legal-document > :first-child {
  margin-top: 0;
}

.legal-document h2 {
  margin: 2.2em 0 0.65em;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.legal-document h3 {
  margin: 1.8em 0 0.5em;
  color: var(--blue-dark);
  font-size: clamp(1.1rem, 2.3vw, 1.38rem);
  line-height: 1.25;
}

.legal-document p,
.legal-document li,
.legal-document dd {
  color: var(--ink-soft);
}

.legal-document p,
.legal-document ul {
  margin: 0 0 1.05em;
}

.legal-document ul {
  padding-left: 1.35em;
}

.legal-document li + li {
  margin-top: 0.5em;
}

.legal-document a {
  overflow-wrap: anywhere;
  font-weight: 750;
}

.legal-facts {
  display: grid;
  gap: 1px;
  margin: 24px 0 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.legal-facts div {
  display: grid;
  grid-template-columns: minmax(125px, 0.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 14px 18px;
  background: var(--paper-blue);
}

.legal-facts dt {
  color: var(--ink);
  font-weight: 900;
}

.legal-facts dd {
  min-width: 0;
  margin: 0;
}

.legal-contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 4vw, 30px);
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius);
  background: var(--paper-blue);
}

.legal-contact-card h2 {
  margin: 0 0 8px;
}

.legal-contact-card p {
  margin-bottom: 5px;
}

.legal-contact-icon {
  display: grid;
  place-items: center;
  width: clamp(62px, 10vw, 86px);
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 950;
  box-shadow: 0 7px 0 #d8a900;
}

.legal-contact-email {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}

@media (max-width: 820px) {
  .legal-main {
    background: linear-gradient(180deg, var(--paper-blue) 0 390px, var(--paper) 390px 100%);
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .legal-hero {
    padding-top: 34px;
  }

  .legal-nav {
    grid-template-columns: 1fr;
  }

  .legal-document {
    padding: 25px 20px;
    border-radius: 22px;
  }

  .legal-facts div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .legal-contact-card {
    grid-template-columns: 1fr;
  }
}

/* Contenidos históricos recuperados */
.learning-main {
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 216, 74, 0.16), transparent 22rem),
    linear-gradient(180deg, #f9fdff 0, var(--paper) 42rem);
}

.learning-hero {
  padding: 44px 0 56px;
}

.learning-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.learning-hero h1 {
  max-width: 920px;
  margin: 12px 0 18px;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.learning-lead {
  max-width: 800px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.learning-course-badge {
  display: grid;
  width: 148px;
  aspect-ratio: 1;
  place-content: center;
  border: 5px solid var(--white);
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(145deg, #fff36c, var(--yellow) 54%, var(--orange));
  box-shadow: 0 14px 0 #dc9c19, 0 26px 48px rgba(17, 33, 63, 0.2);
  text-align: center;
  text-decoration: none;
  transform: rotate(3deg);
}

.learning-course-badge:hover {
  color: var(--ink);
  text-decoration: none;
  transform: rotate(0) translateY(-4px);
}

.learning-course-badge span {
  font-size: 2.65rem;
  font-weight: 950;
  line-height: 1;
}

.learning-course-badge strong {
  margin-top: 5px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.learning-article {
  max-width: 980px;
  margin-bottom: 80px;
}

.learning-content {
  padding: clamp(24px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.75;
}

.learning-content .com-content-article__body > :first-child {
  margin-top: 0;
}

.learning-content .com-content-article__body > :last-child {
  margin-bottom: 0;
}

.learning-content h2,
.learning-content h3 {
  margin-top: 1.6em;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.18;
}

.learning-content h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.learning-content h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
}

.learning-content p,
.learning-content li {
  max-width: 78ch;
}

.learning-content .legacy-intro {
  color: var(--ink-soft);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.75;
}

.learning-content img,
.learning-content video,
.learning-content object,
.learning-content embed {
  max-width: 100%;
  height: auto;
}

.learning-content img {
  display: block;
  margin: 24px auto;
  border-radius: 18px;
}

.learning-content .matecitos-link-card {
  display: inline-block;
  width: calc(50% - 10px);
  margin: 5px;
  vertical-align: top;
  color: var(--ink);
  text-decoration: none;
}

.learning-content .matecitos-link-card .card {
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-blue);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.learning-content .matecitos-link-card:hover .card {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.learning-share {
  margin: 0 0 clamp(20px, 3vw, 30px);
}

.learning-share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(35, 100, 220, 0.14);
  border-radius: 16px;
  background: #f5fbff;
}

.learning-share-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.learning-share-controls {
  min-width: 0;
}

.learning-share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.learning-share-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  color: var(--white);
  box-shadow: 0 3px 0 rgba(17, 33, 63, 0.2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.learning-share-button:hover,
.learning-share-button:focus-visible {
  color: var(--white);
  filter: brightness(1.06);
  text-decoration: none;
  transform: translateY(-2px);
}

.learning-share-button:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.learning-share-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.learning-share-button.is-classroom {
  background: #137a50;
}

.learning-share-button.is-whatsapp {
  background: #0b8069;
}

.learning-share-button.is-copy {
  background: var(--blue);
}

.learning-share-button.is-copy.is-copied {
  background: var(--teal);
}

.learning-share-status {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 750;
  text-align: right;
}

.learning-share-status:empty {
  display: none;
}

@media (max-width: 580px) {
  .learning-share-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .learning-share-controls,
  .learning-share-actions {
    width: 100%;
  }

  .learning-share-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding-inline: 8px;
  }

  .learning-share-status {
    text-align: left;
  }
}

.learning-content .matecitos-link-card h2 {
  margin-top: 14px;
  font-size: 1.35rem;
}

.matecitos-resource-downloads {
  margin-top: clamp(32px, 6vw, 58px);
  padding: clamp(22px, 4vw, 36px);
  border: 2px solid #cfe4ff;
  border-radius: 26px;
  background: linear-gradient(145deg, #f5fbff, #fffaf0);
}

.matecitos-resource-downloads h2 {
  margin-top: 6px;
}

.matecitos-resource-download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}

.matecitos-resource-download {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border: 2px solid rgba(35, 100, 220, 0.18);
  border-radius: 20px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.matecitos-resource-download:hover,
.matecitos-resource-download:focus-visible {
  border-color: var(--blue);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(35, 100, 220, 0.16);
  text-decoration: none;
  transform: translateY(-3px);
}

.matecitos-resource-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--blue-dark);
  background: var(--yellow);
  box-shadow: 0 4px 0 #d99b14;
  font-size: 1.45rem;
  font-weight: 950;
}

.matecitos-resource-download strong,
.matecitos-resource-download small {
  display: block;
}

.matecitos-resource-download strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

.matecitos-resource-download small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.matecitos-resource-download em {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.matecitos-resource-tip {
  margin-bottom: 0;
  padding: 15px 18px;
  border-radius: 16px;
  background: #fff3bf;
}

@media (max-width: 700px) {
  .matecitos-resource-download-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .matecitos-resource-download {
    min-height: 96px;
  }
}

.matecitos-video {
  max-width: 820px;
  margin: clamp(28px, 5vw, 52px) auto;
}

.matecitos-video-play,
.matecitos-video iframe {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: clamp(18px, 3vw, 28px);
  overflow: hidden;
}

.matecitos-video-play {
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  padding: clamp(24px, 6vw, 60px);
  color: var(--white);
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 216, 74, 0.55), transparent 30%),
    linear-gradient(135deg, var(--blue-dark), var(--blue) 56%, #45add0);
  box-shadow: 0 14px 30px rgba(35, 100, 220, 0.24);
  cursor: pointer;
  text-align: left;
}

.matecitos-video-play:hover {
  filter: brightness(1.07);
  transform: translateY(-3px);
}

.matecitos-video-play:focus-visible {
  outline: 5px solid var(--yellow);
  outline-offset: 5px;
}

.matecitos-video-play-icon {
  display: grid;
  width: clamp(62px, 9vw, 92px);
  aspect-ratio: 1;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--blue-dark);
  background: var(--yellow);
  box-shadow: 0 8px 0 #d99b14;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
}

.matecitos-video-play-copy {
  display: grid;
  gap: 10px;
}

.matecitos-video-play-copy strong {
  color: var(--white);
  font-size: clamp(1.15rem, 3vw, 2rem);
  line-height: 1.2;
}

.matecitos-video-play-copy > span {
  width: max-content;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--white);
  background: rgba(17, 33, 63, 0.28);
  font-size: 0.82rem;
  font-weight: 850;
}

.matecitos-video figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-align: center;
}

.matecitos-legacy-embed {
  width: min(100%, 900px);
  margin: 30px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-blue);
  box-shadow: var(--shadow-sm);
}

.matecitos-legacy-embed iframe {
  display: block;
  width: 100%;
  min-height: min(760px, 82vh);
  border: 0;
}

.learning-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.learning-related-grid a {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 850;
  text-decoration: none;
}

.learning-related-grid a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-2px);
}

.learning-course-return {
  margin: 30px 0 0;
  text-align: center;
}

.learning-course-map .course-group-grid {
  margin-top: 34px;
}

.learning-course-map .course-link-list .is-current {
  margin-inline: -5px;
  border: 0;
  border-radius: 13px;
  background: #e8f1ff;
}

.learning-course-map .course-link-list .is-current a {
  padding-inline: 13px;
  color: var(--blue-dark);
  font-weight: 950;
}

.learning-course-map .course-link-list .is-current a span:last-child {
  color: var(--coral);
}

.learning-course-map .learning-course-videos {
  border-color: rgba(43, 105, 220, 0.24);
}

.learning-collection {
  padding-top: clamp(54px, 8vw, 92px);
  padding-bottom: clamp(54px, 8vw, 92px);
}

.learning-return-nav {
  padding-top: clamp(18px, 3vw, 30px);
}

.learning-return-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid rgba(43, 105, 220, 0.2);
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.learning-return-link:hover,
.learning-return-link:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-2px);
}

.learning-collection-grid {
  max-width: 1040px;
  margin: 34px auto 0;
}

.learning-collection-card {
  min-height: 178px;
  border-top: 6px solid var(--blue);
}

.learning-collection-card::before {
  content: "✏️";
  font-size: 1.55rem;
  line-height: 1;
}

.learning-game-card {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border-top: 0;
}

.learning-activity-card {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border-top: 0;
}

.learning-activity-card::before {
  display: none;
  content: none;
}

.learning-activity-poster {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 33, 63, 0.09);
  background: linear-gradient(145deg, #eaf8ff, #fff7df);
}

.learning-activity-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 180ms ease;
}

.learning-activity-card:hover .learning-activity-poster img {
  transform: scale(1.025);
}

.learning-activity-fallback {
  font-size: clamp(3rem, 8vw, 5rem);
}

.learning-activity-copy {
  display: flex;
  min-height: 142px;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.learning-activity-copy strong {
  margin: 10px 0 18px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.learning-game-card::before {
  display: none;
  content: none;
}

.learning-game-poster {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(17, 33, 63, 0.09);
  background: linear-gradient(145deg, #eaf8ff, #fff7df);
}

.learning-game-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 180ms ease;
}

.learning-game-card:hover .learning-game-poster img {
  transform: scale(1.025);
}

.learning-game-fallback {
  font-size: clamp(3rem, 8vw, 5rem);
}

.learning-game-copy {
  display: flex;
  min-height: 142px;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.learning-game-copy strong {
  margin: 10px 0 18px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.learning-subtopic-index > h2 {
  margin-bottom: 12px;
}

.learning-subtopic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 30px auto 0;
}

.learning-subtopic-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(17, 33, 63, 0.1);
  border-radius: 22px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.learning-subtopic-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-4px);
}

.learning-subtopic-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sky-soft);
}

.learning-subtopic-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
}

.learning-subtopic-type {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.learning-subtopic-copy > strong {
  margin: 9px 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
}

.learning-subtopic-copy > span:not(.learning-subtopic-type):not(.learning-subtopic-cta) {
  line-height: 1.65;
}

.learning-subtopic-cta {
  margin-top: 18px;
  color: var(--blue-dark);
  font-weight: 850;
}

@media (max-width: 720px) {
  .learning-hero {
    padding: 26px 0 40px;
  }

  .learning-hero-inner {
    grid-template-columns: 1fr;
  }

  .learning-course-badge {
    width: 112px;
    grid-row: 1;
  }

  .learning-course-badge span {
    font-size: 2.1rem;
  }

  .learning-article {
    width: calc(100% - 24px);
    margin-bottom: 52px;
  }

  .learning-content {
    padding: 22px 18px;
  }

  .learning-content .matecitos-link-card {
    width: 100%;
    margin: 7px 0;
  }

  .matecitos-video-play {
    grid-template-columns: 1fr;
    place-content: center;
    text-align: center;
  }

  .matecitos-video-play-icon,
  .matecitos-video-play-copy > span {
    justify-self: center;
  }

  .matecitos-legacy-embed iframe {
    min-height: 68vh;
  }

  .learning-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Videoteca oficial */
.video-library-main {
  background: linear-gradient(180deg, #f5fbff 0, var(--paper) 34rem);
}

.video-library-hero {
  padding: clamp(42px, 7vw, 88px) 0 clamp(52px, 8vw, 96px);
  text-align: center;
}

.video-library-hero h1 {
  max-width: 920px;
  margin: 14px auto 20px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.video-library-hero > .site-wrap > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.6vw, 1.24rem);
}

.video-course-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.video-course-jump a {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 850;
  text-decoration: none;
}

.video-course-jump a:hover {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
  text-decoration: none;
}

.video-course-section {
  scroll-margin-top: 100px;
}

.video-course-section:nth-of-type(even) {
  background: var(--paper-blue);
}

.video-course-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.video-course-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.video-course-heading > a,
.video-explanation-link {
  color: var(--blue-dark);
  font-weight: 850;
}

.video-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.video-library-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.video-library-card .matecitos-video-play,
.video-library-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.video-library-card .matecitos-video-play {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
}

.video-library-card .matecitos-video-play-icon {
  width: 52px;
  font-size: 1.35rem;
  box-shadow: 0 5px 0 #d99b14;
}

.video-library-card .matecitos-video-play-copy {
  gap: 8px;
}

.video-library-card .matecitos-video-play-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-library-card .matecitos-video-play-copy > span {
  font-size: 0.7rem;
}

.video-explanation-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--white);
  font-size: 0.82rem;
  text-decoration: none;
}

.video-explanation-link:hover {
  color: var(--white);
  background: var(--blue-dark);
  text-decoration: none;
}

@media (max-width: 900px) {
  .video-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .video-course-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-library-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Course hubs ------------------------------------------------------------ */

.course-main {
  background: var(--paper);
}

.course-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 22px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 750;
}

.course-breadcrumbs a {
  color: var(--blue-dark);
  text-decoration: none;
}

.course-hero {
  --course-accent: var(--coral);
  --course-soft: #fff0ed;
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px) 0 clamp(60px, 8vw, 98px);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--course-accent) 18%, transparent) 0 120px, transparent 121px),
    linear-gradient(180deg, var(--paper) 0%, var(--course-soft) 100%);
}

.course-theme-1 { --course-accent: #e7523f; --course-soft: #fff0ec; }
.course-theme-2 { --course-accent: #db5a42; --course-soft: #fff4eb; }
.course-theme-3 { --course-accent: #3b9271; --course-soft: #eaf8ef; }
.course-theme-4 { --course-accent: #068685; --course-soft: #e6f8f7; }
.course-theme-5 { --course-accent: #4a8d70; --course-soft: #eaf6ee; }

.course-theme-3,
.course-theme-4 {
  background:
    linear-gradient(180deg, rgba(246, 255, 249, 0.94) 0%, rgba(230, 248, 239, 0.96) 100%),
    url("assets/images/courses/fondo-3-4.jpg") center / cover;
}

.course-theme-5 {
  background:
    radial-gradient(circle at 88% 20%, rgba(93, 161, 132, 0.18) 0 140px, transparent 141px),
    linear-gradient(180deg, #f9fcff 0%, var(--course-soft) 100%);
}

.course-hero-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  border: 7px solid var(--white);
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.course-hero-scene::after {
  content: none;
}

.course-hero-scene img {
  display: block;
  width: 100%;
  height: auto;
}

.course-hero-scene figcaption {
  position: static;
  z-index: 1;
  order: -1;
  align-self: flex-start;
  display: grid;
  gap: 2px;
  max-width: min(520px, calc(100% - 36px));
  margin: 12px 12px 9px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  color: var(--white);
  background: rgba(17, 33, 63, 0.7);
  backdrop-filter: blur(8px);
}

.course-hero-scene figcaption span {
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.course-hero-scene figcaption strong {
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.course-scene-1-2 {
  border-color: #fff4d6;
}

.course-scene-3-4 {
  border-color: #dff4e8;
}

.course-scene-5 {
  border-color: #e4f0ea;
}

.course-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.75fr);
  align-items: center;
  gap: clamp(38px, 8vw, 100px);
  padding-top: clamp(38px, 6vw, 72px);
}

.course-hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.course-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
}

.course-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.course-hero-card {
  position: relative;
  display: flex;
  width: min(330px, 100%);
  min-height: 350px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: end;
  overflow: hidden;
  padding: 34px;
  border: 9px solid var(--white);
  border-radius: 40px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  transform: rotate(2deg);
}

.course-hero-card::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -45px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--course-accent);
  opacity: 0.13;
}

.course-hero-card img {
  width: 116px;
  height: 116px;
  margin-bottom: 18px;
  object-fit: contain;
}

.course-hero-number {
  color: var(--course-accent);
  font-size: 3.5rem;
  font-weight: 950;
  line-height: 0.95;
}

.course-hero-card strong {
  margin-top: 8px;
  font-size: 1.35rem;
}

.course-hero-card > span:last-child {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 750;
}

.course-route-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 100px);
}

.course-route-copy h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 3.65rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.course-route-copy > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.course-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: course-topic;
}

.course-topic-list li {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 850;
}

.course-topic-list li a {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  color: var(--ink);
  text-decoration: none;
}

.course-topic-list li a:hover {
  color: var(--blue-dark);
}

.course-topic-list li span {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--blue);
  font-size: 1.08rem;
  font-weight: 950;
}

.course-format-nav {
  padding: 22px 0;
  border-block: 1px solid var(--line);
  background: var(--white);
}

.course-format-nav p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.course-format-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.course-format-links a {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.course-format-links a:hover {
  border-color: var(--course-accent, var(--blue));
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.course-format-links strong {
  font-size: 0.96rem;
}

.course-format-links span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.course-curriculum {
  scroll-margin-top: 90px;
}

.curriculum-grid {
  display: grid;
  gap: 28px;
}

.curriculum-card {
  scroll-margin-top: 100px;
  overflow: hidden;
  border: 1px solid rgba(17, 33, 63, 0.09);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.curriculum-card > header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.curriculum-card > header > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--course-accent, var(--blue));
  font-weight: 950;
}

.curriculum-card h3 {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.48rem);
}

.curriculum-card header p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.curriculum-card > header > small {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--paper-blue);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.curriculum-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 18px;
  background: #f7fbfd;
}

.curriculum-format {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.curriculum-format-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.curriculum-format-heading > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.82rem;
  font-weight: 950;
}

.curriculum-format-actividades .curriculum-format-heading > span {
  background: #dff3ff;
}

.curriculum-format-juegos .curriculum-format-heading > span {
  background: #dff4e6;
}

.curriculum-format-series .curriculum-format-heading > span {
  background: #f0e9ff;
}

.curriculum-format-recursos .curriculum-format-heading > span {
  background: #ffe7dd;
}

.curriculum-format h4 {
  margin: 0;
  font-size: 0.92rem;
}

.curriculum-format-heading p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.69rem;
}

.curriculum-link-list {
  display: grid;
  padding: 4px 12px 10px;
  margin: 0;
  list-style: none;
}

.curriculum-link-list li + li {
  border-top: 1px solid #edf2f5;
}

.curriculum-link-list a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
  text-decoration: none;
}

.curriculum-link-list a:hover {
  color: var(--blue-dark);
}

.curriculum-link-list small {
  display: inline-block;
  margin: 5px 0 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: #694600;
  background: #fff1b9;
  font-size: 0.61rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.curriculum-empty {
  margin: 0;
  padding: 22px 24px;
  color: var(--ink-soft);
}

.course-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.course-group-card {
  overflow: hidden;
  border: 1px solid rgba(17, 33, 63, 0.09);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.course-group-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.course-group-heading h3 {
  margin: 0;
  font-size: 1.35rem;
}

.course-group-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--white);
  background: var(--blue);
  font-weight: 950;
}

.course-link-list {
  display: grid;
  padding: 8px 18px 18px;
  margin: 0;
  list-style: none;
}

.course-link-list li + li {
  border-top: 1px solid #edf2f5;
}

.course-link-list a {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 6px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 720;
  text-decoration: none;
}

.course-link-list a span:last-child {
  color: var(--blue);
  font-weight: 950;
  transition: transform 160ms ease;
}

.course-link-list a:hover {
  color: var(--blue-dark);
}

.course-link-list a:hover span:last-child {
  transform: translateX(4px);
}

.course-link-featured {
  margin: 8px -5px;
  border: 0 !important;
  border-radius: 13px;
  background: var(--paper-blue);
}

.course-link-featured a {
  padding-inline: 13px;
  color: var(--blue-dark);
  font-weight: 900;
}

.course-story-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 8vw, 96px);
  padding: clamp(34px, 6vw, 72px);
  border-radius: var(--radius-lg);
  background: #fff5c9;
}

.course-story-3-4 .course-story-panel {
  background: #e9f6ed;
}

.course-story-5 .course-story-panel {
  background: #eaf3ef;
}

.course-story-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.course-story-copy > p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.course-story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.course-story-actions .button {
  margin: 0;
}

.course-character-grid {
  display: grid;
  gap: 14px;
}

.course-character-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 136px;
  padding: 13px 18px 13px 13px;
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.course-character-portrait {
  display: grid;
  width: 118px;
  height: 108px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
}

.course-character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.course-character-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.17rem;
}

.course-character-card p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Galerías de personajes por etapa */
.characters-main {
  overflow: clip;
}

.characters-hero {
  padding: 24px 0 clamp(54px, 8vw, 92px);
}

.characters-stage-1-2 .characters-hero {
  background: linear-gradient(180deg, #e7fbff 0%, #fff9d7 100%);
}

.characters-stage-3-4 .characters-hero {
  background:
    linear-gradient(180deg, rgba(234, 248, 239, 0.92), rgba(247, 251, 241, 0.98)),
    url("assets/images/courses/fondo-3-4.jpg") center / 560px auto;
}

.characters-stage-5 .characters-hero {
  background: linear-gradient(180deg, #e7f3ee 0%, #f8f6e8 100%);
}

.characters-hero-scene {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 6px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.characters-hero-scene img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 190px;
  object-fit: cover;
}

.characters-hero-copy {
  width: min(900px, calc(100% - 40px));
  margin: clamp(-32px, -4vw, -20px) auto 0;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(17, 33, 63, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.characters-hero-copy .eyebrow {
  justify-content: center;
}

.characters-hero-copy h1 {
  max-width: 820px;
  margin: 8px auto 0;
  font-size: clamp(2.35rem, 5.4vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.characters-hero-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.characters-course-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.characters-library {
  background: var(--paper);
}

.characters-intro-video {
  border-top: 1px solid rgba(17, 33, 63, 0.08);
  border-bottom: 1px solid rgba(17, 33, 63, 0.08);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 216, 74, 0.28), transparent 24%),
    linear-gradient(180deg, #eef8ff, #e8f8fb);
}

.characters-intro-video .matecitos-video {
  margin-bottom: 0;
}

.characters-intro-video .matecitos-video-play.has-poster {
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #22bfd7, #64d6e6 50%, #168aa2);
}

.characters-intro-video .matecitos-video-poster {
  object-fit: contain;
}

.characters-heading {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}

.characters-heading .eyebrow {
  justify-content: center;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(18px, 2.6vw, 30px);
  margin-top: 42px;
}

.character-profile-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 110px;
}

.character-profile-image {
  display: grid;
  min-height: 270px;
  place-items: center;
  overflow: hidden;
  background: #f1f8fb;
}

.characters-stage-1-2 .character-profile-image {
  background: linear-gradient(145deg, #fff8d8, #eaf9fc);
}

.characters-stage-3-4 .character-profile-image {
  background: linear-gradient(145deg, #eaf6ed, #dce8dd);
}

.characters-stage-5 .character-profile-image {
  background: linear-gradient(145deg, #17293d, #314a55);
}

.character-profile-image img {
  width: 100%;
  height: 270px;
  object-fit: contain;
  transition: transform 220ms ease;
}

.character-profile-card:hover .character-profile-image img {
  transform: scale(1.035);
}

.character-profile-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.character-role {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.075em;
}

.character-profile-copy h2 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  line-height: 1;
}

.character-profile-copy > p:not(.character-role) {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.65;
}

.character-place {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.character-place > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--orange);
  font-size: 1.15rem;
  font-weight: 950;
}

.character-place p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.4;
}

.character-place strong {
  color: var(--ink);
}

.character-stage-switcher {
  padding: 40px 0 54px;
  border-top: 1px solid var(--line);
  background: var(--paper-blue);
}

.character-stage-switcher > .site-wrap > p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-weight: 850;
  text-align: center;
}

.course-switcher {
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  background: var(--paper-blue);
}

.course-switcher p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.course-switcher-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.course-switcher-links a {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--white);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.course-switcher-links a:hover,
.course-switcher-links .is-current {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
}

.content-hub-main {
  background: var(--paper);
}

.content-hub-hero {
  padding: clamp(42px, 7vw, 88px) 0;
  background: linear-gradient(135deg, #eef8ff, #fff8dc);
}

.content-hub-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(30px, 7vw, 90px);
}

.content-hub-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.content-hub-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.content-hub-hero-mark {
  display: grid;
  width: 210px;
  height: 210px;
  place-items: center;
  border: 8px solid var(--white);
  border-radius: 54px;
  background: var(--yellow);
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}

.content-hub-hero-mark img {
  width: 126px;
  max-height: 126px;
  object-fit: contain;
}

.content-hub-hero-mark strong {
  font-size: 2.7rem;
  font-weight: 950;
}

.hub-course-nav {
  position: sticky;
  z-index: 20;
  top: 78px;
  padding: 15px 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.hub-course-nav .site-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hub-course-nav p {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
}

.hub-course-nav-links {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
}

.hub-course-nav-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.hub-course-nav-links a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.hub-course-nav-links span {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 99px;
  color: var(--white);
  background: var(--blue);
  font-size: 0.7rem;
}

.hub-course-section {
  scroll-margin-top: 150px;
}

.hub-course-section:nth-of-type(even) {
  background: var(--paper-blue);
}

.hub-course-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.hub-course-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hub-course-identity img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.hub-course-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hub-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hub-item-card {
  display: flex;
  min-height: 154px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(17, 33, 63, 0.09);
  border-radius: 19px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hub-item-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-4px);
}

.hub-item-topic {
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hub-item-card strong {
  margin: 10px 0 18px;
  font-size: 1.06rem;
  line-height: 1.3;
}

.hub-item-cta {
  margin-top: auto;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

@media (max-width: 900px) {
	.activity-grid-five,
	.hub-item-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.course-format-links {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.curriculum-grid {
		grid-template-columns: 1fr;
	}

	.course-topic-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.content-hub-hero-grid {
		grid-template-columns: minmax(0, 1fr) 150px;
	}

	.content-hub-hero-mark {
		width: 145px;
		height: 145px;
		border-radius: 38px;
	}

	.content-hub-hero-mark img {
		width: 92px;
		max-height: 92px;
	}

  .course-hero-grid,
  .course-route-grid,
  .course-story-panel {
    grid-template-columns: 1fr;
  }

  .course-hero-copy {
    text-align: center;
  }

  .course-hero-copy .eyebrow,
  .course-hero-actions {
    justify-content: center;
  }

  .course-lead {
    margin-inline: auto;
  }

  .course-hero-card {
    width: min(360px, 100%);
    min-height: 300px;
    justify-self: center;
    transform: rotate(0);
  }

  .course-story-panel {
    grid-template-columns: 1fr;
  }

  .characters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
	.course-topic-list {
		grid-template-columns: 1fr;
	}

	.curriculum-card > header {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.curriculum-card > header > small {
		flex: 1 0 calc(100% - 59px);
		margin-left: 59px;
		text-align: center;
	}

	.curriculum-format-grid {
		grid-template-columns: 1fr;
		padding: 12px;
	}

	.feature-course-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.feature-course-list a:last-child {
		grid-column: 1 / -1;
	}

	.activity-grid-five,
	.hub-item-grid,
	.course-format-links {
		grid-template-columns: 1fr;
	}

	.content-hub-hero-grid {
		grid-template-columns: 1fr;
	}

	.content-hub-hero-mark {
		display: none;
	}

	.hub-course-nav {
		position: static;
	}

	.hub-course-nav .site-wrap,
	.hub-course-heading,
	.hub-course-identity {
		align-items: stretch;
		flex-direction: column;
	}

	.hub-course-nav-links {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hub-course-nav-links a {
		justify-content: space-between;
	}

	.hub-course-heading .button {
		width: 100%;
	}

	.hub-course-identity img {
		width: 68px;
		height: 68px;
	}

	.curriculum-card > header {
		padding: 18px;
	}

  .course-breadcrumbs {
    padding-top: 16px;
  }

  .course-hero {
    padding-top: 18px;
  }

  .course-hero-scene {
    border-width: 4px;
    border-radius: 20px;
  }

  .course-hero-scene img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .course-scene-1-2 img {
    object-position: center;
  }

  .course-hero-scene figcaption {
    align-self: flex-start;
    max-width: calc(100% - 16px);
    margin: 8px 8px 6px;
    padding: 10px 12px;
  }

  .course-hero-copy h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .course-hero-actions {
    flex-direction: column;
  }

  .course-hero-actions .button {
    width: 100%;
  }

  .course-hero-card {
    min-height: 265px;
  }

  .course-group-grid {
    grid-template-columns: 1fr;
  }

  .course-story-panel {
    padding: 26px 20px;
  }

  .course-character-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 13px;
    min-height: 112px;
    padding: 10px 12px 10px 10px;
  }

  .course-character-portrait {
    width: 88px;
    height: 88px;
  }

  .course-story-actions {
    flex-direction: column;
  }

  .course-story-actions .button,
  .characters-course-links .button {
    width: 100%;
  }

  .characters-hero {
    padding-top: 16px;
  }

  .characters-hero-scene {
    border-width: 4px;
    border-radius: 20px;
  }

  .characters-hero-scene img {
    height: 190px;
    min-height: 0;
  }

  .characters-hero-copy {
    width: calc(100% - 24px);
    margin-top: -18px;
    padding: 28px 20px;
    border-radius: 22px;
  }

  .characters-hero-copy h1 {
    font-size: clamp(2.15rem, 10.5vw, 3.2rem);
  }

  .characters-course-links {
    flex-direction: column;
  }

  .characters-grid {
    grid-template-columns: 1fr;
  }

  .character-profile-image,
  .character-profile-image img {
    height: 245px;
    min-height: 245px;
  }
}

/* Navegación por curso, portadas originales y enlaces temáticos (0.7.0). */
.primary-nav > .menu > .menu-item {
  position: relative;
}

.primary-nav .menu-item-row {
  display: flex;
  align-items: center;
}

.primary-nav .menu-item-row > a {
  padding-right: 5px;
}

.primary-nav .submenu-toggle {
  display: grid;
  width: 30px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.primary-nav .submenu-toggle:hover,
.primary-nav .submenu-toggle[aria-expanded="true"] {
  color: var(--blue-dark);
  background: var(--paper-blue);
}

.primary-nav .submenu-chevron {
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.primary-nav .submenu-toggle[aria-expanded="true"] > .submenu-chevron {
  transform: translateY(2px) rotate(225deg);
}

.primary-nav .sub-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% - 1px);
  left: 50%;
  display: grid;
  width: 230px;
  align-items: stretch;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  visibility: hidden;
}

.primary-nav .sub-menu a {
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu,
.primary-nav .menu-item-has-children.is-submenu-open > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.matecitos-video-play-layer {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.matecitos-video-play.has-poster {
  position: relative;
  display: block;
  aspect-ratio: 6 / 5;
  padding: 0;
  background: var(--white);
}

.matecitos-video-poster {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border-radius: inherit !important;
  object-fit: contain;
}

.matecitos-video-play.has-poster .matecitos-video-play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: linear-gradient(180deg, transparent 55%, rgba(17, 33, 63, 0.42));
}

.matecitos-video-play.has-poster .matecitos-video-play-icon {
  width: clamp(54px, 8vw, 78px);
  box-shadow: 0 6px 0 #d99b14, 0 10px 28px rgba(17, 33, 63, 0.25);
}

.matecitos-video-play.has-poster .matecitos-video-play-copy {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.matecitos-video-play.has-poster .matecitos-video-play-copy strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.matecitos-video-play.has-poster .matecitos-video-play-copy > span {
  background: rgba(17, 33, 63, 0.82);
}

.learning-content #explications {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 30px);
  margin: 30px 0;
}

.learning-content #explications .matecitos-video {
  width: 100%;
  margin: 0;
}

.number-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0 12px;
}

.number-sequence span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #e9aa13;
  border-radius: 15px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 4px 0 #d99b14;
  font-size: 1.2rem;
  font-weight: 950;
}

.teacher-tip {
  margin-top: 38px;
  padding: clamp(20px, 4vw, 32px);
  border: 2px solid #b7e6ce;
  border-radius: 22px;
  background: #effbf5;
}

.teacher-tip h2 {
  margin-top: 0;
}

.learning-topic-links {
  background: #f2f9ff;
}

.learning-topic-grid {
  display: grid;
  max-width: 1040px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0 auto;
  list-style: none;
}

.learning-topic-grid a {
  display: flex;
  min-height: 170px;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.learning-topic-grid a:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
  transform: translateY(-3px);
}

/* Juegos y actividades heredadas recuperadas (0.7.1). */
.matecitos-interactive-card {
  grid-column: 1 / -1;
  width: min(820px, 100%);
  margin: clamp(24px, 5vw, 48px) auto;
}

.matecitos-interactive-launch {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 260px;
  padding: 0;
  overflow: hidden;
  font: inherit;
  color: var(--white);
  text-align: inherit;
  text-decoration: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 216, 74, 0.92), transparent 24%),
    linear-gradient(135deg, var(--blue), var(--violet));
  border: 6px solid var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  isolation: isolate;
}

.matecitos-interactive-launch > img {
  width: 100%;
  height: auto;
  min-height: 260px;
  max-height: 520px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.matecitos-interactive-launch:hover > img,
.matecitos-interactive-launch:focus-visible > img {
  transform: scale(1.025);
}

.matecitos-interactive-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: clamp(24px, 6vw, 56px);
  text-align: center;
  background: linear-gradient(180deg, rgba(17, 33, 63, 0.08), rgba(17, 33, 63, 0.88));
}

.matecitos-interactive-card.has-poster .matecitos-interactive-overlay {
  position: absolute;
  inset: 0;
  justify-content: flex-end;
}

.matecitos-interactive-type {
  padding: 6px 12px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  border-radius: 999px;
}

.matecitos-interactive-overlay strong {
  max-width: 28ch;
  color: inherit;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.15;
}

.matecitos-interactive-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  color: var(--ink);
  font-weight: 900;
  background: var(--white);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.matecitos-interactive-symbol {
  align-self: center;
  justify-self: center;
  font-size: clamp(4.5rem, 13vw, 8rem);
}

.matecitos-interactive-card figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
}

body.matecitos-player-open {
  overflow: hidden;
}

.matecitos-player[hidden] {
  display: none;
}

.matecitos-player {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  color: var(--white);
  background: #0f1f3c;
}

.matecitos-player-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.matecitos-player-heading {
  min-width: 0;
}

.matecitos-player-brand {
  display: block;
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matecitos-player-title {
  display: block;
  overflow: hidden;
  color: var(--white);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matecitos-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.matecitos-player-return {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: min(42vw, 390px);
  padding: 9px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 850;
  text-decoration: none;
}

.matecitos-player-return:hover,
.matecitos-player-return:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
  text-decoration: none;
}

.matecitos-player-return-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matecitos-player-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 17px;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  background: var(--yellow);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 #c99200;
}

.matecitos-player-frame-wrap {
  position: relative;
  min-height: 0;
  background: var(--white);
}

.matecitos-player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
  text-align: center;
  background: var(--paper-blue);
}

.matecitos-player.is-loaded .matecitos-player-loading {
  display: none;
}

.matecitos-player-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}

@media (max-width: 600px) {
  .matecitos-interactive-launch,
  .matecitos-interactive-launch > img {
    min-height: 220px;
  }

  .matecitos-interactive-launch {
    border-width: 4px;
    border-radius: 20px;
  }

  .matecitos-interactive-overlay {
    padding: 20px;
  }

  .matecitos-player-toolbar {
	display: flex;
	justify-content: flex-end;
    min-height: 58px;
    padding: 7px 9px 7px 12px;
  }

	.matecitos-player-heading {
		display: none;
	}

	.matecitos-player-actions {
		width: 100%;
		justify-content: space-between;
	}

	.matecitos-player-return {
		max-width: calc(100vw - 74px);
		padding-inline: 12px;
		font-size: 0.78rem;
	}

  .matecitos-player-brand {
    font-size: 0.68rem;
  }

  .matecitos-player-close {
    width: 44px;
    min-width: 44px;
    padding: 8px;
    border-radius: 50%;
  }

  .matecitos-player-close-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.learning-topic-grid a > span:last-child {
  margin-top: auto;
  color: var(--blue-dark);
  font-weight: 850;
}

.learning-topic-group {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--paper-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .primary-nav > .menu > .menu-item {
    width: 100%;
  }

  .primary-nav .menu-item-row {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .primary-nav .menu-item-row > a {
    padding-right: 10px;
  }

  .primary-nav .submenu-toggle {
    width: 46px;
    height: 46px;
  }

  .primary-nav .sub-menu {
    position: static;
    display: none;
    width: calc(100% - 12px);
    gap: 2px;
    margin: 4px 0 10px 12px;
    padding: 7px;
    border-radius: 13px;
    background: #f7fbff;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .primary-nav .menu-item-has-children:hover > .sub-menu,
  .primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: none;
    transform: none;
  }

  .primary-nav .menu-item-has-children.is-submenu-open > .sub-menu {
    display: grid;
    transform: none;
  }

  .learning-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .learning-content #explications,
  .learning-topic-grid {
    grid-template-columns: 1fr;
  }

  .matecitos-video-play.has-poster .matecitos-video-play-copy {
    display: none;
  }
}

/* Lecciones paso a paso recuperadas de las explicaciones originales. */
.learning-content .matecitos-guided-lesson {
  display: grid;
  gap: clamp(28px, 5vw, 58px);
}

.learning-content .matecitos-guided-lesson .lesson-intro {
  margin: 0;
  padding: clamp(20px, 4vw, 32px);
  border-left: 7px solid var(--orange);
  border-radius: 18px;
  background: #fff8de;
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.learning-content .lesson-section {
  margin: 0;
}

.learning-content .lesson-section > h2 {
  margin-top: 0;
  margin-bottom: 18px;
}

.learning-content .lesson-key-idea,
.learning-content .lesson-example,
.learning-content .lesson-summary {
  padding: clamp(20px, 4vw, 32px);
  border: 2px solid #cfe3f2;
  border-radius: 22px;
  background: var(--paper-blue);
}

.learning-content .lesson-key-idea h3 {
  margin-top: 0;
}

.learning-content .lesson-steps,
.learning-content .lesson-error-list,
.learning-content .lesson-summary ol {
  display: grid;
  gap: 14px;
  margin: 20px 0;
  padding-left: 28px;
}

.learning-content .lesson-steps li,
.learning-content .lesson-error-list li,
.learning-content .lesson-summary li {
  padding-left: 6px;
}

.learning-content .lesson-result,
.learning-content .lesson-equation {
  margin: 24px auto;
  color: var(--blue-dark);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.learning-content .lesson-figure {
  max-width: 920px;
  margin: 28px auto 0;
}

.learning-content .lesson-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
  margin-top: 28px;
}

.learning-content .lesson-figure-grid .lesson-figure {
  align-self: start;
  margin: 0;
}

.learning-content .lesson-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 7px solid #fff1bb;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.learning-content .lesson-figure figcaption {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
  text-align: center;
}

.learning-content .lesson-summary {
  border-color: #bfe5cc;
  background: #eefaf2;
}

.learning-content .lesson-practice-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.learning-content .lesson-practice-links a {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.learning-content .lesson-practice-links a:hover,
.learning-content .lesson-practice-links a:focus-visible {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.learning-content .lesson-practice-links strong {
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.learning-content .lesson-practice-links span {
  color: var(--ink-soft);
}

.social-follow-rail {
  position: fixed;
  z-index: 70;
  right: 14px;
  bottom: 18px;
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 12px 10px;
  border: 1px solid rgba(17, 33, 63, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 35px rgba(17, 33, 63, 0.18);
  backdrop-filter: blur(10px);
}

.social-follow-title {
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.social-follow-link {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 6px 14px rgba(17, 33, 63, 0.15);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.social-follow-link:hover,
.social-follow-link:focus-visible {
  color: #fff;
  box-shadow: 0 9px 20px rgba(17, 33, 63, 0.24);
  transform: translateX(-4px) scale(1.04);
}

.social-follow-link svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

@media (max-width: 650px) {
  .learning-hero h1 {
    font-size: 2.05rem;
    letter-spacing: -0.04em;
  }

  .learning-content .matecitos-guided-lesson {
    gap: 34px;
  }

  .learning-content .lesson-practice-links {
    grid-template-columns: 1fr;
  }

  .learning-content .lesson-figure img {
    border-width: 4px;
    border-radius: 16px;
  }

  .learning-content .lesson-figure-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .social-follow-rail {
    position: static;
    display: flex;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 28px auto 18px;
    padding: 10px 14px;
    transform: none;
  }

  .social-follow-title {
    margin-right: 2px;
  }

  .social-follow-link {
    width: 42px;
    height: 42px;
  }

  .social-follow-link:hover,
  .social-follow-link:focus-visible {
    transform: translateY(-2px) scale(1.03);
  }
}


