/* REDGK · componentes
   El sistema completo son ~12 piezas. Las paginas se arman con estas,
   no se disena cada pagina por separado. */

/* ---------- Cabecera ---------- */
.redgk-cabecera {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--wp--custom--superficie--base) 92%, transparent);
  border-bottom: 1px solid var(--wp--custom--borde--sutil);
  backdrop-filter: saturate(140%) blur(8px);
}
.redgk-cabecera__interior {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--wp--preset--spacing--30);
  min-height: 72px;
}
.redgk-marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; }

/* WordPress imprime el logo con sus propias clases, no con las del tema:
   si solo se limita .redgk-marca img, el logo sale a tamano original. */
.redgk-marca img,
.redgk-cabecera .custom-logo-link,
.redgk-cabecera .wp-block-site-logo a {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.redgk-marca img,
.redgk-cabecera .custom-logo,
.redgk-cabecera .custom-logo-link img,
.redgk-cabecera .wp-block-site-logo img {
  max-height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.redgk-pie .custom-logo,
.redgk-pie .custom-logo-link img { max-height: 40px; width: auto; }
.redgk-marca__texto {
  font-family: var(--wp--preset--font-family--titulo);
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 600; letter-spacing: -.02em;
  color: var(--wp--custom--texto--principal);
}

/* ---------- Navegacion ---------- */
.redgk-nav ul { display: flex; gap: var(--wp--preset--spacing--30); list-style: none; margin: 0; padding: 0; }
.redgk-nav li { margin: 0; }
.redgk-nav a {
  display: inline-block; padding: .4rem 0;
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 500; text-decoration: none;
  color: var(--wp--custom--texto--secundario);
  border-bottom: 2px solid transparent;
}
.redgk-nav a:hover,
.redgk-nav .current-menu-item > a {
  color: var(--wp--custom--texto--principal);
  border-bottom-color: var(--wp--custom--acento--marca);
}
.redgk-menu-boton {
  display: none; background: none; border: 1px solid var(--wp--custom--borde--control);
  border-radius: var(--wp--custom--radio--md); padding: .5rem .75rem; cursor: pointer;
  font: inherit; font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--custom--texto--principal);
}
@media (max-width: 860px) {
  .redgk-menu-boton { display: block; }
  .redgk-nav { display: none; width: 100%; }
  .redgk-nav[data-abierto="true"] { display: block; }
  .redgk-nav ul { flex-direction: column; gap: 0; padding-block: var(--wp--preset--spacing--20); }
  .redgk-nav a { padding: .7rem 0; border-bottom: 1px solid var(--wp--custom--borde--sutil); }
  .redgk-cabecera__interior { flex-wrap: wrap; }
}

/* ---------- Botones ---------- */
.redgk-boton {
  display: inline-block;
  padding: .8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--wp--custom--radio--md);
  font-weight: 500; font-size: var(--wp--preset--font-size--sm);
  text-decoration: none; cursor: pointer;
  transition: background var(--wp--custom--transicion--rapida), border-color var(--wp--custom--transicion--rapida);
}
.redgk-boton--primario {
  background: var(--wp--custom--acento--acciones);
  color: var(--wp--preset--color--blanco);
}
.redgk-boton--primario:hover {
  background: var(--wp--preset--color--azul-700);
  color: var(--wp--preset--color--blanco);
}
.redgk-boton--secundario {
  background: transparent;
  color: var(--wp--custom--texto--principal);
  border-color: var(--wp--custom--borde--control);
}
.redgk-boton--secundario:hover { border-color: var(--wp--custom--texto--principal); }
/* El cian de REDGK rinde 7.11:1 sobre blanco y 8.79:1 sobre fondo profundo:
   a diferencia del dorado de ICA, sirve en cualquiera de los dos. */
.redgk-boton--acento {
  background: var(--wp--custom--acento--marca);
  color: var(--wp--preset--color--azul-900);
}
.redgk-boton--acento:hover { background: var(--wp--preset--color--cian-300); }
.redgk-seccion--profunda .redgk-boton--secundario {
  color: var(--wp--custom--texto--invertido);
  border-color: var(--wp--preset--color--azul-200);
}

