/* WordPress integration only. The legacy page CSS keeps control of the visual layout. */
.wp-page-content {
  margin-bottom: 24px;
}

.wp-page-content > h1:not(.landing-h1) {
  margin-top: 0;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.35;
}

.wp-shortcode-page,
.wp-shortcode-page .entry-content {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wp-shortcode-page .entry-content > :first-child {
  margin-top: 0;
}

.article-meta {
  margin-bottom: 18px;
}

.article-body img,
.entry-content img {
  max-width: 100%;
  height: auto;
}

.navigation.pagination {
  padding: 0 16px 16px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: var(--theme-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--main-color);
  color: #fff;
  font-weight: 800;
}

.page-numbers.current {
  background: var(--dark-color);
}

.not-found-box {
  text-align: center;
}

html,
body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body.yalla-style-1 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#SiteContent,
.article-wrapper,
.match-page,
.match-detail-shell {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* The old PHP JavaScript removed the reserved fixture height after load. */
.AY-Fixture .albaflex {
  min-height: 0;
  height: auto;
}

.AY-Fixture .albaflex:empty {
  display: none;
}

/* WordPress news cards use the same legacy grid dimensions. */
.news-card {
  min-width: 0;
}

.news-card > a {
  height: 100%;
}

.match-page {
  max-width: 100%;
  overflow-x: clip;
}

.match-page .match-detail-main {
  display: grid;
  gap: 16px;
}

.match-page .content-panel,
.match-page .match-related-block,
.match-page .match-hero {
  max-width: 100%;
}

@media (max-width: 700px) {
  .match-page {
    width: calc(100% - 12px);
    margin-inline: auto;
  }

  .match-page .content-panel,
  .match-page .match-related-block {
    overflow: hidden;
  }

  .match-page .match-body {
    padding: 12px;
  }

  .match-page .match-table {
    font-size: 13px;
  }

  .match-page .match-table th,
  .match-page .match-table td {
    padding: 8px 7px;
  }

  .match-page .details-text,
  .match-page p,
  .match-page h1,
  .match-page h2 {
    overflow-wrap: anywhere;
  }
}

/* Protect the legacy fixture layout from WordPress/plugin global element rules. */
.AY-Fixture .AY-Dtab {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}

.AY-Fixture .date-btn {
  display: inline-flex;
  width: auto;
}

.AY-Fixture .AY_Inner {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.AY-Fixture .MT_Info ul {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
}

.AY-Fixture .MT_Info li {
  min-width: 0;
  flex: 1 1 0;
}

.AY-Fixture .MT_Info li::before {
  position: static;
}

/* Upcoming cards in the original visible design show time and status only. */
.AY-Fixture .AY_Match.not-started .MT_Result,
.AY-Fixture .AY_Match.is-upcoming .MT_Result,
.AY-Fixture .AY_Match.not-started .TourName,
.AY-Fixture .AY_Match.is-upcoming .TourName {
  display: none;
}

@media (max-width: 768px) {
  .AY-Fixture .AY-Dtab {
    width: 100%;
  }

  .AY-Fixture .date-btn {
    flex: 1 1 0;
  }

  .AY-Fixture .MT_Info li:nth-child(2) {
    display: none;
  }
}
