/* =============================================================================
   iHub Liberia - dynamic section components
   Styles for the markup produced by the iHub Core shortcodes and blocks.
   Depends on ihub-design-system.css and ihub-components.css.
   ============================================================================= */

/* --- Course thumbnail ----------------------------------------------------- */
.ihub-course-thumb {
  justify-content: space-between;
}

.ihub-course-thumb__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--ihub-r-md);
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ihub-font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.ihub-course-thumb--amber .ihub-course-thumb__icon {
  background: rgba(12, 13, 23, 0.15);
  color: var(--ihub-primary);
}

/* --- Process wrapper ------------------------------------------------------ */
.ihub-process { margin-top: 2rem; }
.ihub-process-step__content > * + * { margin-top: 0.75rem; }

/* --- Grouped card rows ---------------------------------------------------- */
.ihub-group-label {
  font-family: var(--ihub-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ihub-text-muted);
  margin: 3rem 0 1.5rem;
}

.ihub-group-label:first-child { margin-top: 0; }

/* --- Insight lead card ---------------------------------------------------- */
.ihub-insight-card--lead { grid-row: span 2; }
.ihub-insight-card--lead .ihub-insight-card__thumb { aspect-ratio: 16 / 13; }
.ihub-insight-card--lead .ihub-insight-card__title { font-size: 1.4rem; }
.ihub-insight-card--lead .ihub-insight-card__desc { font-size: 1rem; }

@media (max-width: 900px) {
  .ihub-insight-card--lead { grid-row: auto; }
  .ihub-insight-card--lead .ihub-insight-card__thumb { aspect-ratio: 16 / 10; }
}

.ihub-insight-card__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ihub-primary);
  color: var(--ihub-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ihub-font-heading);
  font-weight: 700;
  font-size: 0.85rem;
}

/* --- Featured report ------------------------------------------------------ */
.ihub-featured-report {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--ihub-r-lg);
  background: linear-gradient(135deg, var(--ihub-primary), var(--ihub-primary-500));
  color: #fff;
}

.ihub-featured-report h2,
.ihub-featured-report h3 { color: #fff; }
.ihub-featured-report .ihub-lead { color: rgba(255, 255, 255, 0.85); }
.ihub-featured-report__body > * + * { margin-top: 1rem; }

.ihub-featured-report__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--ihub-r-md);
  background: rgba(0, 0, 0, 0.2);
}

.ihub-featured-report__stats .ihub-stat__num {
  font-family: var(--ihub-font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ihub-accent);
}

.ihub-featured-report__stats .ihub-stat__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .ihub-featured-report { grid-template-columns: 1fr; }
}

/* --- Alumni spotlight ----------------------------------------------------- */
.ihub-spotlight {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border-radius: var(--ihub-r-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ihub-border);
}

.ihub-spotlight__portrait {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(135deg, var(--ihub-primary), var(--ihub-primary-500));
  background-size: cover;
  background-position: center;
  color: #fff;
}

.ihub-spotlight__portrait h2 { color: #fff; margin-top: 1.5rem; }

.ihub-spotlight__initials {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--ihub-accent);
  color: var(--ihub-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ihub-font-heading);
  font-size: 4rem;
  font-weight: 700;
}

.ihub-spotlight__meta { color: var(--ihub-accent); margin-top: 0.5rem; }

.ihub-spotlight__body { padding: clamp(1.5rem, 4vw, 3rem); }
.ihub-spotlight__body > * + * { margin-top: 1rem; }

@media (max-width: 800px) {
  .ihub-spotlight { grid-template-columns: 1fr; }
  .ihub-spotlight__initials { width: 110px; height: 110px; font-size: 2.75rem; }
}

/* --- Partner tiles inside a hero panel ------------------------------------ */
.ihub-partner-tile {
  padding: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
}

/* --- Insight category list ------------------------------------------------ */
.ihub-insight-categories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ihub-insight-categories a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  transition: background-color .18s ease;
}

.ihub-insight-categories a:hover { background: rgba(255, 255, 255, 0.12); }
.ihub-insight-categories__count { color: rgba(255, 255, 255, 0.5); }

/* --- Contact cards -------------------------------------------------------- */
.ihub-contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--ihub-border);
  border-radius: var(--ihub-r-lg);
}

.ihub-contact-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--ihub-r-md);
  background: var(--ihub-primary-50);
  color: var(--ihub-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ihub-contact-card__label {
  display: block;
  font-size: var(--ihub-fs-small);
  color: var(--ihub-text-muted);
}

.ihub-contact-card__value {
  font-weight: 600;
  color: var(--ihub-text);
  text-decoration: none;
  word-break: break-word;
}

.ihub-contact-card__value:hover { color: var(--ihub-primary-700); text-decoration: underline; }

/* --- Opening hours -------------------------------------------------------- */
.ihub-hours {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--ihub-r-md);
  background: var(--ihub-bg-alt);
  font-size: 0.9rem;
}

.ihub-hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--ihub-border);
}

.ihub-hours__row:last-child { border-bottom: 0; }
.ihub-hours__value { font-weight: 600; }

/* --- Socials on a light background ---------------------------------------- */
.ihub-socials--light .ihub-fw-brand__soc {
  background: var(--ihub-bg-alt);
  color: var(--ihub-primary);
}

.ihub-socials--light .ihub-fw-brand__soc:hover {
  background: var(--ihub-primary);
  color: var(--ihub-accent);
}

/* --- Map ------------------------------------------------------------------ */
.ihub-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  border-radius: var(--ihub-r-lg);
  border: 1px solid var(--ihub-border);
  background: linear-gradient(135deg, var(--ihub-primary-50) 0%, var(--ihub-bg-alt) 100%);
}

.ihub-map--embed { background: none; }

.ihub-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ihub-map__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(12, 13, 23, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 13, 23, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.ihub-map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ihub-map__marker {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--ihub-primary);
  color: var(--ihub-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.ihub-map__label { display: block; margin-top: 1rem; font-weight: 600; }
.ihub-map__address { display: block; font-size: var(--ihub-fs-small); color: var(--ihub-text-muted); }

@media (max-width: 640px) {
  .ihub-map { aspect-ratio: 4 / 3; }
}

/* --- Inline newsletter (CTA bands) ---------------------------------------- */
.ihub-newsletter--inline {
  padding: 0.4rem;
  border-radius: var(--ihub-r-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 380px;
}

.ihub-newsletter--inline .fluentform .ff-el-group { margin-bottom: 0; }
.ihub-newsletter--inline .fluentform .ff-el-input--label { display: none; }

/* --- Fluent Forms wrapper ------------------------------------------------- */
.ihub-fluentform .ff-el-group { margin-bottom: 1.25rem; }
.ihub-fluentform .ff-el-input--label label { margin-bottom: 0.4rem; display: inline-block; }
.ihub-fluentform .ff-el-form-check-label { font-size: var(--ihub-fs-small); color: var(--ihub-text-muted); }
.ihub-fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--ihub-error); }
.ihub-fluentform .error-text { color: var(--ihub-error); font-size: var(--ihub-fs-small); }

/* --- Widgets -------------------------------------------------------------- */
.ihub-widget__title {
  color: #fff;
  font-size: var(--ihub-fs-small);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

/* --- Single templates ----------------------------------------------------- */
.ihub-single .ihub-hero + .ihub-section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.ihub-h3 { font-size: var(--ihub-fs-h3); }
.ihub-h3 a { color: inherit; text-decoration: none; }
.ihub-h3 a:hover { color: var(--ihub-primary-700); }
