/* Homepage community project directory and contribution entry points. */
.home-community-section {
  --community-inset: 40px;
}

.home-community-section .process-title-wrap-home-3 {
  width: 100%;
  max-width: 960px;
  padding-right: var(--community-inset);
  padding-left: var(--community-inset);
}

.home-community-section .process-title-wrap-home-3 > h2 {
  max-width: 620px;
}

.home-community-section .paragraph-process {
  max-width: 680px;
}

.home-community-section .community-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 0 repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 850px;
}

.home-community-section .community-action-divider {
  align-self: center;
  justify-self: center;
  width: 1px;
  height: 32px;
  background: #bac3c780;
}

.home-community-section .community-actions .primary-button {
  min-height: 56px;
  gap: 8px;
  padding: 14px 12px;
  font-size: 16px;
  white-space: nowrap;
}

.home-community-section .community-actions .community-channel-button {
  border: 0;
  background: var(--primary);
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.home-community-section .community-channel-button:hover {
  background: var(--primary);
}

.home-community-section .community-channel-button img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  filter: none;
}

.home-community-section .community-actions .primary-button:focus-visible,
.home-community-project-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 5px;
}

.home-community-section .home-community-projects {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  padding: 0 var(--community-inset);
}

/* Let project titles determine their width while preserving the glowing numbers. */
.home-community-project-link {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 0 0 8px;
  color: var(--white);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: break-word;
}
.home-community-project-link .step-number { width: 100%; padding-left: 0; }
.home-community-project-link .number-wrap { flex-shrink: 0; }
.home-community-project-title { font: inherit; }
.home-community-project-link:hover { color: var(--primary); }
.home-community-section .process-section-content { row-gap: 40px; }

#community-channel-dialog {
  width: min(520px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 32px;
  overflow-y: auto;
  border: 1px solid var(--stroke, #434343);
  border-radius: 4px;
  background: var(--primary-dark, #01030b);
  color: var(--white, #f7fcff);
  box-shadow: 0 20px 80px #0009;
}

#community-channel-dialog::backdrop {
  background: #000b;
}

#community-channel-dialog h2 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.25;
}

#community-channel-dialog p {
  margin: 0 0 24px;
  color: var(--paragraph-gray, #bac3c7);
  font-size: 16px;
  line-height: 1.6;
}

#community-channel-dialog a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--primary);
  text-underline-offset: 4px;
}

#community-channel-dialog a.primary-button {
  padding: 12px 18px;
  background: var(--primary);
  color: var(--white);
}

#community-channel-dialog [data-close-community-channel] {
  display: block;
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid var(--stroke, #434343);
  border-radius: 2px;
  background: transparent;
  color: var(--white, #f7fcff);
  font: inherit;
  cursor: pointer;
}

#community-channel-dialog [data-close-community-channel]:hover {
  border-color: var(--white, #f7fcff);
}

#community-channel-dialog a:focus-visible,
#community-channel-dialog button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

@media screen and (min-width: 1280px) {
  .home-community-section {
    --community-inset: 60px;
  }
}

@media screen and (min-width: 1440px) {
  .home-community-section {
    --community-inset: 85px;
  }
}

@media screen and (max-width: 991px) {
  .home-community-section .community-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 640px;
  }

  .home-community-section .community-actions > :nth-child(-n + 3) {
    grid-column: span 2;
  }

  .home-community-section .community-action-divider {
    grid-column: 1 / -1;
    width: 100%;
    height: 1px;
  }

  .home-community-section .community-actions > .community-channel-button {
    grid-column: span 3;
  }
}

@media screen and (max-width: 767px) {
  .home-community-section {
    --community-inset: 20px;
  }
}

@media screen and (max-width: 479px) {
  .home-community-section .community-actions {
    gap: 8px;
  }

  .home-community-section .community-actions .primary-button {
    min-height: 50px;
    padding: 12px 8px;
    font-size: 14px;
  }

  #community-channel-dialog {
    padding: 24px;
  }
}
