/*
File Name: 		custom.css
Description:  Custom overrides
*/

/* Fixed thead, scrollable tbody (only for non-history standings) */
.standings-table:not(.standings-table--full) thead,
.standings-table:not(.standings-table--full) tbody,
.standings-table:not(.standings-table--full) tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.standings-table:not(.standings-table--full) tbody {
  display: block;
  overflow-y: auto;
  max-height: 65vh;
}
.standings-table:not(.standings-table--full) thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/* History table: sticky thead, normal flow */
.standings-table--full thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(21, 23, 32, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* Hide scrollbar but keep scrolling */
::-webkit-scrollbar {
  display: none;
}
* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Page heading top spacing removed */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #151720 !important;
  z-index: 999999 !important;
  overflow-y: auto !important;
  padding: 80px 24px 24px !important;
  box-sizing: border-box !important;
  display: block !important;
}

.mobile-menu-overlay a {
  display: block;
  padding: 16px 0;
  color: #fff;
  font-size: 1.25rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-menu-overlay a:hover,
.mobile-menu-overlay a.active {
  color: #048ac5;
}

.mobile-menu-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 1000000;
}

.mobile-menu-overlay li {
  list-style: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Darken news thumbnails for readability */
.blog-layout--style-4 .post__thumbnail {
  position: relative;
}
.blog-layout--style-4 .post__thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

.blog-layout--style-4 .post__meta-item--date {
  color: #ffcc00 !important;
}

/* Fix pages overflowing on mobile */
@media (max-width: 991.98px) {
  .site-content,
  .site-content__inner,
  .container--large,
  .container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .page-heading__title {
    font-size: 1.5rem !important;
    word-wrap: break-word;
  }

  .team-item {
    margin-bottom: 1rem;
  }

  body {
    overflow-x: hidden !important;
  }
}

/* Mobile: fix /news page - slider fullscreen + vertical scroll to news */
@media (max-width: 991.98px) {
  body.site-layout--horizontal {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.site-layout--horizontal .site-wrapper {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.site-layout--horizontal .site-content {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  .widger-area--before-loop {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh;
    overflow: hidden;
  }

  .widger-area--before-loop .widget-carousel__item.player {
    width: 100vw !important;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .content.blog-layout--style-4 {
    width: 100vw !important;
    padding: 1rem;
    box-sizing: border-box;
  }

  .content.blog-layout--style-1 {
    width: 100vw !important;
    padding: 1rem;
    box-sizing: border-box;
  }
}

/* Team info page: prevent long position names from overlapping player photo */
.team-info-page .player-info-title.h1 {
  font-size: 2.5rem;
}
@media (min-width: 768px) {
  .team-info-page .player-info-title.h1 {
    font-size: 3.5rem;
  }
}
@media (min-width: 992px) {
  .team-info-page .player-info-title.h1 {
    font-size: 4rem;
  }
}
@media (min-width: 1200px) {
  .team-info-page .player-info-title.h1 {
    font-size: 5rem;
  }
}
@media (min-width: 1920px) {
  .team-info-page .player-info-title.h1 {
    font-size: 6rem;
  }
  .page-heading__title {
    font-size: 7.2rem !important;
  }
}

/* Allow scrolling on pages with lots of content (e.g. staff 2+ rows) */
.site-layout--horizontal .site-wrapper {
  overflow-y: auto !important;
}
.site-content--center {
  padding-bottom: 200px;
  padding-top: 40px;
}
.site-content--center .page-heading--default {
  margin-bottom: 24px;
}

/* Fit team logos inside the diamond border */
.match-team-logo {
  aspect-ratio: 1 / 1;
}
.match-team-logo img {
  width: 60% !important;
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Disable match hover effect */
.match-score:hover .match-score__body {
  opacity: 1 !important;
  transform: none !important;
  transition-delay: 0ms !important;
}
.match-score:hover .match-score__logo {
  opacity: 0 !important;
  transform: none !important;
}
.match-score:hover .match-score__footer {
  opacity: 0 !important;
  transform: none !important;
}

/* News thumbnails: fill card width, crop overflow */
  display: block;
}

/* News thumbnails: fill entire card, crop overflow */
.blog-layout--style-4 .post {
  position: relative;
  overflow: hidden;
}
.blog-layout--style-4 .post__thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.blog-layout--style-4 .post__thumbnail a {
  display: block;
  width: 100%;
  height: 100%;
}
.blog-layout--style-4 .post__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-layout--style-4 .post__body {
  position: relative;
  z-index: 1;
}

/* Remove mobile margin from landing social menu items */
@media (max-width: 767.98px) {
  .social-menu--landing li {
    margin: 1rem 0 !important;
  }
}
