*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f5f7fb;
  color: #1f2937;
}

/* HERO */

.curso-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  padding: 6rem 8%;
  background: radial-gradient(circle at top left, #0f172a, #020617);
  color: white;
  align-items: center;
}

.curso-badge {
  display: inline-block;
  background: #2563eb;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.curso-hero h1 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  font-weight: 800;
}

.curso-descripcion {
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.curso-beneficios {
  list-style: none;
  margin-bottom: 2rem;
}

.curso-beneficios li {
  margin-bottom: 0.6rem;
  color: #e2e8f0;
}

/* BOTON */

.btn-whatsapp {
  display: inline-block;
  background: linear-gradient(135deg,#25D366,#1da851);
  color: white;
  padding: 0.95rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 25px rgba(37,211,102,0.35);
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(37,211,102,0.45);
}

.btn-whatsapp.grande {
  font-size: 1.1rem;
}

/* IMAGEN HERO PREMIUM */

.curso-hero-imagen {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: 26px;
  overflow: hidden;
  margin-left: auto;
  background: linear-gradient(135deg,#020617,#0f172a);
  box-shadow:
    0 35px 70px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  animation: float 6s ease-in-out infinite;
}

.curso-hero-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay cinematográfico */

.curso-hero-imagen::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(2,6,23,0.55), rgba(2,6,23,0.05));
  pointer-events:none;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

/* CONTENIDO */

.curso-contenido {
  padding: 5rem 8%;
}

.curso-contenido h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.contenido-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.contenido-item {
  background: white;
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.contenido-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* INFO */

.curso-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 3rem 8%;
  background: #eef2ff;
}

.info-box {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* CTA FINAL */

.curso-cta {
  padding: 5rem 8%;
  background: linear-gradient(135deg,#0f172a,#020617);
  color: white;
  text-align: center;
}

.curso-cta p {
  margin: 1rem 0 2rem;
  color: #cbd5e1;
}

/* FOOTER */

.curso-footer {
  text-align: center;
  padding: 1.5rem;
  background: #020617;
  color: #94a3b8;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .curso-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .curso-hero-imagen {
    margin: auto;
    order: -1;
  }
}



/* CONTENEDOR DE IMAGENES DE CURSOS (FORMATO UNIFICADO) */
.curso-hero-imagen{
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;   /* todas las imágenes tendrán misma proporción */
  border-radius: 26px;
  overflow: hidden;
  margin-left: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* IMAGEN */
.curso-hero-imagen img{
  width: 100%;
  height: 100%;
  object-fit: cover;   /* recorta automáticamente sin deformar */
  transition: transform 0.5s ease;
}

/* EFECTO HOVER PREMIUM */
.curso-hero-imagen:hover img{
  transform: scale(1.05);
}

/* ===============================
   GRID GENERAL DE CURSOS
================================*/
.cursos-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap:2rem;
  padding:4rem 8%;
}

/* TARJETA CURSO */
.curso-card{
  background:#ffffff;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,0.08);
  transition:transform .35s ease, box-shadow .35s ease;
}

.curso-card:hover{
  transform:translateY(-8px);
  box-shadow:0 20px 45px rgba(0,0,0,0.15);
}

/* CONTENEDOR IMAGEN UNIFICADO */
.curso-card-img{
  width:100%;
  aspect-ratio: 4 / 3;
  overflow:hidden;
}

.curso-card-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease;
}

.curso-card:hover .curso-card-img img{
  transform:scale(1.06);
}

/* CONTENIDO TARJETA */
.curso-card-body{
  padding:1.6rem;
}

.curso-card-body h3{
  margin-bottom:.6rem;
  font-size:1.2rem;
}

.curso-card-body p{
  color:#6b7280;
  font-size:.95rem;
  margin-bottom:1.2rem;
}

.curso-card-btn{
  display:inline-block;
  background:#2563eb;
  color:#fff;
  padding:.6rem 1.4rem;
  border-radius:25px;
  text-decoration:none;
  font-weight:600;
}
/* ===== CARRITO ===== */
.btn-carrito {
  background: #2563eb;
  color: white;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1rem;
}

.btn-carrito:hover {
  background: #1d4ed8;
}

.carrito-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #0f172a;
  color: white;
  padding: 14px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 999;
}

.carrito-float span {
  background: #2563eb;
  border-radius: 50%;
  padding: 3px 8px;
  font-size: 0.8rem;
  margin-left: 6px;
}

.carrito-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 340px;
  height: 100%;
  background: white;
  padding: 2rem;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  transition: right 0.4s ease;
  z-index: 1000;
}

.carrito-panel.activo {
  right: 0;
}

.carrito-panel h3 {
  margin-bottom: 1rem;
}

#carrito-lista {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}

#carrito-lista li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.carrito-total {
  font-weight: bold;
  margin: 1rem 0;
}

.cerrar-carrito {
  background: #e5e7eb;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}
