/*
Theme Name: Primaria 31 de Marzo
Theme URI: https://primaria31demarzo.edu.mx
Author: Hostlat
Description: Tema institucional ligero para la Escuela Primaria del Estado 31 de Marzo.
Version: 1.0.0
Text Domain: primaria31
*/

:root {
  --ink: #142d44;
  --ink-soft: #425b70;
  --blue: #1f5d87;
  --green: #237a57;
  --yellow: #f2c14e;
  --coral: #df6b57;
  --sky: #e8f3fa;
  --paper: #ffffff;
  --mist: #f5f8fa;
  --line: #d9e3ea;
  --shadow: 0 12px 34px rgba(20, 45, 68, 0.12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 999; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 90; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar { background: var(--ink); color: #fff; font-size: .84rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 18px; padding-block: 7px; }
.topbar a { color: #fff; }
.navbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 248px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 52px; border: 3px solid var(--green); border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 900; font-size: 1.1rem; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1rem; }
.brand-copy span { color: var(--ink-soft); font-size: .76rem; margin-top: 4px; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .91rem; padding: 10px 9px; border-bottom: 3px solid transparent; }
.nav-menu a:hover, .nav-menu .current-menu-item > a { color: var(--green); border-bottom-color: var(--yellow); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.45rem; cursor: pointer; }

.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; background: #18344a center/cover no-repeat; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(10, 31, 47, .58); }
.hero-inner { position: relative; z-index: 1; max-width: 790px; padding: 82px 0 72px; }
.eyebrow { display: inline-block; margin: 0 0 16px; color: var(--yellow); font-weight: 800; font-size: .82rem; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(2.45rem, 5.4vw, 4.9rem); line-height: 1.02; letter-spacing: 0; }
.hero p { max-width: 680px; margin: 20px 0 28px; font-size: clamp(1.03rem, 1.6vw, 1.28rem); color: #edf5fa; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border: 2px solid transparent; background: var(--green); color: #fff; text-decoration: none; font-weight: 800; }
.btn:hover { background: #195f43; color: #fff; }
.btn-secondary { background: transparent; border-color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--ink); }

.section { padding: 78px 0; }
.section-muted { background: var(--mist); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 34px; }
.section-head h2, .page-hero h1 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.1rem); line-height: 1.12; letter-spacing: 0; }
.section-head p { max-width: 620px; margin: 8px 0 0; color: var(--ink-soft); }
.section-dark .section-head p { color: #c9d8e3; }
.section-link { flex: none; font-weight: 800; }

.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 56px; align-items: center; }
.welcome-copy h2 { margin: 0 0 18px; font-size: clamp(2rem, 3.5vw, 3.25rem); line-height: 1.12; }
.welcome-copy p { color: var(--ink-soft); }
.motto { border-left: 6px solid var(--yellow); margin: 26px 0 0; padding: 10px 0 10px 20px; font-size: 1.22rem; font-weight: 800; color: var(--ink); }
.welcome-image { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; box-shadow: var(--shadow); border-radius: 6px; }

.values { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.value { min-height: 156px; padding: 22px 18px; border-top: 6px solid var(--green); background: #fff; box-shadow: 0 5px 18px rgba(20,45,68,.08); border-radius: 6px; }
.value:nth-child(2) { border-color: var(--blue); }
.value:nth-child(3) { border-color: var(--yellow); }
.value:nth-child(4) { border-color: var(--coral); }
.value:nth-child(5) { border-color: #6d5cae; }
.value strong { display: block; margin-bottom: 8px; font-size: 1rem; }
.value span { color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; border: 1px solid var(--line); background: #fff; border-radius: 7px; }
.card-media { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--sky); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.card-meta { margin-bottom: 10px; color: var(--green); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.card h3 { margin: 0 0 10px; font-size: 1.24rem; line-height: 1.25; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card p { margin: 0 0 18px; color: var(--ink-soft); }
.card .read-more { margin-top: auto; font-weight: 800; }
.empty-state { padding: 28px; border: 1px dashed #9fb3c2; background: #fff; color: var(--ink-soft); }

.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.identity-panel { padding: 30px; background: #fff; color: var(--ink); border-radius: 7px; }
.identity-panel h3 { margin-top: 0; font-size: 1.65rem; }
.identity-panel p { color: var(--ink-soft); }

.contact-band { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: stretch; }
.contact-copy { padding: 34px; background: var(--sky); border-left: 7px solid var(--blue); }
.contact-copy h2 { margin-top: 0; }
.map { width: 100%; min-height: 320px; border: 0; background: #dfe8ee; }

.page-hero { padding: 64px 0 48px; background: var(--sky); border-bottom: 1px solid var(--line); }
.page-hero p { max-width: 720px; margin: 12px 0 0; color: var(--ink-soft); }
.content-area { padding: 64px 0 84px; }
.content-narrow { max-width: 840px; }
.entry-content h2 { margin-top: 2.1em; font-size: 1.75rem; }
.entry-content h3 { margin-top: 1.8em; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.entry-content blockquote { margin: 28px 0; padding: 18px 24px; border-left: 6px solid var(--yellow); background: var(--mist); }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.person { padding: 20px; border: 1px solid var(--line); border-top: 5px solid var(--green); background: #fff; border-radius: 6px; }
.person strong { display: block; }
.person span { color: var(--ink-soft); font-size: .9rem; }

.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pagination { margin-top: 38px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { display: grid; min-width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; }

.site-footer { background: #10283c; color: #dce8f0; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 46px; padding: 58px 0 42px; }
.site-footer h2, .site-footer h3 { color: #fff; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }
.footer-bottom { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.16); font-size: .86rem; }

@media (max-width: 1040px) {
  .menu-toggle { display: grid; place-items: center; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .nav-menu { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; display: grid; padding: 14px 0 20px; }
  .nav-menu a { padding: 11px 4px; }
  .values { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .cards, .archive-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .topbar .container { display: block; }
  .topbar span:last-child { display: none; }
  .navbar { min-height: 70px; }
  .brand { min-width: 0; }
  .brand-mark { width: 46px; height: 46px; flex-basis: 46px; }
  .brand-copy strong { font-size: .9rem; }
  .brand-copy span { font-size: .7rem; }
  .hero { min-height: 520px; }
  .hero-inner { padding: 62px 0 54px; }
  .section { padding: 58px 0; }
  .section-head { display: block; }
  .section-link { display: inline-block; margin-top: 12px; }
  .welcome-grid, .contact-band, .identity-grid { grid-template-columns: 1fr; }
  .welcome-grid { gap: 30px; }
  .values { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cards, .archive-grid, .directory-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 28px; }
}

@media (max-width: 430px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .brand-copy span { display: none; }
  .actions .btn { width: 100%; }
  .values { grid-template-columns: 1fr; }
}

