/* Catálogo público de ligas. A página interna usa seu próprio layout. */
.home .leaguePortalGrid {
  display: grid;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  align-items: stretch;
  gap: 12px;
}

/* A grade do catálogo acompanha a largura da seção e recolhe colunas vazias. */
.home .leaguePortalGrid:where(.leaguePortalGridWide) {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.home .leaguePortalGrid .leaguePublicCard {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe6ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 10px #0c35520a;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.home .leaguePublicCard > .leagueCardContent {
  display: block;
  min-width: 0;
  padding: 14px 14px 4px;
}

.home .leaguePublicCard > .leagueCardImage {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  height: 134px;
  padding: 11px 14px;
  border-bottom: 1px solid #e0ebef;
  background: radial-gradient(ellipse at 50% 32%, #fff 6%, #eff6f8 64%, #e7f1f4 100%);
  color: #16705f;
  font-size: 34px;
  font-weight: 750;
}

.home .leaguePublicCard > .leagueCardImage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 112px;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  background: transparent;
}

.home .leagueCardContent > .portalTag {
  max-width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: #eaf5f0;
  color: #18594b;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.home .leaguePublicCard h3 {
  margin: 11px 0 4px;
  color: #0c3552;
  font-size: .9375rem;
  line-height: 1.35;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

.home .leaguePublicCard .leagueInstitutionName {
  margin: 0 0 10px;
  color: #385c70;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.leagueCardSignals {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.home .leagueCardSignals .leagueEventSignal {
  width: fit-content;
  margin: 0;
  padding: 4px 6px;
  font-size: .6875rem;
}

.home .leaguePublicCard .leagueCardLink {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0 14px 14px;
  padding: 8px 10px;
  border: 1px solid #18465e;
  border-radius: 10px;
  background: linear-gradient(120deg, #0c3552, #154b63);
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.home .leaguePublicCard a:focus-visible {
  outline: 2px solid #167965;
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .home .leaguePortalGrid .leaguePublicCard:hover {
    transform: translateY(-2px);
    border-color: #bfd6dd;
    box-shadow: 0 8px 20px #0c355212;
  }
  .home .leaguePublicCard .leagueCardLink:hover {
    background: #164e65;
    border-color: #164e65;
    color: #fff;
  }
}

@media (max-width: 600px) {
  .home .leaguePortalGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home .leaguePublicCard > .leagueCardContent { padding: 12px 12px 4px; }
  .home .leaguePublicCard .leagueCardLink { margin-inline: 12px; margin-bottom: 12px; }
  .home .leaguePublicCard > .leagueCardImage { height: 116px; padding: 10px; }
  .home .leaguePublicCard > .leagueCardImage img { max-height: 96px; }
}

@media (max-width: 350px) {
  .home .leaguePortalGrid { grid-template-columns: minmax(0, 1fr); }
}

.a11yLargeText .home .leaguePortalGrid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

@media (prefers-reduced-motion: reduce) {
  .home .leaguePortalGrid .leaguePublicCard { transition: none; }
}

body.mcPageFrame .leaguePortalHero .mcHeroActions > .leagueRegisterButton {
  min-height: 48px;
  padding: 12px 24px;
  border-color: #124d97;
  border-radius: 12px;
  background: #124d97;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px #124d9730;
}
body.mcPageFrame .leaguePortalHero .mcHeroActions > .leagueRegisterButton:hover {
  background: #0d3e7e;
  color: #fff;
}
.leagueMaterialEntry > .leaguePublicationButton {
  box-sizing: border-box;
  flex: 0 1 auto;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.4;
}
