/* 3G Consulting: estilos del sitio estático.
   Colores tomados del logo y del sitio anterior. Sin fuentes externas: se usan las del sistema.
   Contrastes revisados para WCAG 2.2 AA. */

:root {
  --guinda: #6e0a11;
  --guinda-oscuro: #3f060a;
  --rojo: #a81010;
  --rojo-hover: #8a0d0d;
  --gris-logo: #bcbcbc;
  --texto: #1f1f1f;
  --texto-suave: #4a4a4a;
  --fondo: #ffffff;
  --fondo-alterno: #f7f2f1;
  --borde: #e4d9d7;
  --whatsapp: #0f7a36;
  --foco: #0b57d0;

  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --ancho: 72rem;
  --radio: 0.75rem;
  --sombra: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(63 6 10 / 8%);
  --alto-cabecera: 5.5rem;
  --alto-barra: 2.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--alto-cabecera) + 1rem);
  scroll-padding-bottom: 5rem; /* que el botón flotante no tape lo enfocado */
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
svg.icono { width: 1.25em; height: 1.25em; flex: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--guinda-oscuro);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }

a { color: var(--rojo); text-underline-offset: 0.18em; }
a:hover { color: var(--rojo-hover); }

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 40em) { .contenedor { padding-inline: 1.5rem; } }

