:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --surface-dark: #0b132b;
  --surface-dark-2: #111a36;
  --text: #122033;
  --text-soft: #526277;
  --text-light: #dce5f2;

  --primary: #2563eb;
  --primary-dark: #1d55d4;
  --accent: #f97316;
  --accent-dark: #ea6c0a;
  --accent-soft: #fdba74;

  --border: #d9e2ec;
  --success: #05b8a9;
  --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 12px 12px;
}

.skip-link:focus {
  left: 1rem;
}

.topbar {
  background: #08101f;
  color: #d9e6ff;
  font-size: 0.92rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.topbar a {
  opacity: 0.95;
  transition: var(--transition);
}

.topbar a:hover {
  opacity: 1;
  color: #fff;
}

.dot {
  opacity: 0.5;
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 226, 236, 0.8);
}

.header__inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-size: 1rem;
}

.brand__text small {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  color: var(--text-soft);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-active {
  color: var(--text-soft); /* mismo gris normal */

}



.header__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: #fff;
  border-color: #c8d3df;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.hero--courses {
  padding: 0;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero--courses .hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
}

.hero--courses .hero__text {
  text-align: left;
}

.hero--courses .hero__text h1 {
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero--courses .hero__text p {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 1.8rem;
  max-width: 48ch;
}

.hero__cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  height: 380px;
}

.hero__visual-img {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 100%;
}

.hero__visual-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (max-width: 860px) {
  .hero--courses .hero__grid {
    grid-template-columns: 1fr;
    padding: 3rem 0 2rem;
  }
  .hero--courses .hero__text {
    text-align: center;
  }
  .hero--courses .hero__text p {
    max-width: none;
    margin-inline: auto;
  }
  .hero__cta-row {
    justify-content: center;
  }
  .hero__visual {
    height: auto;
  }
}

.hero__content {
  text-align: center;
  max-width: 860px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #e8f8fb;
  color: #0f6d7d;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero h1,
.section-heading h2 {
  margin: 0 0 1rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
}

.hero__lead {
  max-width: 62ch;
  font-size: 1.08rem;
  color: var(--text-soft);
  margin: 0 auto;
}

.courses-area {
  padding: 2rem 0 5rem;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 2.6rem;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.section-heading p {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 1.6rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.course-card::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -45px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07) 0%, rgba(37, 99, 235, 0) 70%);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: #c9d8ec;
}

.course-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.course-card p {
  margin: 0 0 1.4rem;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
}

.course-card span {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: #fff3e8;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
  transition: var(--transition);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.course-card span::after {
  content: "→";
  transition: transform var(--transition);
}

.course-card:hover span {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.course-card:hover span::after {
  transform: translateX(4px);
}

.course-card:nth-child(3n + 2)::before {
  background: linear-gradient(180deg, #06b6d4, #1d4ed8);
}

.course-card:nth-child(3n + 3)::before {
  background: linear-gradient(180deg, #2563eb, #0f766e);
}

@media (max-width: 1080px) {
  .nav {
    display: none;
  }

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar__inner,
  .header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .course-card {
    min-height: auto;
  }
}

.course-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}

.course-card__thumb {
  margin: -1.6rem -1.6rem 0.8rem;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: relative;
  z-index: 1;
  background: #f1f5f9;
}

.course-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.course-card:hover .course-card__thumb img {
  transform: scale(1.03);
}

.course-card p{
  color:var(--text-soft);
  font-size:0.95rem;
}

.course-features{
  margin:6px 0 12px;
  padding-left:18px;
  color:var(--text-soft);
  font-size:0.9rem;
}

.course-features li{
  margin-bottom:4px;
}

.course-link{
  margin-top:auto;
  font-weight:700;
  color:var(--primary);
}



/* ===== FIX HEADER CURSOS = IGUAL INDEX ===== */

.nav a {
  color: var(--text-soft);
}

/* Quitar estado activo naranja fijo */
.nav a.is-active {
  color: var(--text-soft);
}

/* Línea SOLO en hover */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #f97316, #fb923c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

/* Hover real */
.nav a:hover {
  color: #ea6c0a;
}

.nav a:hover::after {
  transform: scaleX(1);
}

/* 🔥 IMPORTANTE: matar cualquier línea activa */
/* Estado normal activo (sin línea) */
.nav a.is-active::after {
  transform: scaleX(0);
}

/* 🔥 CLAVE: permitir hover aunque esté activo */
.nav a.is-active:hover::after {
  transform: scaleX(1);
}

/* Igualar altura exacta del header */
.header__inner {
  min-height: 90px; /* súbelo desde 84px */
}

.topbar__inner {
  min-height: 50px; /* si en index es más alto */
}

.brand__img {
  height: 48px;
  width: auto;
  display: block;
}



.metodo-mini {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 25px 15px;
}

.metodo-texto {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.6;
  color: #333;
  max-width: 1100px;
}
