/* Variables y Reset */
:root {
  --maxw: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

p {
  margin: 0;
}

/* Tipografia y Layout */
h1, h2, h3, .logo-mark, .stat-number {
  font-family: "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0;
  margin: 0;
}

.logo-mark {
  font-size: 1.95rem;
  line-height: .82;
  font-weight: 800;
}

.container {
  width: min(100%, var(--maxw));
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  text-transform: uppercase;
}

/* Componentes Globales */
.lead {
  max-width: 760px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-bright));
}

.card {
  box-shadow: var(--shadow-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Header y Navegacion */
.site-header.is-scrolled, .site-header.menu-active {
  border-bottom-color: transparent;
}

.nav-shell {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  min-width: max-content;
}

.brand-logo {
  width: auto;
  height: 46px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.8vw, 24px);
  flex: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 14px);
  color: var(--ink);
  font-size: .92rem;
}

.nav-item {
  position: relative;
}

.nav-link, .nav-trigger {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color var(--ease), background var(--ease);
}

.mega-menu, .simple-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .22s ease, transform .22s ease;
}

.mega-menu::before, .simple-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.nav-item:hover .mega-menu, .nav-item:hover .simple-menu, .nav-item.is-open .mega-menu, .nav-item.is-open .simple-menu, .nav-item:focus-within .mega-menu, .nav-item:focus-within .simple-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.mega-menu {
  width: min(920px, calc(100vw - 48px));
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(11, 27, 58, .18);
  border: 1px solid rgba(11, 27, 58, .08);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mega-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(238, 242, 251, .76), rgba(255, 255, 255, .96));
  border: 1px solid rgba(11, 27, 58, .07);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.mega-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(11, 27, 58, .1);
}

.mega-card strong {
  display: block;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
}

.mega-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.mega-card > span:last-child {
  display: inline-flex;
  margin-top: 18px;
  font-size: .9rem;
  font-weight: 800;
}

/* Logo del programa en el hero de las landings */
.program-logo {
  display: block;
  width: min(280px, 62vw);
  height: auto;
  margin: 22px 0 20px;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .28));
}

/* Logo del programa dentro de cada tarjeta del mega-menú */
.mega-card-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 170px;
  margin-bottom: 14px;
  object-fit: contain;
  object-position: left center;
  transition: transform var(--ease);
}

.mega-card:hover .mega-card-logo {
  transform: translateY(-1px) scale(1.03);
}

.simple-menu {
  min-width: 240px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(11, 27, 58, .16);
  border: 1px solid rgba(11, 27, 58, .08);
}

.simple-menu a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--ink);
}

.nav-formaciones {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2px 8px;
  border-radius: 14px;
  transition: background var(--ease);
}

.formaciones-title {
  display: flex;
  justify-content: space-between;
  width: 100%;
  line-height: 1;
  padding: 2px 14px 5px;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.formaciones-title i {
  font-style: normal;
}

.formaciones-title i.gap {
  flex: 0 0 1em;
}

.formaciones-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.formaciones-sep {
  color: rgba(11, 27, 58, .28);
  pointer-events: none;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(11, 27, 58, .16);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--ease), opacity var(--ease);
  position: relative;
}

.menu-toggle span::before, .menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] span::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::after {
  transform: translateY(-7px) rotate(-45deg);
}

.site-footer {
  padding: 72px 0 34px;
  background: var(--navy-900);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(150px, 1fr));
  gap: 34px;
}

.footer-tagline {
  max-width: 300px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .62);
  font-size: .95rem;
}

/* Footer */
.footer-col h3 {
  margin-bottom: 16px;
  font-size: 1.28rem;
}

.footer-col a, .footer-col p {
  display: block;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .62);
  font-size: .94rem;
  line-height: 1.45;
  transition: color var(--ease);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 54px;
  font-size: .9rem;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}