.solo-lectores {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Saltar al contenido */
.saltar {
  position: absolute;
  left: 1rem; top: -10rem;
  z-index: 100;
  background: var(--fondo);
  color: var(--guinda);
  padding: 0.75rem 1rem;
  border-radius: var(--radio);
  font-weight: 600;
  box-shadow: var(--sombra);
}
.saltar:focus { top: 1rem; }

/* Botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.boton--primario { background: var(--rojo); color: #fff; }
.boton--primario:hover { background: var(--rojo-hover); color: #fff; }
.boton--whatsapp { background: var(--whatsapp); color: #fff; }
.boton--whatsapp:hover { background: #0b5f2a; color: #fff; }
.boton--contorno { border-color: currentColor; color: var(--rojo); background: transparent; }
.boton--contorno:hover { background: var(--fondo-alterno); }
.boton--claro { background: #fff; color: var(--guinda); }
.boton--claro:hover { background: var(--fondo-alterno); color: var(--guinda); }
.boton--contorno-claro { border-color: #fff; color: #fff; background: transparent; }
.boton--contorno-claro:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.boton--aula { background: var(--guinda); color: #fff; }
.boton--aula:hover { background: var(--guinda-oscuro); color: #fff; }

.botones { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.botones--centro { justify-content: center; }
.tarjeta > .boton { align-self: flex-start; margin-top: auto; }

/* Barra superior */
.barra-superior { background: var(--guinda); color: #fff; font-size: 0.9rem; }
.barra-superior__fila { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.barra-superior a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: var(--alto-barra);
  color: #fff; text-decoration: none;
}
.barra-superior a:hover { text-decoration: underline; color: #fff; }
.barra-superior :focus-visible { outline-color: #fff; }
.solo-amplio { display: none !important; }
@media (min-width: 40em) { .solo-amplio { display: inline-flex !important; } }

/* Cabecera y menú */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 97%);
  border-bottom: 1px solid var(--borde);
}
.cabecera__fila {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem 1rem;
  min-height: var(--alto-cabecera);
  padding-block: 0.5rem;
}
.marca img { width: 9.5rem; height: auto; }
@media (min-width: 40em) { .marca img { width: 10.625rem; } }

.menu-boton { display: none; }
.menu__lista {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem;
}
.menu__enlace {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0.25rem 0.6rem;
  color: var(--texto); font-weight: 600; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.menu__enlace:hover { color: var(--rojo); }
.menu__enlace[aria-current] { color: var(--guinda); border-bottom-color: var(--rojo); }

/* En pantallas angostas el menú se pliega solo si el JS cargó; sin JS queda visible. */
@media (max-width: 59.99em) {
  .js .menu-boton {
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 2.75rem; padding: 0.5rem 1rem;
    border: 2px solid var(--guinda); border-radius: 999px;
    background: #fff; color: var(--guinda);
    font: 600 1rem/1 var(--sans); cursor: pointer;
  }
  .js .menu-boton[aria-expanded="true"] { background: var(--guinda); color: #fff; }
  .menu { flex-basis: 100%; }
  /* Con el menú abierto en una pantalla baja (celular apaisado, zoom al 400 %),
     el menú se desplaza por dentro para que ningún enlace quede fuera de la vista. */
  .js .menu.abierto { max-height: calc(100vh - var(--alto-barra) - var(--alto-cabecera) - 1rem); max-height: calc(100dvh - var(--alto-barra) - var(--alto-cabecera) - 1rem); overflow-y: auto; overscroll-behavior: contain; }
  .js .menu:not(.abierto) { display: none; }
  .menu__lista { flex-direction: column; align-items: stretch; padding-bottom: 0.75rem; }
  .menu__enlace { width: 100%; border-bottom: 1px solid var(--borde); }
  .menu__enlace[aria-current] { border-bottom: 1px solid var(--borde); box-shadow: inset 4px 0 0 var(--rojo); padding-left: 1rem; }
  .boton--aula { margin-top: 0.75rem; }
}

/* Migas */
.migas ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.95rem; }
.migas li + li::before { content: "›"; content: "›" / ""; margin-right: 0.35rem; color: inherit; opacity: 0.8; }
.migas a { color: inherit; }

/* Portada: héroe con foto real */
.heroe {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: clamp(28rem, 72vh, 40rem);
  display: flex; align-items: center;
  overflow: hidden;
}
.heroe__foto, .heroe__foto img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  z-index: -2;
}
.heroe::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgb(63 6 10 / 92%) 0%, rgb(63 6 10 / 82%) 55%, rgb(63 6 10 / 70%) 100%);
}
.heroe__texto { padding-block: 3.5rem; max-width: 46rem; }
.heroe h1 { color: #fff; margin-bottom: 0.4em; }
.heroe .antetitulo { color: #fff; }
.heroe__lema { font: italic 1.35rem/1.4 var(--serif); margin-bottom: 0.75rem; }
.heroe :focus-visible { outline-color: #fff; }

.antetitulo {
  display: block;
  font: 700 0.85rem/1.3 var(--sans);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 0.75rem;
}

/* Secciones */
.seccion { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.seccion--alterna { background: var(--fondo-alterno); }
.seccion__cabeza { max-width: 44rem; margin-bottom: 2.25rem; }
.seccion__cabeza--centro { margin-inline: auto; text-align: center; }
.entrada { font-size: 1.15rem; color: var(--texto-suave); }

.rejilla { display: grid; gap: 1.5rem; }
@media (min-width: 40em) { .rejilla--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48em) { .rejilla--3 { grid-template-columns: repeat(3, 1fr); } }

.tarjeta {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--sombra);
  display: flex; flex-direction: column;
}
.tarjeta p { color: var(--texto-suave); }
.tarjeta > :last-child { margin-bottom: 0; }
.tarjeta__icono {
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fondo-alterno); color: var(--guinda);
  margin-bottom: 1.1rem;
}
.tarjeta__icono svg.icono { width: 1.6rem; height: 1.6rem; }
.tarjeta__enlace { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; min-height: 2.75rem; }

.dividido { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56em) { .dividido { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.foto-redondeada { border-radius: var(--radio); box-shadow: var(--sombra); }
@media (min-width: 56em) { .dividido--invertido > :first-child { order: 2; } }

.lista-check { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.lista-check li { display: flex; gap: 0.65rem; align-items: flex-start; }
.lista-check svg.icono { color: var(--rojo); margin-top: 0.2rem; }

/* Aliados */
.aliados { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.aliados a {
  display: block; padding: 1rem 1.25rem;
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
}
.aliados a:hover { border-color: var(--rojo); }
.aliados img { width: 15rem; }

/* Llamado final */
.llamado {
  background: linear-gradient(120deg, var(--guinda-oscuro), var(--guinda));
  color: #fff;
  border-radius: calc(var(--radio) * 1.5);
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  text-align: center;
}
.llamado h2 { color: #fff; }
.llamado p { max-width: 40rem; margin-inline: auto; }
.llamado .botones { justify-content: center; }
.llamado :focus-visible { outline-color: #fff; }

/* Cabecera de páginas interiores */
.pagina-cabecera {
  background: linear-gradient(120deg, var(--guinda-oscuro), var(--guinda));
  color: #fff;
  padding-block: 2.5rem 3rem;
}
.pagina-cabecera h1 { color: #fff; margin-bottom: 0.3em; }
.pagina-cabecera p { max-width: 46rem; font-size: 1.15rem; margin: 0; }
.pagina-cabecera :focus-visible { outline-color: #fff; }

/* Equipo */
.equipo { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.persona { text-align: center; padding: 2rem 1.25rem; }
.persona img { width: 10rem; height: 10rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1.1rem; border: 4px solid var(--fondo-alterno); }
.persona h3 { font-size: 1.15rem; margin-bottom: 0.35em; }
.persona p { font-size: 0.98rem; }

/* Cursos */
.cursos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.curso {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 0.75rem 0.75rem 0.75rem 1.1rem;
}
.curso__nombre { font-weight: 600; line-height: 1.35; }
.curso__accion {
  display: inline-flex; align-items: center; gap: 0.35rem; flex: none;
  min-height: 2.75rem; padding: 0.4rem 0.8rem;
  border-radius: 999px; background: var(--fondo-alterno);
  color: #0b6b2f; font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.curso__accion:hover { background: #e7efe9; color: #08551f; }
.grupo-cursos + .grupo-cursos { margin-top: 2.5rem; }
.nota { color: var(--texto-suave); font-size: 0.98rem; margin-top: 1rem; }

/* Galería */
.galeria { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40em) { .galeria { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .galeria { grid-template-columns: repeat(3, 1fr); } }
.galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); }
.galeria img.arriba { object-position: center 35%; }

/* Contacto */
.contacto-tarjeta h2 { font-size: 1.35rem; }
.contacto-tarjeta .boton { margin-top: auto; align-self: flex-start; }
.dato-grande { font-size: 1.2rem; font-weight: 600; color: var(--texto); overflow-wrap: anywhere; }

/* Preguntas frecuentes */
.preguntas { max-width: 50rem; }
.pregunta { border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; }
.pregunta + .pregunta { margin-top: 0.75rem; }
.pregunta summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; min-height: 2.75rem;
  font: 400 1.2rem/1.35 var(--serif); color: var(--guinda-oscuro);
}
.pregunta summary::-webkit-details-marker { display: none; }
.pregunta summary::after { content: "+"; content: "+" / ""; font: 400 1.6rem/1 var(--sans); color: var(--rojo); }
.pregunta[open] summary::after { content: "–"; content: "–" / ""; }
.pregunta__respuesta { padding: 0 1.25rem 1.1rem; color: var(--texto-suave); }
.pregunta__respuesta > :last-child { margin-bottom: 0; }

/* Noticias */
.noticia-tarjeta { padding: 0; overflow: hidden; }
.noticia-tarjeta img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.noticia-tarjeta__cuerpo { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.noticia-tarjeta h2 { font-size: 1.4rem; }
.noticia-tarjeta h2 a { color: inherit; text-decoration: none; }
.noticia-tarjeta h2 a:hover { text-decoration: underline; }
.fecha { color: var(--texto-suave); font-size: 0.95rem; margin-bottom: 0.75rem; }
.pagina-cabecera .fecha { color: #fff; margin: 0.75rem 0 0; }
.articulo { max-width: 46rem; }
.articulo figure { margin: 2rem 0; }
.articulo figcaption { color: var(--texto-suave); font-size: 0.95rem; margin-top: 0.5rem; }
.articulo .destacado { font: italic 1.3rem/1.5 var(--serif); color: var(--guinda-oscuro); }

/* Página 404 */
.error-404 { text-align: center; padding-block: 5rem; }

/* Pie */
.pie { background: #1c0d0e; color: #eadede; margin-top: 0; padding-top: 3.5rem; padding-bottom: 5rem; }
.pie a { color: #fff; }
.pie a:hover { color: #ffd9d9; }
.pie :focus-visible { outline-color: #fff; }
.pie__rejilla { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.pie__rejilla > * { min-width: 0; }
@media (min-width: 64em) { .pie__rejilla { grid-template-columns: 1.1fr 0.8fr 1.5fr 0.8fr; } }
.pie__titulo { font: 700 0.85rem/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.pie__lema { font: italic 1.05rem/1.4 var(--serif); color: #fff; }
.pie__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.pie__lista a { display: inline-block; padding-block: 0.2rem; }
.pie__lista a, .pie__lista span { overflow-wrap: anywhere; }
.pie__lista--iconos li { display: flex; align-items: flex-start; gap: 0.6rem; }
.pie__lista--iconos li > :last-child { min-width: 0; }
.pie__lista--iconos svg.icono { margin-top: 0.3rem; color: var(--gris-logo); }
.pie__lista--iconos span { padding-top: 0.15rem; }
.pie__base { border-top: 1px solid rgb(255 255 255 / 15%); margin-top: 2.5rem; padding-top: 1.25rem; font-size: 0.95rem; }
.pie__base p { margin: 0; }

/* Botón flotante de WhatsApp */
.wa-flotante {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--whatsapp); color: #fff;
  box-shadow: 0 4px 14px rgb(0 0 0 / 25%);
}
.wa-flotante:hover { background: #0b5f2a; color: #fff; }
.wa-flotante svg.icono { width: 1.75rem; height: 1.75rem; }

@media print {
  .barra-superior, .menu, .menu-boton, .wa-flotante, .saltar { display: none !important; }
  .cabecera { position: static; }
  .heroe, .pagina-cabecera, .llamado { background: none; color: #000; }
  .heroe::after, .heroe__foto { display: none; }
  .heroe h1, .pagina-cabecera h1, .llamado h2 { color: #000; }
}

@media (forced-colors: active) {
  .boton, .curso__accion, .menu-boton { border: 2px solid ButtonText; }
  .heroe::after { background: Canvas; }
}
