/* ====== Reset básico ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/*Variables css*/
:root{
  --bg: #e7ebef;        /* fondo principal muy claro */
  --fg: #1f2937;        /* texto principal gris oscuro */
  --muted: #6b7280;     /* texto secundario gris medio */
  --brand: #2563eb;     /* azul limpio */
  --card: #ffffff;      /* fondo tarjetas */
  --border: #e5e7eb;    /* borde sutil gris claro */
  --radius: 12px;       /* radios suaves */
}

/*Base*/
body{
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  line-height: 1.65;
}

/*Contenedor*/
.container{
  width: min(1100px, 92vw);
  margin: 32px auto;
  padding: 0 16px;
}

/*Tipografía*/
h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; font-weight: 700; }
h1 { font-size: clamp(2rem, 2vw + 1.5rem, 3rem); }
h2 { font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem); }
h3 { font-size: clamp(1.1rem, 1vw + .9rem, 1.5rem); }
p  { margin: 0 0 1.25rem; color: var(--fg); }

/*Espaciado*/
.mt-2{ margin-top: .5rem; } .mt-4{ margin-top: 1rem; } .mt-8{ margin-top: 2rem; }
.mb-2{ margin-bottom: .5rem; } .mb-4{ margin-bottom: 1rem; } .mb-8{ margin-bottom: 2rem; }

/*Links*/
a{ color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover{ text-decoration: underline; }

/*Estilo para el título*/
.hero{
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}
.hero p{ color: var(--muted); max-width: 60ch; }


/*----------------------------------Sección cursos------------------------------------*/
.contenedor-cursos{ /* = .cards */
  display: grid;
  grid-template-columns: repeat( auto-fit, minmax(260px, 1fr) );
  gap: 18px;
}

.curso{ /* = .card */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.curso:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-color: #dbe2ea; /* un sutil cambio de borde en tema claro */
}


/*---------------------Estilos de la tabla---------------------*/
.tabla-cursos{
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
  border-radius: var(--radius);
  overflow: hidden; /* redondeo en bordes */
  box-shadow: 0 4px 10px rgba(0,0,0,.05);
}

.tabla-cursos thead{
  background: var(--brand);
  color: #fff;
  text-align: left;
}

.tabla-cursos th,
.tabla-cursos td{
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.tabla-cursos tbody tr:hover{
  background: #f3f4f6; /* gris claro en hover */
}

/* -----------------------------Estilos FAQ-------------------------- */
.faq{
  
  margin: 0 auto;
  display: grid;
  gap: .5rem; /* espacio vertical entre items */
}

/* Botón/pregunta */
.faq .faq-question{
  width: 100%;
  text-align: left;
  display: block;
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
}

/* Indicador ▾ a la derecha */
.faq .faq-question::after{
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform .2s ease, opacity .2s ease;
  opacity: .7;
}

/* Panel de respuesta */
.faq .faq-answer{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-top: -.4rem; /*Margen negativo para que el panel se pegue al de las preguntas*/
}

/* Estados visuales cuando la respuesta está visible */
.faq .faq-question:has(+ .faq-answer:not([hidden])){
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  background: #fff;
}
.faq .faq-answer:not([hidden]){
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
}

.faq .faq-question:has(+ .faq-answer:not([hidden]))::after{
  transform: translateY(-50%) rotate(180deg);
  opacity: .9;
}

/*---------------------------Estilos del Formulario----------------------------*/
.formulario{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
}

/* Layout vertical con buen espacio */
.formulario form{
  display: grid;
  gap: 14px;
}

/* Inputs, selects y textarea */
.formulario input[type="text"],
.formulario input[type="email"],
.formulario input[type="tel"],
.formulario textarea{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .9rem;
  background: #fff;
  color: var(--fg);
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Enfoque accesible y claro */
.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus{
  border-color: color-mix(in srgb, var(--brand) 55%, #ffffff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}

/* Estado inválido */
.formulario input:invalid,
.formulario textarea:invalid{
  border-color: #ef4444;
}

/* Botones base */
.boton {
   display: inline-flex;          /* centra el texto vertical/horizontal */
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .9rem 1.2rem;  
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;                /* evita que el texto se “baje” */
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  -webkit-appearance: none;       /* quita estilos nativos */
  appearance: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

/* Variante principal */
.boton-principal{
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.boton-principal:hover{
  background: color-mix(in srgb, var(--brand) 85%, black);
  transform: translateY(-1px);
}

/* Botón dentro del formulario: ancho y espaciado */
.formulario .boton-principal{
  width: 100%;                /* móvil: ancho completo */
  margin-top: .5rem;
}

@media (min-width: 640px){
  .formulario .boton-principal{
    width: auto;              /* escritorio: ajustado */
    min-width: 180px;
  }
}

/*----------------Estilos sección legal--------------------*/
.legal{
font-size: 0.75rem;
}
.legal p{
  margin: 0 0 0.5rem;
}

/* --------------------------- Modales sección cursos --------------------------- */

/* Fondo oscurecido */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 999;
}
.modal-backdrop.is-open { display: block; }

/* Contenedor del modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 1000;
}
.modal.is-open { display: grid; }

/* Cuadro del modal */
.modal__dialog {
  width: min(760px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  overflow: hidden;
}

/* Cabecera */
.modal__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.modal__title { font-size: 1.1rem; margin: 0; }

/* Botón de cierre */
.modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 6px 8px;
  color: var(--muted);
}
.modal__close:hover { color: var(--fg); }

/* Cuerpo */
.modal__body {
  padding: 16px 18px;
  overflow: auto;
}

/* Layout interno */
.modal__grid { display: grid; gap: 12px; }
.modal__grid.two { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .modal__grid.two { grid-template-columns: 1fr 1fr; }
}

/* Ajustes móviles */
@media (max-width: 720px) {
  .modal { padding: 12px; }
}

/* Ajuste de viewport moderno en móviles */
@supports (height: 100svh) {
  .modal__dialog { max-height: 85svh; }
}

/* Bloqueo de scroll en el body cuando el modal está abierto */
body.no-scroll { overflow: hidden; }


.btn{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: #f1f5f9; color: var(--fg); font-weight: 600; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0,0,0,.08); }
.btn.primary{ background: var(--brand); color: #fff; border-color: transparent; }
.btn.sm{ padding: 8px 12px; font-weight: 600;
}







