.page-latest-matches {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --dark-text-color: #333333;
  --light-text-color: #ffffff;
  --background-dark: #111;
  --background-light: #f5f5f5;
  color: var(--light-text-color); /* Body background is dark #111 */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.page-latest-matches__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-latest-matches__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
}

.page-latest-matches__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.page-latest-matches__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability */
}

.page-latest-matches__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  color: var(--light-text-color);
}

.page-latest-matches__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--light-text-color);
}

.page-latest-matches__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--light-text-color);
}

.page-latest-matches__section {
  padding: 60px 0;
  text-align: center;
}

.page-latest-matches__section-title {
  font-size: 2.5em;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-latest-matches__text-block {
  max-width: 800px;
  margin: 0 auto 40px auto;
  font-size: 1.1em;
  color: var(--light-text-color);
}

.page-latest-matches__upcoming-matches .page-latest-matches__section-title,
.page-latest-matches__recent-results .page-latest-matches__section-title {
  color: var(--dark-text-color);
}

.page-latest-matches__upcoming-matches .page-latest-matches__text-block,
.page-latest-matches__recent-results .page-latest-matches__text-block {
  color: var(--dark-text-color);
}

.page-latest-matches__match-grid,
.page-latest-matches__news-grid,
.page-latest-matches__result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-latest-matches__match-card,
.page-latest-matches__news-card,
.page-latest-matches__result-card,
.page-latest-matches__live-card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  color: var(--dark-text-color);
}

.page-latest-matches__card-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-latest-matches__card-title {
  font-size: 1.4em;
  margin: 20px 20px 10px 20px;
  color: var(--primary-color);
}

.page-latest-matches__card-title a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-latest-matches__card-title a:hover {
  text-decoration: underline;
}

.page-latest-matches__match-info,
.page-latest-matches__match-league,
.page-latest-matches__news-date,
.page-latest-matches__match-score,
.page-latest-matches__match-details {
  font-size: 0.95em;
  color: #666;
  margin: 0 20px 5px 20px;
}

.page-latest-matches__btn-primary,
.page-latest-matches__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  margin: 10px 5px;
  cursor: pointer;
  box-sizing: border-box;
}

.page-latest-matches__btn-primary {
  background: var(--primary-color);
  color: var(--light-text-color);
  border: 2px solid var(--primary-color);
}

.page-latest-matches__btn-primary:hover {
  background: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

.page-latest-matches__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-latest-matches__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--light-text-color);
}

.page-latest-matches__cta-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.page-latest-matches__dark-bg {
  background-color: var(--background-dark);
  color: var(--light-text-color);
}

.page-latest-matches__light-bg {
  background-color: var(--secondary-color);
  color: var(--dark-text-color);
}

.page-latest-matches__live-card {
  position: relative;
  padding-bottom: 20px;
}

.page-latest-matches__live-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #EA7C07; /* Login color for live badge */
  color: var(--light-text-color);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: bold;
}

.page-latest-matches__odds-display {
  display: flex;
  justify-content: space-around;
  margin: 15px 20px 20px 20px;
  font-weight: bold;
  font-size: 1.1em;
}

.page-latest-matches__odds-display span {
  background: var(--background-light);
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--dark-text-color);
}

.page-latest-matches__faq-section {
  background-color: var(--background-dark);
  color: var(--light-text-color);
}

.page-latest-matches__faq-section .page-latest-matches__section-title {
  color: var(--primary-color);
}

.page-latest-matches__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

.page-latest-matches__faq-item {
  background: var(--secondary-color);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--dark-text-color);
}

.page-latest-matches__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  color: var(--primary-color);
}

.page-latest-matches__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-latest-matches__faq-qtext {
  flex-grow: 1;
  font-size: 1.1em;
}

.page-latest-matches__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
}

.page-latest-matches__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 0.95em;
  color: var(--dark-text-color);
}

/* General image responsiveness */
.page-latest-matches img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-latest-matches {
    font-size: 15px;
    line-height: 1.5;
  }

  .page-latest-matches__main-title {
    font-size: 2em;
  }

  .page-latest-matches__section-title {
    font-size: 1.8em;
  }

  .page-latest-matches__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-latest-matches__container {
    padding: 0 15px;
  }

  .page-latest-matches__match-grid,
  .page-latest-matches__news-grid,
  .page-latest-matches__result-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-latest-matches__match-card,
  .page-latest-matches__news-card,
  .page-latest-matches__result-card,
  .page-latest-matches__live-card {
    margin-left: 0;
    margin-right: 0;
  }

  .page-latest-matches__btn-primary,
  .page-latest-matches__btn-secondary,
  .page-latest-matches a[class*="button"],
  .page-latest-matches a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-latest-matches__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }

  /* Image responsiveness */
  .page-latest-matches img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-latest-matches__section,
  .page-latest-matches__card,
  .page-latest-matches__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-latest-matches__video-section {
    padding-top: 10px !important;
  }

  .page-latest-matches__video-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  .page-latest-matches__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* Filter for hero image to make text more readable */
.page-latest-matches__hero-image {
  filter: brightness(0.5);
}

/* Ensure no filter is applied to other images */
.page-latest-matches__card-image,
.page-latest-matches img:not(.page-latest-matches__hero-image) {
  filter: none;
}