:root {
  --navy: #071b3d;
  --blue: #3567d6;
  --mint: #54e0bd;
  --paper: #f5f7fb;
  --ink: #102447;
  --muted: #5f6f8b;
  --line: #d9e1ef;
}

* { box-sizing: border-box; }

/* Selector de etiqueta: aplica estilo general a todo el documento. */
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); margin: 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

/* Selector de clase: reutilizado en la cabecera de todas las páginas. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 76px;
  padding: 0 8%;
  background: white;
  border-bottom: 1px solid var(--line);
}

.brand { color: var(--navy); font-weight: 800; text-decoration: none; }
.brand strong { color: var(--blue); }
nav { display: flex; gap: 1.25rem; }
nav a { color: var(--muted); font-size: .93rem; font-weight: 700; text-decoration: none; }
nav a.active, nav a:hover { color: var(--blue); }

.hero, .page-intro {
  padding: 5rem 8%;
  background: var(--navy);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 42%);
  align-items: center;
  gap: 3rem;
}

.hero p { max-width: 620px; font-size: 1.08rem; }
.hero img { width: 100%; min-height: 280px; object-fit: cover; border-radius: 18px; }
.page-intro p { max-width: 650px; font-size: 1.12rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--blue); font-family: monospace; font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.hero .eyebrow, .page-intro .eyebrow { color: var(--mint); }

.button {
  display: inline-block;
  padding: .85rem 1.1rem;
  color: var(--navy);
  background: var(--mint);
  border: 1px solid var(--mint);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}

.button:hover { background: white; transform: translateY(-2px); }
.section { width: min(1100px, 84%); margin: 0 auto; padding: 3.8rem 0; }
.benefits, .module-list { padding-left: 1.3rem; }
.benefits li, .module-list li { margin: .75rem 0; }
.topic-list { columns: 2; column-gap: 3rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem; border-bottom: 1px solid var(--line); }
th { color: white; background: var(--navy); font-size: .9rem; }
tr:last-child td { border-bottom: 0; }

.media-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2.5rem; }
.media-grid img { width: 100%; border-radius: 14px; }
.video-section { padding-top: 1rem; }
.video-section iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }

.course-grid, .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.course-card, .news-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 20px rgb(16 36 71 / 5%); }
.course-card { padding: 1.4rem; }
.course-card h3, .news-card h3 { margin: .65rem 0; }
.course-card p, .news-card p { color: var(--muted); }
.course-card a, .news-card a { color: var(--blue); font-weight: 800; text-decoration: none; }
.level { color: var(--blue); font-family: monospace; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.catalog-table { margin-top: 2rem; }
.news-card img { display: block; width: 100%; height: 180px; object-fit: cover; }
.news-card div { padding: 1.25rem; }
.news-card span { color: var(--blue); font-family: monospace; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }
.project-callout { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 3.8rem; padding: 2.25rem; color: white; background: linear-gradient(120deg, var(--navy), #214f9d); border-radius: 18px; }
.project-callout h2 { margin: .25rem 0 .75rem; }
.project-callout p { max-width: 700px; margin-bottom: 0; }
.project-callout .eyebrow { color: var(--mint); }
.compact { margin-top: 0; }

/* Selector de ID: identifica el mensaje de validación de JavaScript. */
#form-message { min-height: 1.5rem; margin: .3rem 0; font-weight: 700; }
.form-section { max-width: 780px; }
form { display: grid; gap: 1rem; padding: 1.5rem; background: white; border: 1px solid var(--line); border-radius: 14px; }
label { display: grid; gap: .35rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: .7rem; border: 1px solid #aab8cf; border-radius: 7px; font: inherit; }
fieldset { border: 1px solid var(--line); border-radius: 8px; }
fieldset label { display: inline-flex; align-items: center; margin-right: 1rem; font-weight: 400; }
fieldset input, .consent input { width: auto; }
.consent { display: flex; align-items: center; gap: .5rem; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 8%; color: white; background: var(--navy); font-size: .9rem; }

/* Primer punto responsive: tablet. */
@media (max-width: 820px) {
  .hero, .media-grid, .course-grid, .news-grid { grid-template-columns: 1fr; }
  .topic-list { columns: 1; }
  .project-callout { align-items: flex-start; flex-direction: column; }
  .hero { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* Segundo punto responsive: celular. */
@media (max-width: 540px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 1rem 8%; gap: .7rem; }
  nav { width: 100%; justify-content: space-between; }
  .hero, .page-intro { padding: 3rem 8%; }
  .section { width: min(100% - 2rem, 1100px); padding: 2.5rem 0; }
  th, td { padding: .75rem; font-size: .86rem; }
  footer { flex-direction: column; }
}