/* ---------- Portada: entrada editorial ---------- */
.redgk-portada { padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60); }
.redgk-portada__kicker {
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--wp--custom--texto--acento);
  margin-bottom: var(--wp--preset--spacing--20);
}
.redgk-portada__titulo {
  font-size: var(--wp--preset--font-size--4xl);
  max-width: 18ch; margin-bottom: var(--wp--preset--spacing--30);
}
.redgk-portada__entrada {
  font-size: var(--wp--preset--font-size--lg);
  color: var(--wp--custom--texto--secundario);
  max-width: var(--wp--custom--medida--estrecha);
  margin-bottom: var(--wp--preset--spacing--40);
}
/* La regla de oro: un hilo fino, no un degradado de fondo. */
.redgk-regla {
  width: 72px; height: 3px; border-radius: 2px;
  background: var(--wp--custom--acento--marca);
  margin-bottom: var(--wp--preset--spacing--30);
}

/* ---------- Verticales ---------- */
.redgk-vertical {
  padding: var(--wp--preset--spacing--40);
  border-radius: var(--wp--custom--radio--lg);
  border: 1px solid var(--wp--custom--borde--sutil);
  background: var(--wp--custom--superficie--base);
}
.redgk-vertical__etiqueta {
  display: inline-block; margin-bottom: var(--wp--preset--spacing--20);
  padding: .3rem .7rem; border-radius: var(--wp--custom--radio--pill);
  font-size: var(--wp--preset--font-size--xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.redgk-vertical--humano { border-top: 4px solid var(--wp--custom--vertical--humano); }
.redgk-vertical--humano .redgk-vertical__etiqueta {
  background: var(--wp--custom--vertical--humano-fondo);
  color: var(--wp--custom--vertical--humano);
}
.redgk-vertical--educacion { border-top: 4px solid var(--wp--custom--vertical--educacion); }
.redgk-vertical--educacion .redgk-vertical__etiqueta {
  background: var(--wp--custom--vertical--educacion-fondo);
  color: var(--wp--custom--vertical--educacion);
}

/* ---------- Banda transversal (Soluciones Digitales) ----------
   No es una tarjeta mas: cruza el ancho para leerse como capa de soporte. */
.redgk-transversal {
  background: var(--wp--custom--superficie--profunda);
  color: var(--wp--custom--texto--invertido);
  border-radius: var(--wp--custom--radio--lg);
  padding: var(--wp--preset--spacing--40);
  display: grid; gap: var(--wp--preset--spacing--30);
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  align-items: center;
  position: relative; overflow: hidden;
}
.redgk-transversal::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg,
    var(--wp--custom--vertical--humano) 0%,
    var(--wp--custom--acento--marca) 50%,
    var(--wp--preset--color--azul-300) 100%);
}
.redgk-transversal h2, .redgk-transversal h3 { color: var(--wp--custom--texto--invertido); }
.redgk-transversal p { color: var(--wp--custom--texto--sobre-profundo); }

/* ---------- Tarjeta de marca endosada ---------- */
.redgk-marca-tarjeta {
  display: flex; flex-direction: column; gap: var(--wp--preset--spacing--20);
  padding: var(--wp--preset--spacing--40);
  border: 1px solid var(--wp--custom--borde--sutil);
  border-radius: var(--wp--custom--radio--lg);
  background: var(--wp--custom--superficie--base);
  text-decoration: none; color: inherit;
  transition: border-color var(--wp--custom--transicion--media);
}
.redgk-marca-tarjeta:hover { border-color: var(--wp--custom--acento--marca); color: inherit; }
.redgk-marca-tarjeta__firma {
  margin-top: auto; padding-top: var(--wp--preset--spacing--20);
  border-top: 1px solid var(--wp--custom--borde--sutil);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--wp--custom--texto--tenue);
}

