/**
 * @file
 * Frontpage sections — New Profiles grid and Specialties tag cloud.
 * Scoped to .path-frontpage so other Views are unaffected.
 * Card look lives in bprofile.css; tag look mirrors elements.css .tag.
 */

/* ==========================================================================
   Section rhythm (Views blocks on the homepage)
   ========================================================================== */
.path-frontpage .layout-content > .views-element-container.block,
.path-frontpage .layout-content > .block-views {
  padding-block: var(--space-10);
}

.path-frontpage .layout-content > .views-element-container.block + .views-element-container.block,
.path-frontpage .layout-content > .block-views + .block-views {
  border-top: 1px solid var(--color-border);
}

.path-frontpage .layout-content .block-views > h2,
.path-frontpage .layout-content .views-element-container.block > h2 {
  margin: 0 0 var(--space-8);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  color: var(--color-heading);  
}

/* Hide the empty Drupal frontpage placeholder when blocks carry the content. */
.path-frontpage .view-frontpage .view-empty {
  display: none;
}

/* ==========================================================================
   New Profiles — 4 → 1 CSS grid (HTML list style, equal row height)
   ========================================================================== */
.path-frontpage .view-new-profiles .view-content ul,
.path-frontpage .view-new-profiles .views-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.path-frontpage .view-new-profiles .views-view-grid .views-row {
  display: contents;
}

.path-frontpage .view-new-profiles .view-content li,
.path-frontpage .view-new-profiles .views-view-grid .views-col {
  display: flex;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: auto !important; /* override Views inline style="width: 25%" */
  float: none;
}

.path-frontpage .view-new-profiles .bprofile--teaser {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}

@media (min-width: 40rem) {
  .path-frontpage .view-new-profiles .view-content ul,
  .path-frontpage .view-new-profiles .views-view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .path-frontpage .view-new-profiles .view-content ul,
  .path-frontpage .view-new-profiles .views-view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .path-frontpage .view-new-profiles .view-content ul,
  .path-frontpage .view-new-profiles .views-view-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Specialties — tag cloud (same tokens as .tag in elements.css)
   ========================================================================== */
.path-frontpage .view-specialties .view-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-2);
}

.path-frontpage .view-specialties .views-row {
  margin: 0;
  padding: 0;
}

.path-frontpage .view-specialties .views-field-name,
.path-frontpage .view-specialties .field-content {
  display: contents;
}

.path-frontpage .view-specialties .views-field-name a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.path-frontpage .view-specialties .views-field-name a:hover {
  background: var(--color-primary-soft-2);
  color: var(--color-primary-hover);
  border-color: var(--color-primary);
}
