/* Community pages (Pages/Community/_Layout.cshtml): the header actions, the section tabs and the content cards. */

/* Three outlined actions on the dark header, all alike; only their icons carry colour. */
.community-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.community-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 42px; /* the search field's height, so the row lines up */
  padding: 0 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #F3F6FC !important;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.community-action:hover,
.community-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF !important;
}

.community-action img {
  width: 16px;
  height: 16px;
}

.community-action i {
  font-size: 0.9375rem;
}

.community-action .fa-crown {
  color: #FBBF24;
}

.community-action .fa-circle-up {
  color: #E83090;
}

/* Section tabs: slimmer than the theme's tabs, raised off the page with a firmer shadow and an outline,
   and the open section marked in pink. */
.nav-tabs.community-tabs {
  top: 26px;
  height: 52px;
  gap: 0.25rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(30, 33, 39, 0.06);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 18, 24, 0.06), 0 16px 36px -14px rgba(16, 18, 24, 0.35);
}

.nav-tabs.community-tabs .nav-link {
  padding: 0 0.875rem;
  color: #4B5563;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-tabs.community-tabs .nav-link .nav-link-title {
  gap: 0.4375rem;
}

.nav-tabs.community-tabs .nav-link i {
  margin-bottom: 0;
  font-size: 1.0625rem;
}

.nav-tabs.community-tabs .nav-link:hover {
  color: #1E2127;
}

.nav-tabs.community-tabs .nav-link.active {
  color: #1E2127;
  font-weight: 600;
}

.nav-tabs.community-tabs .nav-link.active i {
  color: #E83090;
}

.nav-tabs.community-tabs .nav-link::after {
  left: 0.875rem;
  right: 0.875rem;
}

@media screen and (max-width: 767px) {
  .nav-tabs.community-tabs {
    top: 22px;
    height: 48px;
    padding: 0 0.25rem;
  }

  .nav-tabs.community-tabs .nav-link {
    padding: 0 0.625rem;
    font-size: 0.8125rem;
  }
}

/* Content cards (articles, videos, talks): a tighter body than the site's 30px cards, and a smaller title. */
.card.card-list-item .card-body {
  padding: 20px;
}

/* The theme sets every h3 with !important, so the card title has to as well. */
.card.card-list-item .card-title {
  font-size: 18px !important;
}

/* The author's avatar, 10px under the theme's 54px (set there with !important); its link carries an inline
   min-width of the old size. The theme's larger and smaller avatar variants keep their own sizes. */
.card.card-list-item .card-member-img:not(.card-member-img-lg):not(.card-member-img-sm) {
  width: 44px !important;
  height: 44px !important;
}

.card.card-list-item a:has(> .card-member-img) {
  min-width: 44px !important;
}

/* The community's sections: one row of compact tiles with a coloured icon. Each one lifts on hover with a shadow
   in its own colour, so it reads as clickable without an arrow. */
.community-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.community-link {
  --c: #3A82F6;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  background: #FFFFFF;
  color: #1E2127 !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 18, 24, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.community-link:hover,
.community-link:focus-visible {
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--c) 55%, transparent);
  transform: translateY(-2px);
}

.community-link:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

.community-link-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  color: var(--c);
  font-size: 1.125rem;
}

.community-link-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .community-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .community-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .community-link {
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .community-link-icon {
    width: 1.25rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-link:hover,
  .community-link:focus-visible {
    transform: none;
  }
}
