/*!
 * HostProfiles — estilos
 * Perfiles de locutores: foto, biografía, horarios y programas
 * asociados. Independiente, sin dependencias.
 */

.hp {
  --hp-bg: #10182b;
  --hp-bg-2: #161f38;
  --hp-card: #182342;
  --hp-card-2: #1d2a4d;
  --hp-accent: #e2a63b;
  --hp-accent-2: #f4c469;
  --hp-text: #ffffff;
  --hp-text-dim: #a9b3c9;
  --hp-border: rgba(255, 255, 255, 0.1);
  --hp-radius: 18px;

  width: 100%;
  color: var(--hp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.hp *, .hp *::before, .hp *::after { box-sizing: border-box; }

.hp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--hp-text-dim);
  font-size: 0.86rem;
  background: var(--hp-card);
  border-radius: var(--hp-radius);
  border: 1px solid var(--hp-border);
}

/* ---------- Cuadrícula de tarjetas ---------- */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.hp-card {
  display: flex;
  flex-direction: column;
  /* Un hijo de grid con contenido "white-space: nowrap" adentro (los
     horarios) no se encoge por debajo de ese ancho a menos que se le
     quite el "min-width: auto" implícito — si no, la tarjeta empuja el
     ancho de toda su columna y desborda en pantallas angostas. */
  min-width: 0;
  background: linear-gradient(180deg, var(--hp-bg) 0%, var(--hp-bg-2) 100%);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  padding: 20px;
}

/* ---------- Encabezado: foto + nombre + rol ---------- */
.hp-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hp-photo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--hp-accent-2), var(--hp-accent));
  color: #161018;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  position: relative;
}
/* Sin "display" explícito en la imagen: al ser hijo flex se vuelve
   bloque igual, así el atributo "hidden" (usado por JS antes de que
   cargue la foto) sigue funcionando — una regla "display" propia aquí
   le ganaría al "[hidden]" del navegador sin importar el orden. */
.hp-photo img { width: 100%; height: 100%; object-fit: cover; }
.hp-photo-initials { position: relative; z-index: 1; }
.hp-photo.has-photo-loaded .hp-photo-initials { display: none; }

.hp-id { min-width: 0; }
.hp-name { font-size: 1.02rem; font-weight: 700; line-height: 1.25; }
.hp-role {
  font-size: 0.78rem;
  color: var(--hp-accent-2);
  font-weight: 600;
  margin-top: 2px;
}
.hp-count {
  font-size: 0.72rem;
  color: var(--hp-text-dim);
  margin-top: 3px;
}

/* ---------- Biografía ---------- */
.hp-bio {
  font-size: 0.84rem;
  color: var(--hp-text-dim);
  line-height: 1.55;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-card.is-bio-expanded .hp-bio {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.hp-bio-more {
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--hp-accent-2);
  cursor: pointer;
  align-self: flex-start;
}
.hp-bio-more:hover { text-decoration: underline; }

/* ---------- Programas asociados ---------- */
.hp-programs-heading {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hp-text-dim);
  margin: auto 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hp-border);
}

.hp-program-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-program {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--hp-card);
  border: 1px solid var(--hp-border);
}

.hp-program-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hp-program-name {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--hp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-program-listen {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hp-text);
  text-decoration: none;
}
.hp-program-listen:hover { background: rgba(255, 255, 255, 0.16); }
.hp-program-listen svg { width: 12px; height: 12px; }

.hp-program-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hp-program-schedule {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--hp-accent-2);
  background: rgba(226, 166, 59, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.hp-program-desc {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.74rem;
  color: var(--hp-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-no-programs {
  font-size: 0.78rem;
  color: var(--hp-text-dim);
  font-style: italic;
}

/* ---------- Responsivo ---------- */
@media (max-width: 480px) {
  .hp-grid { grid-template-columns: 1fr; }
  .hp-card { padding: 16px; }
  .hp-photo { width: 54px; height: 54px; font-size: 0.94rem; }
}
