/* ============================================================
   CURSOS — Estilos dedicados para nuestros-cursos.php
   ============================================================ */

/* ===== HERO ===== */
.cursos-hero {
  position: relative;
  min-height: clamp(360px, 56vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #07132a;
}

.cursos-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.46) saturate(1.1);
  z-index: 0;
}

.cursos-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 24%, rgba(28, 160, 255, 0.22) 0%, rgba(28,160,255,0) 44%),
    radial-gradient(circle at 82% 76%, rgba(255, 196, 58, 0.18) 0%, rgba(255,196,58,0) 42%),
    linear-gradient(180deg, rgba(7,19,42,0.38) 0%, rgba(7,19,42,0.62) 100%);
  z-index: 1;
  pointer-events: none;
}

.cursos-hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 780px;
  width: 100%;
}

.cursos-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #c8ecff;
  margin-bottom: 0.9rem;
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(200, 236, 255, 0.4);
  background: rgba(9, 30, 67, 0.54);
}

.cursos-hero-title {
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
  margin-bottom: 0.8rem;
}

.cursos-hero-lead {
  font-size: clamp(0.97rem, 1.5vw, 1.16rem);
  color: #d8eeff;
  margin-bottom: 1.6rem;
  line-height: 1.55;
  font-weight: 400;
}

.cursos-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  justify-content: center;
}

.cursos-hero-actions .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 0.62rem 1.4rem;
  letter-spacing: 0.01em;
}

.cursos-hero-actions .btn-warning {
  box-shadow: 0 10px 22px rgba(255, 186, 30, 0.36);
  color: #0e1e3a;
}

.cursos-hero-actions .btn-outline-light {
  border-color: rgba(255,255,255,0.72);
  color: #ffffff;
}

.cursos-hero-actions .btn-outline-light:hover,
.cursos-hero-actions .btn-outline-light:focus-visible {
  background: #ffffff;
  color: #0e1e3a;
  border-color: #ffffff;
}

.cursos-hero-actions .btn:focus-visible {
  outline: 3px solid rgba(255, 214, 94, 0.96);
  outline-offset: 2px;
}

/* Video play button */
.cursos-play-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
  position: relative;
}

.cursos-play-btn::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.44);
  animation: cursosPlayRing 2.2s ease-out infinite;
}

.cursos-play-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.08);
}

@keyframes cursosPlayRing {
  0%   { opacity: 0.8; transform: scale(0.9); }
  100% { opacity: 0;   transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .cursos-play-btn::after { animation: none; }
}

/* ===== SECCIÓN CATÁLOGO ===== */
.cursos-catalogo {
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 146, 201, 0.14) 0%, rgba(111, 146, 201, 0) 36%),
    radial-gradient(circle at 88% 24%, rgba(70, 108, 172, 0.12) 0%, rgba(70, 108, 172, 0) 34%),
    linear-gradient(180deg, #e8eef7 0%, #dde7f3 55%, #d7e1ef 100%);
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4.5rem);
}

/* ===== CABECERA DE CATEGORÍA ===== */
.cursos-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d2a5c 0%, #163d7e 60%, #1a4d98 100%);
  box-shadow: 0 10px 28px rgba(10, 30, 68, 0.18);
  position: relative;
  overflow: hidden;
}

.cursos-cat-header::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -6%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.cursos-cat-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #f9e37a;
}

.cursos-cat-copy {
  flex: 1;
}

.cursos-cat-copy h3 {
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.2rem;
}

.cursos-cat-copy p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  margin: 0;
}

.cursos-cat-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.26);
  color: #ffffffcc;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ===== TARJETAS DE CURSOS ===== */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.3rem;
}

.curso-card-v2 {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(13, 54, 114, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf3fb 100%);
  box-shadow: 0 14px 30px rgba(7, 28, 67, 0.13);
  overflow: hidden;
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
  animation: cursoCardFadeIn 0.6s ease both;
}

.curso-card-v2:hover {
  transform: translateY(-8px);
  border-color: rgba(28, 130, 255, 0.34);
  box-shadow: 0 24px 42px rgba(6, 28, 74, 0.2);
}

@keyframes cursoCardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .curso-card-v2 { animation: none; }
}

/* Imagen */
.curso-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e8f0fe;
}

.curso-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.curso-card-v2:hover .curso-card-media img {
  transform: scale(1.05);
  filter: brightness(1.06) saturate(1.08);
}

.curso-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,19,42,0) 50%, rgba(7,19,42,0.36) 100%);
  pointer-events: none;
}

.curso-card-level-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(9, 33, 80, 0.9) 0%, rgba(22, 96, 201, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 7px 18px rgba(9, 45, 99, 0.35);
}

/* Body */
.curso-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1.2rem;
}

