/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ********************************************* */
/* VARIABLES */
/* ********************************************* */
:root {
  --verde-principal: #cacc2b;
  --verde-secundario: #28a745;
  --verde-oscuro: #1e7e34;
  --claro: #f8f9fa;
  --texto: #333;
  --max-width: 1200px;
}


/* ********************************************* */
/* BASE */
/* ********************************************* */
body {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 400;
  color: var(--texto);
  background: white;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Atma', 'system-ui', sans-serif;
  font-weight: 600;

}

p {
  font-size: 1.0rem;
}

.parrafo-footer {
  font-size: 1rem;
  color: black;
}

img {
  max-width: 100%;
  display: block;
}



/* ********************************************* */
/* NAV */
/* ********************************************* */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav__inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.nav__logo img {
  width: 160px;
  height: auto;
  transition: transform 0.3s ease;
}

.nav__logo:hover img {
  transform: scale(1.05);
}

/* MENU ESCRITORIO */
.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* LINKS */
.nav__link {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: #222;
  letter-spacing: 0.3px;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--verde-secundario);
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: var(--verde-secundario);
}

.nav__link:hover::after {
  width: 100%;
}

/* CARRITO */
.nav__carrito {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(40, 167, 69, 0.1);
}

.nav__carrito:hover {
  background: rgba(40, 167, 69, 0.2);
}

/* BOTÓN HAMBURGUESA (OCULTO POR DEFECTO) */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
}

/* NAV MÓVIL */
@media (max-width: 768px) {

  .nav__toggle {
    display: block;
    cursor: pointer;
  }

  .nav__menu {
    position: absolute;
    top: 100%;
    right: 1rem;
    background: white;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    display: none;
  }

  .nav__menu.activo {
    display: flex;
  }
}


/* ********************************************* */
/* SECCIONES */
/* ********************************************* */

.section {
  width: 100%;
  padding: 4rem 1rem;
}

.section__inner {
  max-width: var(--max-width);
  margin: auto;
}

.section--verde {
  background: var(--verde-principal);
}

.section--claro {
  background: var(--claro);
}

.section--degradado {
  background: linear-gradient(135deg, #cacc2b, #f9f871);
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}


/* ********************************************* */
/* HERO */
/* ********************************************* */

.hero {
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.hero span {
  color: var(--verde-secundario);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}





/* ********************************************* */
/* BOTONES */
/* ********************************************* */
.btn-principal {
  min-width: 130px;
  height: 40px;
  color: #fff;
  padding: 5px 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  border-radius: 20px;
  border: 2px solid #ff0a78;
  background: #ff0a78;
  text-decoration: none;
}


.btn-principal:hover {
  background: #fff;
  color: #ff0a78;
}


/* BOTÓN SUBIR */
#btnSubir {
  position: fixed;

  inset: auto 20px 20px auto;
  /* equivale a:
     top: auto;
     right: 20px;
     bottom: 20px;
     left: auto;
  */

  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;

  background: var(--verde-secundario);
  color: rgb(238, 233, 233);
  font-size: 22px;

  display: none;
  cursor: pointer;
  z-index: 9999;
}






/* ********************************************* */
/* CURSOS */
/* ********************************************* */



.titulo-seccion {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
}

.grid-cursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

/* CARD */
.curso {
  background: white;
  border-radius: 20px;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
  transition: transform .4s ease, box-shadow .4s ease;
}

.curso:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .15);
}

/* CONTENEDOR DE IMAGEN */
.curso__media {
  aspect-ratio: 4 / 5;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* IMAGEN */
.curso__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .5s ease;
}

.curso:hover .curso__media img {
  transform: scale(1.04);
}

/* TEXTO */
.curso h3 {
  padding: 1.2rem 1.5rem 0.5rem;
}

.curso p {
  padding: 0 1.5rem 1.2rem;
  font-size: 0.95rem;
  color: #555;
  flex-grow: 1;
  
}


