/* OpoInfo — port estático PHP. Paleta y componentes replicados a mano del sitio Next.js real. */
:root {
  --navy: #0d3b66;
  --navy-dark: #0a2e4f;
  --lime: #9fe000;
  --lime-dark: #16220a;
  --ink: #1a2233;
  --ink-muted: #5b6478;
  --ink-faint: #8b93a7;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --border: #e4e2da;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(19,27,46,.04), 0 8px 24px -14px rgba(19,27,46,.16);
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 20px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: var(--navy); }
.logo .mark { width: 30px; height: 30px; background: var(--lime); border-radius: 8px; display:flex; align-items:center; justify-content:center; color: var(--lime-dark); font-weight: 900; }
.search-box { flex: 1; max-width: 420px; position: relative; }
.search-box input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; background: var(--bg);
}
.search-box .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.main-nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; font-weight: 600; }
.main-nav a:hover { color: var(--navy); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; }
.btn-lime { background: var(--lime); color: var(--lime-dark); }
.btn-lime:hover { filter: brightness(0.95); }
.btn-outline { background: #fff; border: 1px solid var(--border-strong, #c8cdd8); color: var(--ink); }
.mobile-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; padding: 56px 20px 70px; text-align: center; }
.hero h1 { font-size: 34px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
.hero p { font-size: 16px; color: #cfe0f0; max-width: 560px; margin: 0 auto 28px; }
.hero .search-box { max-width: 640px; margin: 0 auto; }
.hero .search-box input { padding: 15px 20px 15px 44px; font-size: 15px; }
.stats-strip { display: flex; justify-content: center; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .n { font-size: 26px; font-weight: 800; color: var(--lime); }
.stat .l { font-size: 12.5px; color: #b7cbdd; text-transform: uppercase; letter-spacing: .04em; }

/* ── Sección genérica / tarjetas ────────────────────────────────────── */
.section { padding: 48px 0; }
.section h2 { font-size: 22px; font-weight: 800; margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card { margin-top: 18px; }

/* ── Grid de resultados (buscador) ──────────────────────────────────── */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.filters-bar select, .filters-bar label { font-size: 13.5px; }
.filters-bar select { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); background: #fff; }
.results-count { color: var(--ink-muted); font-size: 13.5px; margin-bottom: 14px; }
.grid-oposiciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.op-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; transition: transform .12s ease; }
.op-card:hover { transform: translateY(-2px); border-color: #cfd6e3; }
.op-card .badge-grupo { align-self: flex-start; background: #eaf1f8; color: var(--navy); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.op-card h3 { font-size: 16px; margin: 2px 0 0; font-weight: 700; }
.op-card .org { font-size: 12.5px; color: var(--ink-muted); }
.op-card .meta { display: flex; gap: 14px; margin-top: 6px; font-size: 12.5px; color: var(--ink-muted); }
.op-card .meta strong { color: var(--ink); }

/* ── Ficha de detalle ───────────────────────────────────────────────── */
.breadcrumb { font-size: 12.5px; color: #bcd0e2; margin-bottom: 14px; }
.breadcrumb a { color: #cfe0f0; }
.ficha-hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; padding: 30px 0 70px; }
.ficha-hero .pill-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ficha-hero .pill { background: rgba(255,255,255,.14); font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.ficha-hero h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
.ficha-hero .organismo { color: #cfe0f0; font-size: 14.5px; margin-bottom: 18px; }
.ficha-hero .actions { display: flex; gap: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: -46px; position: relative; z-index: 2; }
.stat-row .cell { background: #fff; padding: 16px 18px; }
.stat-row .cell .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 4px; }
.stat-row .cell .v { font-size: 15px; font-weight: 800; color: var(--ink); }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2,1fr); margin-top: 16px; } }

.ficha-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 28px; align-items: start; }
@media (max-width: 900px) { .ficha-layout { grid-template-columns: 1fr; } }
.card h3.card-title { font-size: 15px; font-weight: 800; margin: 0 0 14px; }
.card ul.plain { list-style: disc; padding-left: 20px; margin: 0; font-size: 13.5px; color: var(--ink-muted); }
.card ul.plain li { margin-bottom: 6px; }
.temario-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.temario-row:last-child { border-bottom: none; }
.fase { display: flex; gap: 12px; margin-bottom: 16px; }
.fase .num { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.fase h4 { margin: 2px 0 4px; font-size: 13.5px; }
.fase p { margin: 0; font-size: 13px; color: var(--ink-muted); }
.plazas-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.plazas-bar-row .anio { width: 40px; font-weight: 700; font-size: 13px; text-align: right; }
.plazas-bar-row .track { flex: 1; background: var(--bg); border-radius: 3px; overflow: hidden; height: 12px; }
.plazas-bar-row .fill { background: var(--navy); height: 100%; }
.plazas-bar-row .n { width: 44px; font-size: 13px; font-weight: 700; }

.side-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.side-item:last-child { border-bottom: none; }
.side-item .l { font-size: 10.5px; text-transform: uppercase; color: var(--ink-faint); letter-spacing: .04em; margin-bottom: 2px; }
.side-item .v { font-weight: 700; }
.link-list a { display: block; font-size: 13.5px; padding: 6px 0; color: var(--navy); border-bottom: 1px solid var(--border); }
.link-list a:last-child { border-bottom: none; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { background: #0b1626; color: #a9b6c8; padding: 34px 0 20px; margin-top: 60px; font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: #cfe0f0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-faint); font-size: 14px; }

@media (max-width: 760px) {
  .main-nav { display: none; }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 26px; }
}
