:root {
  --azul: #140B5B;
  --azul-oscuro: #0a0638;
  --amarillo: #F9B233;
  --rojo: #c0392b;
  --gris: #f4f6f8;
  --texto: #1c1c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: #fff;
  line-height: 1.5;
}
header { background: var(--azul-oscuro); color: #fff; border-bottom: 3px solid var(--amarillo); }
.topbar {
  background: var(--azul);
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  text-align: center;
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}
nav .brand { display: inline-flex; align-items: center; font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.hero-banner { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; margin-bottom: 1.5rem; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0.5rem 0 0; padding: 0; }
nav a { color: #e8eef3; text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: #fff; text-decoration: underline; }
main { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem 4rem; min-height: 60vh; }
footer { background: var(--gris); padding: 0.75rem 1rem; text-align: center; font-size: 0.75rem; color: #555; }
footer p { margin: 0.2rem 0; }
h1, h2, h3 { color: var(--azul-oscuro); }
.lema { font-size: 1.2rem; font-weight: 600; color: var(--rojo); }
.grid-2 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.5rem; }
.card { border: 1px solid #e3e6ea; border-radius: 8px; padding: 1.25rem; }
.card .ambito { font-size: 0.85rem; color: #777; margin-top: -0.5rem; }
table { width: 100%; border-collapse: collapse; }
table td { padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid #eee; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 1rem; }

/* Enlaces */
main a {
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
main a:hover { color: var(--azul-oscuro); border-bottom-color: var(--amarillo); }
.link-mas {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}
.link-pill {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--azul);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: none !important;
}
.link-pill:hover { background: var(--amarillo); color: var(--azul-oscuro) !important; }

/* Carrusel */
.carousel-wrap { position: relative; margin-top: 1.5rem; }
.carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.carousel .card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--azul-oscuro);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 2;
}
.carousel-btn:hover { background: var(--amarillo); color: var(--azul-oscuro); }
.carousel-btn.prev { left: -14px; }
.carousel-btn.next { right: -14px; }
@media (max-width: 640px) {
  .carousel-btn { display: none; }
}