/* ---------- Tarjeta de entrada ---------- */
.redgk-entrada { display: flex; flex-direction: column; gap: .6rem; }
.redgk-entrada__imagen img { border-radius: var(--wp--custom--radio--md); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.redgk-entrada__meta { font-size: var(--wp--preset--font-size--xs); color: var(--wp--custom--texto--tenue); }
.redgk-entrada__titulo { font-size: var(--wp--preset--font-size--xl); margin: 0; }
.redgk-entrada__titulo a { color: inherit; text-decoration: none; }
.redgk-entrada__titulo a:hover { color: var(--wp--custom--acento--acciones); }

/* ---------- Pie ---------- */
.redgk-pie {
  background: var(--wp--custom--superficie--noche);
  color: var(--wp--custom--texto--sobre-profundo);
  padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30);
}
.redgk-pie a { color: var(--wp--preset--color--azul-200); text-decoration: none; }
.redgk-pie a:hover { color: var(--wp--custom--acento--marca); }
.redgk-pie h3 {
  color: var(--wp--custom--texto--invertido);
  font-size: var(--wp--preset--font-size--sm);
  letter-spacing: .08em; text-transform: uppercase;
}
.redgk-pie ul { list-style: none; padding: 0; margin: 0; }
.redgk-pie__base {
  margin-top: var(--wp--preset--spacing--40);
  padding-top: var(--wp--preset--spacing--30);
  border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--azul-200) 25%, transparent);
  font-size: var(--wp--preset--font-size--xs);
  display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--20); justify-content: space-between;
}

/* ---------- Paginacion ---------- */
.redgk-paginacion { margin-top: var(--wp--preset--spacing--50); }
.redgk-paginacion .page-numbers {
  display: inline-block; padding: .5rem .85rem; margin-right: .25rem;
  border: 1px solid var(--wp--custom--borde--sutil);
  border-radius: var(--wp--custom--radio--md);
  text-decoration: none;
}
.redgk-paginacion .current {
  background: var(--wp--custom--superficie--profunda);
  color: var(--wp--custom--texto--invertido);
  border-color: var(--wp--custom--superficie--profunda);
}

/* ---------- Migas de pan ---------- */
.redgk-migas { margin-bottom: var(--wp--preset--spacing--20); }
.redgk-migas ol {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; margin: 0; padding: 0;
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--custom--texto--tenue);
}
.redgk-migas li { margin: 0; display: flex; align-items: center; gap: .5rem; }
.redgk-migas li + li::before { content: "/"; color: var(--wp--custom--borde--sutil); }
.redgk-migas a { color: var(--wp--custom--texto--secundario); text-decoration: none; }
.redgk-migas a:hover { color: var(--wp--custom--texto--acento); text-decoration: underline; }
.redgk-migas [aria-current="page"] { color: var(--wp--custom--texto--tenue); }

/* ---------- Submenus ---------- */
.redgk-nav li { position: relative; }
.redgk-submenu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 15rem; padding: .5rem 0;
  flex-direction: column; gap: 0;
  background: var(--wp--custom--superficie--base);
  border: 1px solid var(--wp--custom--borde--sutil);
  border-radius: var(--wp--custom--radio--md);
  box-shadow: 0 6px 24px rgb(5 11 31 / 10%);
}
.redgk-submenu li { margin: 0; }
.redgk-submenu a {
  display: block; padding: .55rem 1rem;
  border-bottom: 0; white-space: nowrap;
}
.redgk-submenu a:hover { background: var(--wp--custom--superficie--sutil); border-bottom: 0; }
.redgk-tiene-submenu:hover > .redgk-submenu,
.redgk-tiene-submenu:focus-within > .redgk-submenu,
.redgk-submenu[data-abierto="true"] { display: flex; }

.redgk-submenu-boton {
  background: none; border: 0; cursor: pointer; padding: .25rem .4rem;
  color: var(--wp--custom--texto--tenue); font: inherit; line-height: 1;
}
@media (max-width: 860px) {
  .redgk-submenu {
    display: none; position: static; min-width: 0; border: 0;
    box-shadow: none; padding: 0 0 .5rem 1rem;
  }
  .redgk-tiene-submenu:hover > .redgk-submenu { display: none; }
  .redgk-submenu[data-abierto="true"] { display: flex; }
  .redgk-tiene-submenu { display: flex; flex-wrap: wrap; align-items: center; }
  .redgk-tiene-submenu > a { flex: 1; }
}

