/* ═══════════════════════════════════════════
   CURSOS VACACIONALES — cursos.css
   Usa las variables de index.css como base
═══════════════════════════════════════════ */

/* ── Nav link activo (mismo patrón que tienda.css) ── */
.navbar ul li a.nav-link {
  position: relative;
  color: var(--accent);
  font-weight: 600;
  border: 1.5px solid var(--accent);
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
  overflow: hidden;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.navbar ul li a.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 4px;
}

.navbar ul li a.nav-link:hover::before {
  transform: scaleX(1);
}

.navbar ul li a.nav-link:hover {
  color: var(--nav-bg);
  box-shadow: 0 4px 14px rgba(0, 86, 179, 0.25);
  transform: translateY(-1px);
}

body.dark-mode .navbar ul li a.nav-link:hover {
  color: #000;
  box-shadow: 0 4px 14px rgba(0, 255, 255, 0.2);
}

.navbar ul li a.nav-link.nav-active {
  background: var(--accent);
  color: var(--nav-bg) !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(0, 86, 179, 0.2);
}

body.dark-mode .navbar ul li a.nav-link.nav-active {
  color: #000 !important;
  box-shadow: 0 3px 10px rgba(0, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .navbar ul li a.nav-link {
    border: none;
    padding: 0.75rem 0;
    border-radius: 0;
    overflow: visible;
    transform: none !important;
    box-shadow: none !important;
  }

  .navbar ul li a.nav-link::before {
    display: none;
  }

  .navbar ul li a.nav-link:hover {
    color: var(--accent);
    background: transparent;
  }

  .navbar ul li a.nav-link.nav-active {
    background: transparent;
    color: var(--accent) !important;
    box-shadow: none;
  }
}

/* ══════════════════════════════════════════
   HERO CURSOS (mismo banner + efecto neón que header.hero de index.css)
══════════════════════════════════════════ */
.cursos-hero {
  position: relative;
  text-align: center;
  padding: 8rem 2rem;
  background-image: url(assets/Banner2.webp);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}

.cursos-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(255 255 255 / .35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
  z-index: 1;
}

body.dark-mode .cursos-hero::before {
  background-color: rgb(6 7 9 / .46);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(8px);
}

.cursos-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cursos-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.2);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode .cursos-hero-tag {
  background: rgba(0, 255, 255, 0.07);
  border-color: rgba(0, 255, 255, 0.2);
}

.cursos-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.1;
  color: var(--neon-color);
  text-shadow: var(--neon-glow);
  animation: flicker 1.5s infinite alternate;
}

body.dark-mode .cursos-hero h1 {
  color: var(--accent);
  text-shadow: var(--glow);
  animation: none;
}

.cursos-hero-sub {
  font-size: 1.05rem;
  color: var(--text-color);
  opacity: .85;
  margin: 0 auto;
}

body.dark-mode .cursos-hero-sub {
  color: #e0e0e0;
  opacity: 1;
}

/* ══════════════════════════════════════════
   GRID DE CURSOS
══════════════════════════════════════════ */
.cursos-grid-section {
  max-width: 1100px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.curso-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.curso-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 15px 30px rgba(0, 86, 179, 0.12);
}

body.dark-mode .curso-card:hover {
  box-shadow: 0 15px 30px rgba(0, 255, 255, 0.1);
}

.curso-imagen {
  position: relative;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 86, 179, 0.06);
  border-bottom: 1px solid var(--border);
}

body.dark-mode .curso-imagen {
  background: rgba(0, 255, 255, 0.05);
}

.curso-imagen i {
  font-size: 3.5rem;
  color: var(--accent);
  margin: 0;
}

/* Foto real del curso: se coloca encima del ícono de reemplazo.
   Si el archivo no existe todavía, el onerror del <img> la oculta
   y queda visible el ícono de fondo. */
.curso-imagen-foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curso-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.curso-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

body.dark-mode .curso-badge {
  background: rgba(0, 255, 255, 0.07);
  border-color: rgba(0, 255, 255, 0.2);
}

/* Colores por nivel */
.curso-badge.badge-verde {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
}

.curso-badge.badge-amarillo {
  color: #ca8a04;
  background: rgba(202, 138, 4, 0.1);
  border-color: rgba(202, 138, 4, 0.3);
}

.curso-badge.badge-rojo {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
}

body.dark-mode .curso-badge.badge-verde {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
}

body.dark-mode .curso-badge.badge-amarillo {
  color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  border-color: rgba(250, 204, 21, 0.25);
}

body.dark-mode .curso-badge.badge-rojo {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
}

.curso-info h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 0;
}

body.dark-mode .curso-info h3 {
  color: var(--accent);
}

.curso-descripcion {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

body.dark-mode .curso-descripcion {
  color: #aaa;
}

.curso-detalles {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.85;
}

.curso-detalles li i {
  color: var(--accent);
  width: 1.1em;
}

.btn-inscribirse {
  margin-top: 0.6rem;
  width: 100%;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: none;
  background-color: #25D366;
  color: #fff;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s, opacity 0.2s;
}

.btn-inscribirse:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

body.dark-mode .btn-inscribirse {
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.5);
  border: 1px solid #1f2937;
}

/* ══════════════════════════════════════════
   CTA FINAL
══════════════════════════════════════════ */
.cursos-cta {
  max-width: 700px;
  margin: 0 auto 5rem;
  padding: 2.5rem 2rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.cursos-cta h2 {
  margin-bottom: 0.6rem;
}

.cursos-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 6px;
}

.faq-item h3 i {
  color: var(--accent);
  margin: 0;
}

.faq-item p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

body.dark-mode .faq-item p {
  color: #aaa;
}

.faq-item ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.faq-item li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.8rem;
}

body.dark-mode .faq-item li {
  color: #aaa;
}

.cursos-cta-final {
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cursos-grid-section {
    margin: 4rem auto;
  }
}

@media (max-width: 768px) {
  .cursos-hero {
    padding: 3rem 1.5rem;
  }

  .cursos-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.5rem);
  }

  .cursos-grid-section {
    margin: 3rem auto;
    padding: 0 1rem;
  }

  .cursos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cursos-cta {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .curso-imagen {
    height: 130px;
  }

  .curso-imagen i {
    font-size: 2.8rem;
  }

  .curso-info {
    padding: 1.2rem;
  }
}