.btn-ver-mas {
  display: inline-block;
  text-align: center;
  margin: 0 1.5rem 1.5rem;
  padding: 0.5rem 1rem;
  background-color: #ff0a78;
  color: #ffffff;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  border: 1px solid #ff0a78;
}

.btn-ver-mas:hover {
  background: #fff;
  color: #ff0a78;
}







/* ********************************************* */
/* SECCION PRIMERA CLASE GRATUITA */
/* ********************************************* */
.clase-gratis__texto .titulo-seccion {
  margin-bottom: 1rem;
  /* antes era 3rem */
}

.clase-gratis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.clase-gratis__texto {
  max-width: 520px;
}

.lista-beneficios {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.lista-beneficios li {
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  position: relative;
}

.lista-beneficios li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--verde-oscuro);
  font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .clase-gratis {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .clase-gratis__texto {
    margin: 0 auto;
  }
}

.img-destacada {
  max-width: 420px;
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.img-destacada:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.section--verde .section__inner {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 32px;
  padding: 3rem 2rem;
}

.clase-gratis__texto .btn-principal {
  align-self: center;
  margin-top: 1.5rem;
}




/* ********************************************* */
/* OPINIONES */
/* ********************************************* */

.opiniones {
  display: grid;
  gap: 2rem;
}

/* PRIMERA VERSIÓN en lineas*/




/* SEGUNDA VERSIÓN  en grilla*/
/* .opiniones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}  */


/* TERCERA VERSIÓN */

.opiniones blockquote {
  background: white;
  padding: 2rem;
  border-left: 5px solid var(--verde-principal);
}

.opiniones blockquote:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.opiniones blockquote {
  display: flex;
  flex-direction: column;
}

.opiniones span {
  margin-top: auto;
  padding-top: 1.5rem;
}


/* FOOTER */
.footer {
  background: var(--verde-principal);
  padding: 2rem 1rem;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ICONOS A LA DERECHA */
.footer__redes {
  display: flex;
  gap: 1rem;
}

.footer__redes img {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer__redes a:hover img {
  transform: scale(1.1);
  opacity: 0.8;
}

/* ENLACE LEGAL */
.footer__inner>a {
  font-size: 0.9rem;
  color: black;
  text-decoration: none;
}





/* ********************************************* */
/* RESPONSIVE NAV */
/* ********************************************* */

@media (max-width: 768px) {
  .nav__menu {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 100%;
    right: 1rem;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
  }

  .nav__toggle {
    display: block;
  }
}




/* ********************************************* */
/* CARRITO MODAL */
/* ********************************************* */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;

  overflow-y: auto;          /* 🔑 PERMITE SCROLL */
  padding: 2rem 0;           /* 🔑 espacio arriba y abajo */
}

.modal.activo {
  display: block;
}


.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal__contenido {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  margin: auto;

  max-height: calc(100vh - 4rem); /* 🔑 CLAVE */
  overflow-y: auto;               /* 🔑 CLAVE */

  position: relative;
  z-index: 1001;
}


@media (max-height: 700px) {
  .modal__contenido {
    margin: 2rem auto;
    padding: 1.5rem;
  }
}


.carrito__acciones {
  display: flex;
  justify-content: center;  
  gap: 1rem;
  margin-top: 2rem;
}
.btn-secundario {
  min-width: 130px;
  height: 40px;
  color: #fff;
  padding: 5px 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
  outline: none;
  border-radius: 20px;
  border: 2px solid #ff0a0a;
  background: #ee0404;
  text-decoration: none;
}
.btn-principal,
.btn-secundario,
.btn-ver-mas {
  display: inline-flex;           
  align-items: center;            /* vertical */
  justify-content: center;        /* horizontal */
  line-height: 1;                 /* evita desplazamientos */
}


.btn-secundario:hover {
  background: #f1f1f1;
  color: #333;
}
.btn-modal {
  padding: 0.6rem 1rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  background: var(--verde-secundario);
  color: white;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-modal:hover {
  background: var(--verde-oscuro);
  transform: translateY(-2px);
}

/* COMPRAS */
.compras {
  margin-top: 3rem;
}

.compra {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.compra h3 {
  margin-bottom: 0.5rem;
}

.compra ul {
  list-style: none;
  padding: 0;
}

.compra li {
  padding: 0.2rem 0;
}

.btn-modal:hover {
  background: var(--verde-oscuro);
  transform: translateY(-2px);
}
.modal__contenido h2 {
  margin-bottom: 1rem;
}

.modal__total {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.modal__cerrar {
  margin-top: 1.5rem;
  background: none;
  border: none;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}

.modal__cerrar:hover {
  text-decoration: underline;
}
.section--carrito {
  background: var(--claro);
}





/* POLÍTICA DE PRIVACIDAD */

.politica {
  max-width: 800px;
  margin: 0 auto;
}

.politica h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

.politica p {
  margin-bottom: 1rem;
  color: #444;
}

.politica ul {
  margin: 1rem 0 1.5rem 1.2rem;
}

.politica li {
  margin-bottom: 0.4rem;
}

.politica a {
  color: var(--verde-secundario);
  font-weight: 600;
  text-decoration: none;
}

.politica a:hover {
  text-decoration: underline;
}



/* PRUEBA GRATUITA */
/* FORMULARIO MODAL */

.formulario {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.formulario label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 0.9rem;
}

.formulario input,
.formulario textarea {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.formulario__check {
  border: none;
  padding: 0;
}

.formulario__check label {
  display: block;
  margin-bottom: 0.3rem;
}

.formulario__acciones {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}


.checkbox-legal {
  display: flex;
  flex-direction: row-reverse;   /* checkbox a la derecha */
  justify-content: center;
  align-items: center;
  gap: 0.6rem;

  font-size: 0.85rem;
  white-space: nowrap;           /* 🔑 todo en una sola línea */
}

.checkbox-legal input {
  margin: 0;
  flex-shrink: 0;
}

.checkbox-legal a {
  color: var(--verde-secundario);
  font-weight: 600;
  text-decoration: none;
}

.checkbox-legal a:hover {
  text-decoration: underline;
}

/* TABLA ADMIN - MEJOR LEGIBILIDAD */

.tabla-carrito {
  width: 100%;
  border-collapse: separate; /* 🔑 permite separación */
  border-spacing: 0 10px;    /* 🔑 espacio entre filas */
}
.tabla-carrito td a {
  min-width: 80px;
}


.tabla-carrito thead th {
  padding: 1rem 1.2rem;
  text-align: left;
  background: var(--claro);
  font-weight: 600;
}

.tabla-carrito tbody td {
  padding: 1rem 1.2rem; /* 🔑 más aire */
  background: white;
  vertical-align: top;
}

/* Fila tipo tarjeta */
.tabla-carrito tbody tr {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border-radius: 12px;
}

/* Redondear esquinas */
.tabla-carrito tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
}

.tabla-carrito tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

/* Hover suave */
.tabla-carrito tbody tr:hover {
  transform: translateY(-2px);
  transition: 0.2s ease;
}


/* ver contraseña */
.toggle-password {
  margin-top: 0.3rem;
  background: none;
  border: none;
  color: var(--verde-secundario);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}


/* =========================================
   SELECTOR DE PACKS DE CURSOS
   ========================================= */

.selector-pack__wrapper {
  position: relative;
  border: 2px solid var(--verde-principal);
  border-radius: 12px;
  background: #fff;
}

.selector-pack__wrapper:hover {
  border-color: var(--verde-secundario);
}

.selector-pack__wrapper select {
  width: 100%;
  padding: 0.8rem 1rem;
  padding-right: 3rem;
  border: none;
  background: transparent;
  appearance: none;
  font-family: inherit;
  cursor: pointer;
}

.selector-pack__icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.2rem;
  color: var(--verde-principal);
}

.selector-pack__wrapper:focus-within {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
  border-color: var(--verde-secundario);
}