/* ---------- Pagina de vertical ---------- */
.redgk-pagina-vertical .redgk-regla { background: var(--wp--custom--acento--marca); }
.redgk-pagina-vertical--humano .redgk-regla { background: var(--wp--custom--vertical--humano); }
.redgk-pagina-vertical--humano .redgk-portada__kicker { color: var(--wp--custom--vertical--humano); }
.redgk-pagina-vertical--educacion .redgk-regla { background: var(--wp--custom--vertical--educacion); }
.redgk-pagina-vertical--educacion .redgk-portada__kicker { color: var(--wp--custom--vertical--educacion); }
.redgk-pagina-vertical--soluciones .redgk-regla { background: var(--wp--custom--acento--marca); }
.redgk-pagina-vertical--soluciones .redgk-portada__kicker { color: var(--wp--custom--texto--acento); }

.redgk-ofertas .redgk-entrada__meta {
  display: inline-block; padding: .2rem .6rem;
  border-radius: var(--wp--custom--radio--pill);
  background: var(--wp--custom--vertical--educacion-fondo);
  color: var(--wp--custom--vertical--educacion);
  font-weight: 500;
}

/* ---------- Cabecera de seccion ---------- */
.redgk-cabeza-seccion { margin-bottom: var(--wp--preset--spacing--40); }
.redgk-cabeza-seccion h2 { margin-bottom: .4em; }
.redgk-cabeza-seccion p:last-child { color: var(--wp--custom--texto--secundario); }

/* ---------- Etiquetas en fila ---------- */
.redgk-etiquetas { list-style: none; padding: 0; margin: 0; }
.redgk-etiquetas li {
  margin: 0; padding: .35rem .85rem;
  border: 1px solid var(--wp--preset--color--azul-500);
  border-radius: var(--wp--custom--radio--pill);
  font-size: var(--wp--preset--font-size--xs);
  color: var(--wp--custom--texto--sobre-profundo);
}
.redgk-etiquetas--claras li {
  border-color: var(--wp--custom--borde--sutil);
  background: var(--wp--custom--superficie--base);
  color: var(--wp--custom--texto--secundario);
}

/* ---------- Metodo: las cuatro etapas ---------- */
.redgk-etapas {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--wp--preset--spacing--30);
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  counter-reset: etapa;
}
.redgk-etapa {
  margin: 0; padding: var(--wp--preset--spacing--30);
  background: var(--wp--custom--superficie--base);
  border: 1px solid var(--wp--custom--borde--sutil);
  border-radius: var(--wp--custom--radio--lg);
  position: relative;
}
.redgk-etapa__numero {
  display: block;
  font-family: var(--wp--preset--font-family--titulo);
  font-size: var(--wp--preset--font-size--2xl);
  line-height: 1;
  color: var(--wp--custom--acento--marca);
  margin-bottom: .4rem;
}
.redgk-etapa__fase {
  display: block;
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--wp--custom--texto--tenue);
  margin-bottom: .2rem;
}
.redgk-etapa__nombre { font-size: var(--wp--preset--font-size--xl); margin-bottom: .4em; }
.redgk-etapa p { font-size: var(--wp--preset--font-size--sm); color: var(--wp--custom--texto--secundario); }

/* ---------- Metodo: el estado ideal ---------- */
.redgk-resultado {
  margin-top: var(--wp--preset--spacing--40);
  padding: var(--wp--preset--spacing--40);
  background: var(--wp--custom--superficie--profunda);
  color: var(--wp--custom--texto--invertido);
  border-radius: var(--wp--custom--radio--lg);
}
.redgk-resultado h3 {
  color: var(--wp--custom--texto--invertido);
  max-width: 24ch;
  font-size: var(--wp--preset--font-size--2xl);
}
.redgk-logros {
  list-style: none; padding: 0;
  margin: var(--wp--preset--spacing--30) 0;
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}
.redgk-logros li {
  margin: 0; padding-left: 1.5rem; position: relative;
  color: var(--wp--custom--texto--sobre-profundo);
  font-size: var(--wp--preset--font-size--sm);
}
.redgk-logros li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wp--custom--acento--marca);
}

/* ---------- Publicos ---------- */
.redgk-publico {
  display: flex; flex-direction: column; gap: .5rem;
  padding: var(--wp--preset--spacing--30);
  border-left: 3px solid var(--wp--custom--borde--sutil);
  border-radius: 0;
  transition: border-color var(--wp--custom--transicion--media);
}
.redgk-publico:hover { border-left-color: var(--wp--custom--acento--marca); }
.redgk-publico h3 { font-size: var(--wp--preset--font-size--lg); margin: 0; }
.redgk-publico p { font-size: var(--wp--preset--font-size--sm); color: var(--wp--custom--texto--secundario); }
.redgk-publico__ruta {
  margin-top: auto;
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--wp--custom--texto--acento);
}