.curso-card-body h5 {
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #0a2a57;
  line-height: 1.28;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.curso-card-v2:hover .curso-card-body h5 {
  color: #1466c7;
}

.curso-gratis-highlight {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}

.curso-card-body p {
  font-size: 0.88rem;
  color: #35527d;
  line-height: 1.52;
  margin-bottom: 0.75rem;
}

.curso-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.curso-card-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.56rem;
  border-radius: 999px;
  background: #e5eefc;
  border: 1px solid #cadcf6;
  color: #1b426f;
  font-size: 0.73rem;
  font-weight: 700;
}

.curso-card-metrics i {
  color: #1868c9;
}

.curso-card-roadmap {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #eaf2ff 0%, #dfeafb 100%);
  border: 1px solid #c8dbf6;
}

.curso-card-roadmap strong {
  display: inline-block;
  margin-bottom: 0.38rem;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2e5f97;
}

.curso-card-roadmap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.26rem;
}

.curso-card-roadmap li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.8rem;
  color: #304f78;
  line-height: 1.35;
}

.curso-card-roadmap li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  top: 0.45em;
  left: 0.1rem;
  background: linear-gradient(135deg, #ffc443 0%, #f39c12 100%);
  box-shadow: 0 0 0 3px rgba(255, 196, 67, 0.18);
}

.curso-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.curso-card-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0e336a;
}

.curso-card-price small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6a8fb7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.curso-card-btn {
  border-radius: 999px;
  padding: 0.48rem 1rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
  border: none;
  box-shadow: 0 8px 18px rgba(18, 86, 175, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  text-decoration: none;
  white-space: nowrap;
}

.curso-card-btn:hover,
.curso-card-btn:focus-visible {
  color: #ffffff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 24px rgba(18, 86, 175, 0.38);
  background: linear-gradient(135deg, #1040a0 0%, #1565c0 100%);
}

.curso-card-btn:focus-visible {
  outline: 3px solid rgba(255, 208, 86, 0.94);
  outline-offset: 2px;
}

/* ===== SEPARADOR ENTRE CATEGORÍAS ===== */
.cursos-cat-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(13, 47, 100, 0.24) 30%, rgba(13, 47, 100, 0.24) 70%, transparent 100%);
  margin: clamp(2rem, 4vw, 3.2rem) 0;
}

/* ===== EMPTY STATE ===== */
.cursos-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #5a7aaa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .cursos-hero-title {
    font-size: clamp(1.5rem, 7.5vw, 2.2rem);
  }

  .cursos-hero-lead {
    font-size: 0.95rem;
  }

  .cursos-cat-header {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .cursos-cat-badge {
    font-size: 0.7rem;
    padding: 0.26rem 0.58rem;
  }

  .cursos-grid {
    grid-template-columns: 1fr;
  }

  .curso-card-v2 {
    border-radius: 14px;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .cursos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== MODO CONFORT NOCTURNO (por hora) ===== */
body.cursos-visual-nocturno .cursos-catalogo {
  background:
    radial-gradient(circle at 16% 10%, rgba(65, 112, 178, 0.22) 0%, rgba(65, 112, 178, 0) 38%),
    radial-gradient(circle at 86% 24%, rgba(45, 79, 138, 0.2) 0%, rgba(45, 79, 138, 0) 36%),
    linear-gradient(180deg, #1b2a42 0%, #152336 58%, #111d2f 100%);
}

body.cursos-visual-nocturno .curso-card-v2 {
  border-color: rgba(153, 186, 232, 0.22);
  background: linear-gradient(180deg, #22354f 0%, #1c2d44 100%);
  box-shadow: 0 14px 30px rgba(3, 11, 22, 0.42);
}

body.cursos-visual-nocturno .curso-card-v2:hover {
  border-color: rgba(126, 182, 255, 0.5);
  box-shadow: 0 24px 42px rgba(2, 10, 20, 0.52);
}

body.cursos-visual-nocturno .curso-card-body h5 {
  color: #ddecff;
}

body.cursos-visual-nocturno .curso-card-v2:hover .curso-card-body h5 {
  color: #9fcbff;
}

body.cursos-visual-nocturno .curso-card-body p {
  color: #b7cde8;
}

body.cursos-visual-nocturno .curso-card-metrics span {
  background: #2a3f5f;
  border-color: #43648f;
  color: #d1e6ff;
}

body.cursos-visual-nocturno .curso-card-metrics i {
  color: #8ec5ff;
}

body.cursos-visual-nocturno .curso-card-roadmap {
  background: linear-gradient(135deg, #273d5b 0%, #21344d 100%);
  border-color: #446791;
}

body.cursos-visual-nocturno .curso-card-roadmap strong {
  color: #a7cdf9;
}

body.cursos-visual-nocturno .curso-card-roadmap li {
  color: #d0e1f7;
}

body.cursos-visual-nocturno .curso-card-price {
  color: #cfe6ff;
}

body.cursos-visual-nocturno .curso-card-price small {
  color: #9db7d7;
}

body.cursos-visual-nocturno .cursos-cat-sep {
  background: linear-gradient(90deg, transparent 0%, rgba(169, 199, 236, 0.34) 30%, rgba(169, 199, 236, 0.34) 70%, transparent 100%);
}
