/* Bratu Marian — responsive stability layer */
html,
body,
#root,
.hub-shell,
main {
  max-width: 100%;
  overflow-x: clip;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.page-hero > div:first-child,
.hub-section-title > div,
.article-header > div,
.club-profile-hero__identity > div,
.player-profile-copy,
.video-stage__copy {
  min-width: 0;
  overflow: clip;
}

.page-hero h1,
.hub-section-title h2,
.article-header h1,
.club-profile-hero h1,
.player-profile-copy h1,
.video-stage__copy h1 {
  max-width: none;
  white-space: nowrap;
}

.page-hero p,
.article-header p,
.hub-home-hero p,
.hub-empty p,
.article-rich-text,
.article-rich-text * {
  overflow-wrap: anywhere;
}

.hub-club-rail > div {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  overflow: hidden;
}

.hub-club-rail a {
  min-width: 0;
}

.hub-table-wrap,
.player-directory,
.squad-table,
.profile-nav,
.global-search,
.global-search__results {
  overflow: hidden;
}

.hub-standings,
.hub-table-wrap.is-compact .hub-standings {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.hub-standings th,
.hub-standings td {
  padding-right: 5px;
  padding-left: 5px;
}

.hub-standings th:first-child,
.hub-standings td:first-child {
  width: 5.5%;
}

.hub-standings th:nth-child(2),
.hub-standings td:nth-child(2) {
  width: 24%;
  min-width: 0;
}

.hub-standings td:nth-child(2) a {
  width: 100%;
}

.hub-table-wrap.is-compact .hub-standings th:first-child,
.hub-table-wrap.is-compact .hub-standings td:first-child {
  width: 12%;
}

.hub-table-wrap.is-compact .hub-standings th:nth-child(2),
.hub-table-wrap.is-compact .hub-standings td:nth-child(2) {
  width: 46%;
}

.profile-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profile-nav a {
  min-width: 0;
}

.squad-table__head,
.squad-table > a,
.squad-table > div:not(.squad-table__head) {
  grid-template-columns: 52px minmax(160px, 1fr) 80px 90px 70px;
  min-width: 0;
}

.player-directory__head,
.player-directory > a,
.player-directory > article {
  grid-template-columns: minmax(210px, 1.25fr) minmax(170px, .8fr) 90px 65px 75px 45px;
  min-width: 0;
}

.global-search {
  max-height: 100dvh;
}

.global-search__panel {
  max-height: calc(100dvh - 32px);
}

.global-search__results {
  max-height: none;
}

@media (max-width: 980px) {
  .hub-club-rail {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .hub-club-rail > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(7),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(7),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(8),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(8),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(11),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(11) {
    display: none;
  }

  .player-directory__head,
  .player-directory > a,
  .player-directory > article {
    grid-template-columns: minmax(190px, 1.2fr) minmax(150px, .8fr) 85px 45px;
  }

  .player-directory__head > :nth-child(4),
  .player-directory > a > :nth-child(4),
  .player-directory > article > :nth-child(4),
  .player-directory__head > :nth-child(5),
  .player-directory > a > :nth-child(5),
  .player-directory > article > :nth-child(5) {
    display: none;
  }
}

@media (max-width: 700px) {
  .hub-club-rail {
    width: calc(100% - 24px);
    grid-template-columns: 1fr;
  }

  .hub-club-rail > span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 38px;
    justify-content: center;
  }

  .hub-club-rail > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(4),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(4),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(5),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(5),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(6),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(6),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(7),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(7),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(8),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(8),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(11),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(11),
  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(12),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(12) {
    display: none;
  }

  .hub-table-wrap:not(.is-compact) .hub-standings th:first-child,
  .hub-table-wrap:not(.is-compact) .hub-standings td:first-child {
    width: 12%;
  }

  .hub-table-wrap:not(.is-compact) .hub-standings th:nth-child(2),
  .hub-table-wrap:not(.is-compact) .hub-standings td:nth-child(2) {
    width: 46%;
  }

  .profile-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-nav a:last-child {
    grid-column: 1 / -1;
  }

  .squad-table__head,
  .squad-table > a,
  .squad-table > div:not(.squad-table__head) {
    grid-template-columns: 42px minmax(0, 1fr) 56px;
  }

  .squad-table__head > :nth-child(3),
  .squad-table > a > :nth-child(3),
  .squad-table > div:not(.squad-table__head) > :nth-child(3),
  .squad-table__head > :nth-child(4),
  .squad-table > a > :nth-child(4),
  .squad-table > div:not(.squad-table__head) > :nth-child(4) {
    display: none;
  }

  .player-directory__head,
  .player-directory > a,
  .player-directory > article {
    grid-template-columns: minmax(0, 1.25fr) minmax(110px, .75fr);
    gap: 7px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .player-directory__head > :nth-child(n + 3),
  .player-directory > a > :nth-child(n + 3),
  .player-directory > article > :nth-child(n + 3) {
    display: none;
  }

  .global-search__results > a:nth-child(n + 7) {
    display: none;
  }
}

@media (max-width: 430px) {
  .hub-club-rail > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-standings .hub-team-logo {
    width: 28px;
    height: 28px;
  }

  .hub-standings td:nth-child(2) b {
    font-size: 11px;
  }
}