/* ---------- Puertas de entrada ---------- */
.redgk-puerta {
  display: flex; flex-direction: column; gap: .5rem;
  padding: var(--wp--preset--spacing--40);
  background: var(--wp--custom--superficie--base);
  border: 1px solid var(--wp--custom--borde--sutil);
  border-radius: var(--wp--custom--radio--lg);
}
.redgk-puerta h3 { font-size: var(--wp--preset--font-size--xl); margin: 0; }
.redgk-puerta > p { color: var(--wp--custom--texto--secundario); }
.redgk-puerta .redgk-entrada__meta {
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--wp--custom--texto--acento);
  margin: 0;
}
.redgk-puerta__accion { margin-top: auto; padding-top: var(--wp--preset--spacing--20); }
.redgk-puerta__accion a { font-weight: 500; text-decoration: none; }
.redgk-puerta__accion a:hover { text-decoration: underline; }

/* ---------- Listado de procesos de una vertical ventana ---------- */
.redgk-listado {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}
.redgk-listado li {
  margin: 0; padding: .9rem 1rem .9rem 2.2rem;
  position: relative;
  background: var(--wp--custom--superficie--sutil);
  border-radius: var(--wp--custom--radio--md);
  font-size: var(--wp--preset--font-size--sm);
}
.redgk-listado li::before {
  content: ""; position: absolute; left: 1rem; top: 1.35em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wp--custom--acento--marca);
}

/* ---------- Caso construido ---------- */
.redgk-caso {
  padding: var(--wp--preset--spacing--40);
  border: 1px solid var(--wp--custom--borde--sutil);
  border-left: 4px solid var(--wp--custom--acento--marca);
  border-radius: 0;
  background: var(--wp--custom--superficie--sutil);
}
.redgk-caso h2 { font-size: var(--wp--preset--font-size--2xl); margin-bottom: .4em; }
.redgk-caso p { max-width: var(--wp--custom--medida--texto); }

/* ---------- Marca de destino en las verticales ventana ---------- */
.redgk-vertical__destino {
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--wp--custom--texto--tenue);
  margin-bottom: .6em;
}

/* ---------- Formulario de solicitud ---------- */
.redgk-formulario { max-width: var(--wp--custom--medida--texto); }
.redgk-formulario__fila {
  display: grid; gap: var(--wp--preset--spacing--20);
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
.redgk-campo { margin-bottom: var(--wp--preset--spacing--20); }
.redgk-campo label {
  display: block; margin-bottom: .35rem;
  font-size: var(--wp--preset--font-size--sm); font-weight: 500;
}
.redgk-campo label span { color: var(--wp--custom--texto--acento); }
.redgk-campo input,
.redgk-campo select,
.redgk-campo textarea {
  width: 100%; padding: .7rem .9rem;
  border: 1px solid var(--wp--custom--borde--control);
  border-radius: var(--wp--custom--radio--md);
  background: var(--wp--custom--superficie--base);
  color: var(--wp--custom--texto--principal);
  font: inherit; font-size: var(--wp--preset--font-size--sm);
}
.redgk-campo textarea { resize: vertical; min-height: 8rem; }
.redgk-campo input:focus-visible,
.redgk-campo select:focus-visible,
.redgk-campo textarea:focus-visible { border-color: var(--wp--custom--borde--foco); }

/* Trampa para robots: fuera de pantalla, nunca display:none,
   porque algunos robots detectan ese caso y lo saltan. */
.redgk-campo-trampa {
  position: absolute !important;
  left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.redgk-aviso {
  padding: var(--wp--preset--spacing--30);
  border-radius: var(--wp--custom--radio--md);
  border-left: 4px solid var(--wp--custom--acento--marca);
  background: var(--wp--custom--superficie--sutil);
  margin-bottom: var(--wp--preset--spacing--30);
}
.redgk-aviso--exito { border-left-color: var(--wp--preset--color--cian-600); }
.redgk-aviso--error { border-left-color: #B3261E; }
