@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --esc-accent: #0ea5a4;
  --esc-accent-soft: #f0fdfa;
  --esc-accent-ink: #0f766e;
  --esc-accent-rgb: 14, 165, 164;
  --esc-ink: #111827;
  --esc-muted: #64748b;
  --esc-line: #e2e8f0;
  --esc-bg: #f8fafc;
  --esc-max: 1160px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif;
  color: var(--esc-ink);
  background: #fff;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--esc-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--esc-accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 2.15rem; margin: 0 0 .6rem; }
h2 { font-size: 1.4rem; }
.sr-only,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.wrap { width: min(var(--esc-max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid var(--esc-line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: stretch;
  min-height: 76px;
}
.logo,
.site-search,
.nav-toggle { align-self: center; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--esc-ink); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.logo .mark { width: 22px; height: 22px; border-radius: 6px; background: var(--esc-accent); }
.site-search { display: flex; border: 1px solid var(--esc-line); border-radius: 999px; overflow: hidden; background: var(--esc-bg); }
.site-search input { border: 0; background: transparent; padding: 10px 16px; width: 100%; min-width: 160px; font: inherit; }
.site-search button { border: 0; background: var(--esc-accent); color: #fff; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle { display: none; }
.nav { align-self: stretch; display: flex; }
body.search { display: block; }

.nav-root { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; align-items: stretch; height: 100%; }
.nav-root > li { display: flex; align-items: center; }
.nav-root > li > a,
.mega-trigger {
  color: var(--esc-ink);
  font-weight: 600;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.mega-trigger { display: inline-flex; align-items: center; gap: 6px; }
.mega-chevron { display: block; flex: 0 0 auto; transition: transform .15s ease; }
.mega-trigger[aria-expanded="true"] .mega-chevron { transform: rotate(180deg); }
.nav-root > li > a:hover,
.mega-trigger:hover,
.mega-trigger[aria-expanded="true"] { background: var(--esc-bg); text-decoration: none; }
.has-mega { position: relative; }
.mega {
  position: absolute;
  right: 0;
  top: 100%;
  width: min(820px, 90vw);
  background: #fff;
  border: 1px solid var(--esc-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
  padding: 20px 20px 12px;
  z-index: 40;
}
.mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
}
.mega-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.mega-label { margin: 0 0 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--esc-muted); font-weight: 700; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; color: var(--esc-ink); font-weight: 550; }
.mega a span { color: var(--esc-muted); font-weight: 500; font-size: .85rem; }
.mega-foot { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--esc-line); font-weight: 700; }

.crumb { font-size: .9rem; color: var(--esc-muted); margin: 22px 0 10px; }
.crumb span { margin: 0 6px; color: #cbd5e1; }
.kicker { text-transform: uppercase; letter-spacing: .12em; color: var(--esc-accent); font-size: .75rem; font-weight: 700; margin: 0 0 8px; }
.hero { background: linear-gradient(180deg, var(--esc-accent-soft) 0%, #fff 100%); padding: 56px 0 40px; }
.lead { color: var(--esc-muted); max-width: 54ch; }
.hero-search { max-width: 560px; margin-top: 18px; }
.search-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.search-chips-label { font-size: .85rem; color: var(--esc-muted); }

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 40px; }
.grade-grid { grid-template-columns: repeat(4, 1fr); }
.type-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--esc-line); border-radius: 14px; color: inherit; background: #fff; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.type-card:hover { border-color: var(--esc-accent); text-decoration: none; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.type-card span { color: var(--esc-muted); font-size: .9rem; }

.rail { margin: 8px auto 28px; }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 8px 0 4px; }
.rail-more { font-weight: 700; white-space: nowrap; }
.tema-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 40px; }
.tema-pills .chip span { margin-left: 6px; opacity: .7; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 18px 0 28px; }
.card { border: 1px solid var(--esc-line); border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.card:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, .1); transform: translateY(-3px); }
.card a { color: inherit; text-decoration: none; display: block; }
.card-text a { padding: 16px 16px 18px; min-height: 132px; }
.card h3 { font-size: 1.02rem; margin: 10px 0 8px; letter-spacing: -.01em; }
.card .tag { display: inline-block; font-size: .72rem; color: var(--esc-accent-ink); background: var(--esc-accent-soft); border-radius: 999px; padding: 3px 9px; font-weight: 700; }
.card-meta { display: block; font-size: .82rem; color: var(--esc-muted); }

.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { background: var(--esc-accent-soft); color: var(--esc-accent-ink); border-radius: 999px; padding: 4px 10px; font-size: .82rem; font-weight: 600; }
.chip:hover { text-decoration: none; }

.nivel-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.nivel-label { font-size: .88rem; color: var(--esc-muted); font-weight: 600; }
.nivel-filter .chip { border: 1px solid transparent; }
.nivel-filter .chip:hover { border-color: var(--esc-accent); }
.nivel-filter .chip.is-active { background: var(--esc-accent); color: #fff; }

.hub-head { margin-bottom: 8px; }
.hub-count { font-weight: 700; color: var(--esc-accent); margin: 0 0 8px; }
.hub-more { margin: 36px 0 24px; padding-top: 20px; border-top: 1px solid var(--esc-line); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--esc-accent);
  color: #fff;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}
.btn:hover { text-decoration: none; filter: brightness(.95); }
.prose { color: #334155; }
.page-prose { max-width: 760px; padding-bottom: 48px; }
.variants { padding-left: 18px; }

.ficha-layout { display: grid; grid-template-columns: 1fr 280px; gap: 36px; align-items: start; margin-bottom: 28px; }
.ficha-post { max-width: 760px; }
.ficha-post p { line-height: 1.65; }
.ficha-aside { position: sticky; top: 96px; }
.escolares-ficha-img { margin: 28px 0; text-align: center; }
.escolares-ficha-img img { margin: 0 auto; border: 1px solid var(--esc-line); border-radius: 12px; box-shadow: 0 4px 18px rgba(15, 23, 42, .08); max-height: 720px; width: auto; }
.escolares-ficha-img figcaption { margin-top: 10px; font-size: .9rem; color: var(--esc-muted); }

.escolares-descarga { text-align: center; margin: 30px 0 36px; padding: 26px 20px; background: var(--esc-bg); border: 1px dashed var(--esc-line); border-radius: 14px; }
.escolares-btn-pdf {
  display: inline-block;
  background: var(--esc-accent);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 34px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(var(--esc-accent-rgb), .35);
  transition: transform .12s ease, filter .12s ease;
}
.escolares-btn-pdf:hover { text-decoration: none; filter: brightness(.93); transform: translateY(-1px); }
.escolares-descarga-nota { margin: 12px 0 0; font-size: .88rem; color: var(--esc-muted); }
.escolares-cierre { color: #334155; }

.escolares-faqs { margin-top: 36px; }
.escolares-faqs details {
  border: 1px solid var(--esc-line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}
.escolares-faqs summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 16px;
  font-weight: 650;
  color: var(--esc-ink);
  position: relative;
}
.escolares-faqs summary::-webkit-details-marker { display: none; }
.escolares-faqs summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--esc-accent);
}
.escolares-faqs details[open] summary::after { content: "–"; }
.escolares-faqs details[open] summary { border-bottom: 1px solid var(--esc-line); background: var(--esc-bg); }
.escolares-faqs .faq-a { padding: 4px 16px; color: #334155; }

.escolares-relacionados { display: none; }

.sticky-cta {
  position: sticky;
  bottom: 16px;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: #111827;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .25);
  margin: 0 0 28px;
}
.sticky-cta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.newsletter { background: var(--esc-bg); border: 1px solid var(--esc-line); border-radius: 14px; padding: 22px; }
.newsletter h2, .newsletter h3 { margin: 0 0 8px; }
.newsletter p { color: var(--esc-muted); margin: 0 0 14px; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input[type="email"] {
  flex: 1;
  border: 1px solid var(--esc-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.newsletter-row button {
  border: 0;
  background: var(--esc-accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.newsletter-msg { font-size: .95rem; margin: 12px 0 0; line-height: 1.4; font-weight: 600; }
.newsletter-msg.is-ok { color: var(--esc-accent-ink); }
.newsletter-msg.is-err { color: #b91c1c; }
.newsletter-band { margin: 12px auto 48px; display: flex; justify-content: center; }
.newsletter-band .newsletter { width: min(560px, 100%); }
.newsletter.is-compact { padding: 16px; }
.newsletter.is-compact .newsletter-row { flex-direction: column; }

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 18px 0 8px;
  padding: 16px;
  background: var(--esc-bg);
  border: 1px solid var(--esc-line);
  border-radius: 14px;
}
.search-filters label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--esc-muted); }
.search-filters select {
  font: inherit;
  font-weight: 600;
  color: var(--esc-ink);
  border: 1px solid var(--esc-line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  min-width: 150px;
}
.catalog .hero-search { max-width: 100%; margin: 8px 0 0; }

.empty-state, .empty-page { padding: 12px 0 48px; }
.empty-state h2 { margin-top: 0; }

.site-footer { background: #111827; color: #cbd5e1; padding: 52px 0 0; margin-top: 48px; }
.site-footer a { color: #e5e7eb; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .8fr .9fr 1.2fr; gap: 28px; padding-bottom: 36px; }
.site-footer h2 { color: #fff; font-size: .95rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.footer-claims { font-size: .85rem; color: #94a3b8; }
.site-footer .newsletter { background: #1f2937; border-color: #374151; }
.site-footer .newsletter p { color: #94a3b8; }
.legal { border-top: 1px solid #1f2937; font-size: .85rem; color: #94a3b8; }
.legal-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; }
.legal nav { display: flex; gap: 16px; }

.pager { margin: 8px 0 48px; display: flex; justify-content: center; }
.pager-meta { color: var(--esc-muted); font-size: .95rem; font-weight: 600; margin: 18px 0 2px; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--esc-line);
  border-radius: 12px;
  color: var(--esc-ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.nav-links a:hover { border-color: var(--esc-accent); text-decoration: none; }
.nav-links .current { background: var(--esc-accent); color: #fff; border-color: var(--esc-accent); }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .site-search { grid-column: 1 / -1; order: 3; }
  .nav-toggle { display: inline-block; border: 1px solid var(--esc-line); background: #fff; padding: 8px 12px; border-radius: 8px; font: inherit; font-weight: 600; }
  .nav { display: none; grid-column: 1 / -1; }
  .nav.is-open { display: block; padding-bottom: 14px; }
  .nav-root { flex-direction: column; align-items: stretch; gap: 4px; }
  .has-mega { width: 100%; }
  .mega { position: static; width: auto; box-shadow: none; border: 0; padding: 8px 0 0; }
  .mega::before { display: none; }
  .mega-cols { grid-template-columns: 1fr; gap: 12px; }
  .cards, .type-grid, .grade-grid, .ficha-layout, .footer-grid { grid-template-columns: 1fr; }
  .ficha-aside, .sticky-cta { display: none; }
}
