/*
  Componente: Perfiles de Consultoria (Expansion internacional / listado de consultores)
  Aislamiento: todos los selectores estan calificados bajo .hubur-cst-section y usan
  el prefijo "cst-" para evitar colisiones con estilos globales del tema.
  No incluye header/footer ni paginacion: se importan externamente / se omiten.
*/

.hubur-cst-section {
  --cst-color-navy: #14155e;
  --cst-color-navy-soft: #2b2c78;
  --cst-color-red: #e4032e;
  --cst-color-red-dark: #c40227;
  --cst-color-white: #ffffff;
  --cst-color-text: #24244a;
  --cst-color-placeholder-1: #c9cbe3;
  --cst-color-placeholder-2: #e9bcc2;
  --cst-color-placeholder-3: #bcd7e9;
  --cst-color-placeholder-4: #c7e0c0;
  --cst-color-placeholder-5: #e6d6a8;
  --cst-color-placeholder-6: #cbb8e0;

  --cst-gap: 2rem;
  --cst-card-basis: 15.5rem;

  /* Proporciones tomadas directamente de images/Marco.svg (viewBox 559 x 568):
     circulo de foto y caja de nombre ya vienen dibujados en esa pieza, por lo
     que la foto y el texto solo se posicionan encima con estos porcentajes. */
  --cst-frame-avatar-left: 14.118%;
  --cst-frame-avatar-top: 4.674%;
  --cst-frame-avatar-size-w: 71.764%;
  --cst-frame-avatar-size-h: 70.620%;
  --cst-frame-box-inset-x: 3.925%;
  --cst-frame-box-top: 71.60%;
  --cst-frame-box-inset-b: 4.674%;

  box-sizing: border-box;
  background-color: var(--cst-color-white);
  color: var(--cst-color-text);
  padding: 3rem 1.5rem;
  font-family: inherit;
}

.hubur-cst-section *,
.hubur-cst-section *::before,
.hubur-cst-section *::after {
  box-sizing: inherit;
}

.hubur-cst-section .cst-container {
  max-width: 75rem;
  margin: 0 auto;
}

/* ---------- Encabezado ---------- */

.hubur-cst-section .cst-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--cst-color-navy);
  text-align: center;
}

.hubur-cst-section .cst-title__accent {
  color: var(--cst-color-red);
}

.hubur-cst-section .cst-description {
  margin: 0 auto 2.75rem;
  max-width: 62rem;
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
  color: var(--cst-color-text);
}

/* ---------- Grid de tarjetas (adaptable a 2, 3 o 4 por fila) ---------- */

.hubur-cst-section .cst-grid {
  list-style: none;
  margin: 0 auto 2.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--cst-gap);
}

/* Cuando el grid tiene 2 o 3 tarjetas, se limita el ancho para que no
   queden demasiado separadas en pantallas anchas. */
.hubur-cst-section .cst-grid--compact {
  max-width: calc((var(--cst-card-basis) * 3) + (var(--cst-gap) * 2));
}

.hubur-cst-section .cst-card {
  flex: 0 1 var(--cst-card-basis);
  max-width: var(--cst-card-basis);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Marco (anillo + hueco de caja ya dibujados en images/Marco.svg) ---------- */

.hubur-cst-section .cst-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 559 / 568;
}

/* Pieza de diseño: anillo incompleto + circulo rojo + marco de la caja con hueco.
   Fondo transparente, se coloca encima de la foto. */
.hubur-cst-section .cst-card__frame-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hubur-cst-section .cst-card__avatar {
  position: absolute;
  left: var(--cst-frame-avatar-left);
  top: var(--cst-frame-avatar-top);
  width: var(--cst-frame-avatar-size-w);
  height: var(--cst-frame-avatar-size-h);
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cst-color-placeholder-1);
}

.hubur-cst-section .cst-card__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hubur-cst-section .cst-card__avatar-icon {
  width: 45%;
  height: 45%;
  opacity: 0.85;
}

/* Rotacion de colores placeholder cuando no hay foto disponible */
.hubur-cst-section .cst-card:nth-of-type(6n + 1) .cst-card__avatar { background-color: var(--cst-color-placeholder-1); }
.hubur-cst-section .cst-card:nth-of-type(6n + 2) .cst-card__avatar { background-color: var(--cst-color-placeholder-2); }
.hubur-cst-section .cst-card:nth-of-type(6n + 3) .cst-card__avatar { background-color: var(--cst-color-placeholder-3); }
.hubur-cst-section .cst-card:nth-of-type(6n + 4) .cst-card__avatar { background-color: var(--cst-color-placeholder-4); }
.hubur-cst-section .cst-card:nth-of-type(6n + 5) .cst-card__avatar { background-color: var(--cst-color-placeholder-5); }
.hubur-cst-section .cst-card:nth-of-type(6n + 6) .cst-card__avatar { background-color: var(--cst-color-placeholder-6); }

/* ---------- Caja de nombre (el marco/lineas rojas viven en el SVG; aqui solo va el texto) ---------- */

.hubur-cst-section .cst-card__name-box {
  position: absolute;
  left: var(--cst-frame-box-inset-x);
  right: var(--cst-frame-box-inset-x);
  top: var(--cst-frame-box-top);
  bottom: var(--cst-frame-box-inset-b);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.hubur-cst-section .cst-card__name {
  padding-top: 1.25rem;
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--cst-color-navy);
  line-height: 1.25;
  text-decoration: none;
}

.hubur-cst-section .cst-card__name:hover,
.hubur-cst-section .cst-card__name:focus-visible {
  text-decoration: underline;
}

/* ---------- Acciones / CTA ---------- */

.hubur-cst-section .cst-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.hubur-cst-section .cst-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.75rem 0.75rem 3.25rem;
  border-radius: 999px;
  background-color: var(--cst-color-white);
  border: 1px solid var(--cst-color-navy);
  color: var(--cst-color-navy);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hubur-cst-section .cst-btn:hover,
.hubur-cst-section .cst-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.4rem 0.9rem rgba(20, 21, 94, 0.15);
}

.hubur-cst-section .cst-btn em {
  color: var(--cst-color-red);
  font-style: normal;
}

.hubur-cst-section .cst-btn__icon {
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--cst-color-red);
}

.hubur-cst-section .cst-btn__icon img {
  width: 1.2rem;
  height: 1.2rem;
}

/* ---------- Estado sin resultados ---------- */

.hubur-cst-section .cst-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--cst-color-text);
  font-style: italic;
}
