/* educacion-online.cl — blog minimalista */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f4f0;
  --bg-elevated: #ffffff;
  --bg-soft: #ebe7df;
  --ink: #1a1f24;
  --ink-muted: #5c6570;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --accent-hover: #0d9488;
  --border: rgba(26, 31, 36, 0.1);
  --shadow: 0 12px 40px rgba(26, 31, 36, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --nav-h: 72px;
  color-scheme: light;
}

[data-theme='dark'] {
  --bg: #11161c;
  --bg-elevated: #1a222c;
  --bg-soft: #232d39;
  --ink: #eef2f6;
  --ink-muted: #9aa6b2;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-hover: #5eead4;
  --border: rgba(238, 242, 246, 0.1);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--accent-soft), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(180, 140, 90, 0.08), transparent 50%),
    var(--bg);
  transition: background 0.25s ease, color 0.25s ease;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.75rem;
}

.seo-intro {
  margin-bottom: 1.5rem;
}

.seo-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.breadcrumbs a {
  text-decoration: none;
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-icon-dark { display: none; }
[data-theme='dark'] .theme-icon-light { display: none; }
[data-theme='dark'] .theme-icon-dark { display: block; }

.menu-toggle {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.search-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding: clamp(1.5rem, 8vh, 4rem) 1rem 2rem;
}

.search-overlay[hidden] {
  display: none;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.search-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  animation: search-in 0.22s ease;
}

@keyframes search-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--ink) 12%, transparent);
}

.search-bar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--ink-muted);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--ink-muted);
}

.search-close {
  flex-shrink: 0;
}

.search-hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.search-status {
  margin: 1rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.search-results {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  max-height: min(55vh, 420px);
  overflow: auto;
  display: grid;
  gap: 0.4rem;
}

.search-result {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.search-result:hover,
.search-result.is-active {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.search-result-title {
  display: block;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.search-result-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* ——— Home ——— */
.page {
  padding: 2.25rem 0 4.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.7s ease both;
}

.featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(26, 31, 36, 0.12);
  color: inherit;
}

.featured-media {
  min-height: 320px;
  background: var(--bg-soft);
  overflow: hidden;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured:hover .featured-media img {
  transform: scale(1.03);
}

.featured-body {
  padding: 2rem 2.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.featured h1,
.article-hero h1,
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
}

.featured h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.lede {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.read-more {
  margin-top: 0.4rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 3rem 0 1.25rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  animation: rise 0.65s ease both;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.18s; }
.card:nth-child(4) { animation-delay: 0.24s; }
.card:nth-child(5) { animation-delay: 0.3s; }

.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow);
  color: inherit;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 1;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.card--featured {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.025em;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  flex: 1;
}

/* ——— Article ——— */
.article-hero {
  max-width: 760px;
  margin: 0 auto 1.75rem;
}

.article-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-top: 0.6rem;
}

.article-cover {
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  margin: 0 auto 2rem;
  max-width: 920px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: rise 0.65s ease both;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-content {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.08rem;
}

.article-content p {
  margin: 0 0 1.15rem;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 2rem 0 0.75rem;
}

.article-content ul {
  padding-left: 1.2rem;
  margin: 0 0 1.25rem;
}

.article-content li {
  margin-bottom: 0.45rem;
}

.article-content a {
  font-weight: 600;
  word-break: break-word;
}

.article-sources {
  max-width: 680px;
  margin: 2.5rem auto 0;
  padding: 1.35rem 1.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.article-sources h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
}

.article-sources ol {
  margin: 0;
  padding-left: 1.2rem;
}

.article-sources li {
  margin-bottom: 0.55rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.article-sources a {
  font-weight: 600;
  word-break: break-word;
}

.article-nav {
  max-width: 680px;
  margin: 2.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-nav a {
  font-weight: 700;
  text-decoration: none;
}

/* ——— Static pages ——— */
.prose {
  max-width: 720px;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.prose p {
  color: var(--ink);
  margin: 0 0 1rem;
}

.prose .lede {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  margin-top: 1.75rem;
  padding: 1.5rem 1.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

[data-theme='dark'] .btn {
  color: #0b1413;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

[data-theme='dark'] .btn:hover {
  color: #0b1413;
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .featured-media {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.75rem 0.5rem;
  }

  .menu-toggle {
    display: grid;
  }

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

  .featured-body {
    padding: 1.4rem 1.25rem 1.6rem;
  }

  .brand-tag {
    display: none;
  }
}
