:root {
  --navy: #001b5e;
  --navy-dark: #00174f;
  --yellow: #f7a900;
  --text: #111;
  --title: #282828;
  --muted: #555;
  --card-bg: #eef2f7;
  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 15px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 97px;
}
.logo img { width: 218px; height: auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; align-items: center; }
.main-nav a, .sub-toggle {
  color: var(--navy);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  font-family: inherit;
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.main-nav a:hover, .sub-toggle:hover,
.main-nav a.current, .sub-toggle.current { color: var(--yellow); }
.sub-toggle.current { border-bottom-color: var(--yellow); }
.has-sub { position: relative; }
.sub-menu {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  right: -60px;
  width: 448px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  border-radius: 0 0 6px 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .15s ease;
}
.has-sub:hover .sub-menu, .has-sub.open .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1.3;
  border: 0;
}
.menu-toggle { display: none; }

/* ---------- Typography ---------- */
.page-title {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--title);
  font-size: 40px;
  line-height: 1.1;
  margin: 60px 0 40px;
}
.eyebrow {
  color: var(--yellow);
  font-size: 32px;
  font-weight: 500;
  margin: 0 0 10px;
  line-height: 1.2;
}
.course-title {
  color: var(--navy);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 20px;
}
.section-title {
  color: var(--navy);
  font-size: 40px;
  font-weight: 500;
  text-align: center;
  margin: 30px 0;
  line-height: 1.2;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 6px;
  line-height: 1.2;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-yellow { background: var(--yellow); }
.btn-sm { display: block; padding: 6px 12px; font-size: 13px; text-align: center; }
.btn-lg { font-size: 18px; padding: 8px 24px; }
.btn-wrap { margin: 40px 0; text-align: center; }
.btn-wrap.left { text-align: left; margin: 30px 0 0; }
.btn-wrap.center { text-align: center; }

/* ---------- Course pages ---------- */
.course { padding: 0 25px 10px; }
.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  align-items: start;
}
.course-text { font-size: 15px; line-height: 1.8; }
.course-text p { margin: 0 0 26px; }
.course-text ul { padding-left: 15px; margin: 0 0 30px; }
.course-text li { margin-bottom: 10px; }
.course-text li ul { margin: 24px 0 0; }
.course-text ul.tight { margin-bottom: 26px; }
.course-text ul.tight li { margin-bottom: 0; line-height: 1.75; }
.sub-heading { font-weight: 700; text-decoration: underline; margin-top: 40px !important; }
.media { position: relative; margin-top: 0; }
.media > img, .media .slide img {
  width: 100%;
  aspect-ratio: 540 / 405;
  object-fit: cover;
  border-radius: 8px;
}
.course-text + .media:not(.carousel) { margin-top: 0; }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel-viewport { overflow: hidden; border-radius: 8px; }
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel .slide { flex: 0 0 100%; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  padding: 0 10px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.media .carousel-btn { top: calc(50% - 22px); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { display: flex; justify-content: center; gap: 12px; padding: 14px 0; }
.carousel-dots button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: #ccc; cursor: pointer;
}
.carousel-dots button.active { background: #000; }

/* ---------- Home ---------- */
.hero {
  background: var(--navy);
  padding: 140px 20px 130px;
  text-align: center;
}
.hero h1 {
  color: var(--yellow);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.cursos { padding-bottom: 80px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  max-width: 1160px;
  margin: 0 auto;
}
.card {
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 380 / 200; object-fit: cover; }
.card-body {
  padding: 16px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 31px;
  line-height: 1.05;
  color: #111;
  margin: 8px 0 12px;
}
.card p { color: var(--muted); font-size: 15px; line-height: 1.2; margin: 0 0 12px; }
.card .virtual { color: var(--yellow); font-weight: 500; font-size: 16px; margin-top: 12px; }
.card .btn { margin-top: auto; }

.gallery { background: var(--navy); padding: 60px 0 20px; }
.gallery .carousel { max-width: 1520px; margin: 0 auto; padding: 0 80px; }
.gallery .carousel-viewport { border-radius: 0; }
.gallery .slide { padding: 0 55px; }
.gallery .slide img { width: 100%; aspect-ratio: 640 / 480; object-fit: cover; border-radius: 8px; height: 480px; }
.gallery .carousel-btn { font-size: 40px; top: calc(50% - 30px); }
.gallery .carousel-btn.prev { left: 20px; }
.gallery .carousel-btn.next { right: 20px; }
.gallery .carousel-dots { padding: 60px 0 10px; }
.gallery .carousel-dots button { background: #fff; }
.gallery .carousel-dots button.active { background: var(--yellow); }

.descargas { padding: 40px 15px 80px; }
.download-cards { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.download-card {
  background: var(--card-bg);
  border-radius: 6px;
  width: 340px;
  padding: 16px 30px 26px;
  text-align: center;
}
.download-card h3 { color: #555; font-size: 21px; font-weight: 500; margin: 0 0 10px; }
.download-card p { color: var(--muted); font-size: 16px; line-height: 1.2; margin: 0 0 20px; }
.download-card .btn { display: inline-block; padding: 6px 24px; }

.map iframe { display: block; width: 100%; height: 480px; border: 0; }

.contacto { background: var(--card-bg); padding: 60px 0 30px; }
.contact-grid {
  display: flex;
  justify-content: center;
  gap: 120px;
  flex-wrap: wrap;
  font-size: 16px;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 14px; display: flex; align-items: center; flex-wrap: wrap; }
.contacto a { color: inherit; text-decoration: none; }
.contacto a:hover { color: var(--navy); text-decoration: underline; }
.contacto svg { width: 16px; height: 16px; fill: #333; margin-right: 4px; flex: none; }
.horarios p { margin: 0 0 6px; display: flex; align-items: center; }
.contacto .btn-wrap { margin: 40px 0 0; }
.contacto .btn-lg { color: #fff; text-decoration: none; }

/* ---------- Nosotros ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  padding: 0 25px;
}
.about-text p { font-size: 15px; line-height: 1.8; margin: 0 0 30px; color: #222; }
.about-imgs { display: flex; flex-direction: column; gap: 20px; }
.about-imgs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.objetivos {
  max-width: 890px;
  margin: 80px auto;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 30px 30px 40px;
}
.objetivos ul { padding-left: 15px; margin: 50px 0 0; font-size: 15px; }
.objetivos li { margin-bottom: 10px; line-height: 1.8; }
.staff-section { padding-bottom: 60px; }
.staff-section .course-title { margin-bottom: 10px; }
.staff-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 30px; }
.staff { margin: 0; }
.staff figcaption { display: flex; flex-direction: column; margin-bottom: 10px; line-height: 1.15; }
.staff .name { font-size: 26px; font-weight: 300; color: #555; }
.staff .role { font-size: 18px; font-weight: 300; color: #999; }
.staff img { width: 100%; max-width: 245px; margin-left: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 77px;
  font-size: 16px;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
  }
  .menu-toggle span { width: 24px; height: 2px; background: var(--navy); display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .1);
    padding: 10px 20px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid #eee; padding: 8px 0; }
  .sub-menu {
    position: static;
    width: auto;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 4px 0 0 10px;
  }
  .has-sub:hover .sub-menu { display: none; }
  .has-sub.open .sub-menu { display: block; }
  .sub-menu a { padding: 8px 0; font-size: 15px; }

  .course-grid, .about { grid-template-columns: 1fr; }
  .course-grid .media { order: -1; margin-bottom: 20px; }
  .about-imgs { flex-direction: row; overflow-x: auto; }
  .about-imgs img { width: 260px; flex: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .staff-row { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .gallery .carousel { padding: 0 40px; }
  .gallery .slide { padding: 0 10px; }
  .gallery .slide img { height: auto; }
  .gallery .carousel-btn.prev { left: 0; }
  .gallery .carousel-btn.next { right: 0; }
  .hero h1 { font-size: 40px; }
  .contact-grid { gap: 30px; }
}

@media (max-width: 600px) {
  .page-title { font-size: 30px; margin: 40px 0 30px; }
  .eyebrow, .course-title { font-size: 26px; }
  .section-title { font-size: 30px; }
  .course { padding: 0 15px; }
  .about { padding: 0 15px; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 80px 16px; }
  .hero h1 { font-size: 32px; }
  .staff .name { font-size: 22px; }
  .staff .role { font-size: 15px; }
  .staff img { margin-left: 0; }
  .objetivos { margin: 50px auto; padding: 24px 20px 30px; }
  .footer-inner { justify-content: center; text-align: center; }
  .map iframe { height: 350px; }
}

/* ---------- Contacto ---------- */
.contact-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 25px;
  align-items: start;
}
.contact-title { color: var(--navy); font-size: 34px; font-weight: 500; margin: 0 0 10px; line-height: 1.6; }
.contact-page .media { margin-top: 60px; }
.contact-list.big li { font-size: 18px; color: #333; margin-bottom: 12px; }
.horarios.big { font-size: 18px; color: #333; line-height: 1.4; margin-bottom: 20px; }
.horarios.big p { margin: 0; }
.horarios.big p:first-child { margin-bottom: 4px; }
.contact-page a { color: inherit; text-decoration: none; }
.contact-page a:hover { color: var(--navy); text-decoration: underline; }
.contact-page svg { width: 16px; height: 16px; fill: #333; margin-right: 6px; flex: none; }
.contact-form {
  background: #b5b5b5;
  border-radius: 8px;
  padding: 26px 43px 24px;
}
.contact-form h2 { color: var(--navy); font-size: 18px; font-weight: 500; text-align: center; margin: 0 0 20px; }
.contact-form label { display: block; font-weight: 500; font-size: 17px; color: #222; margin-bottom: 24px; }
.contact-form .req { color: #d63638; }
.contact-form input, .contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  font: inherit;
  font-weight: 400;
  border: 1px solid #999;
  border-radius: 3px;
  background: #fff;
}
.contact-form input { height: 43px; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.btn-submit {
  width: 100%;
  background: #0b6bb0;
  color: #fff;
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-size: 17px;
  padding: 9px;
  cursor: pointer;
}
.btn-submit:hover { background: #095a94; }
.form-msg { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 15px; }
.form-msg.ok { background: #e3f4e3; color: #1d5e1d; }
.form-msg.error { background: #fbe3e3; color: #8a1f1f; }
.contact-map { margin-top: 50px; }
.contact-map iframe { display: block; width: 100%; height: 240px; border: 0; }
@media (max-width: 960px) {
  .contact-page { grid-template-columns: 1fr; }
  .contact-page .media { margin-top: 10px; }
}
@media (max-width: 600px) {
  .contact-page { padding: 0 15px; }
  .contact-form { padding: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}
