.page-latest-matches {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #1a1a1a; /* Inherited from body */
}

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

.page-latest-matches__hero-section {
  position: relative;
  background-color: #017439; /* Brand primary color */
  color: #ffffff;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Ensure spacing below fixed header */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-latest-matches__hero-section .page-latest-matches__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-latest-matches__hero-content {
  max-width: 800px;
  z-index: 1;
}

.page-latest-matches__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-latest-matches__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #ffffff;
}

.page-latest-matches__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-latest-matches__btn-primary,
.page-latest-matches__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-latest-matches__btn-primary {
  background-color: #C30808; /* Custom color for register/login type buttons */
  color: #FFFF00; /* Custom font color for register/login type buttons */
  border: 2px solid #C30808;
}

.page-latest-matches__btn-primary:hover {
  background-color: #ff3333;
  border-color: #ff3333;
  color: #ffffff;
}

.page-latest-matches__btn-secondary {
  background-color: #ffffff;
  color: #017439;
  border: 2px solid #ffffff;
}

.page-latest-matches__btn-secondary:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
  color: #017439;
}

.page-latest-matches__hero-image-wrapper {
  z-index: 0;
}

.page-latest-matches__hero-image {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  height: auto;
  display: block;
}

.page-latest-matches__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-latest-matches__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

.page-latest-matches__dark-bg {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 60px 0;
}

.page-latest-matches__light-bg {
  background-color: #2a2a2a;
  color: #ffffff;
  padding: 60px 0;
}

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

.page-latest-matches__match-card {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 20px;
}

.page-latest-matches__match-card.page-latest-matches__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-latest-matches__match-card.page-latest-matches__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-latest-matches__match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-latest-matches__match-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
  display: block;
}

.page-latest-matches__match-title {
  font-size: 1.5em;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-latest-matches__match-date,
.page-latest-matches__match-odds,
.page-latest-matches__match-score {
  font-size: 1em;
  color: inherit;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-latest-matches__match-card .page-latest-matches__btn-primary {
  margin-top: 15px;
}

/* Recent Results */
.page-latest-matches__results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.page-latest-matches__result-item {
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-latest-matches__result-item.page-latest-matches__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-latest-matches__result-title {
  font-size: 1.6em;
  margin-bottom: 10px;
  color: inherit;
}

.page-latest-matches__result-detail {
  font-size: 1.1em;
  margin-bottom: 15px;
  color: inherit;
}

.page-latest-matches__btn-text {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-latest-matches__btn-text:hover {
  color: #004d2b;
}

/* Betting Tips */
.page-latest-matches__tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-latest-matches__tip-card {
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-latest-matches__tip-card.page-latest-matches__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-latest-matches__tip-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: inherit;
}

.page-latest-matches__tip-text {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: inherit;
}

/* Promotions */
.page-latest-matches__promotions {
  text-align: center;
}

.page-latest-matches__promo-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 40px auto 0 auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Download App */
.page-latest-matches__download-app .page-latest-matches__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.page-latest-matches__app-download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
}

.page-latest-matches__app-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-latest-matches__app-cta {
  text-align: center;
}

.page-latest-matches__app-text {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #ffffff;
}

/* FAQ */
.page-latest-matches__faq-list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-latest-matches__faq-item {
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.page-latest-matches__faq-item.page-latest-matches__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-latest-matches__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  background-color: #f5f5f5; /* Lighter background for summary */
  color: #333333;
  border-bottom: 1px solid #eee;
  list-style: none;
}

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

.page-latest-matches__faq-question:hover {
  background-color: #e0e0e0;
}

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

.page-latest-matches__faq-answer {
  padding: 20px;
  font-size: 1.1em;
  color: #333333;
  background-color: #ffffff;
}

/* Responsive Styles */
@media (min-width: 769px) {
  .page-latest-matches__hero-section .page-latest-matches__container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    align-items: center;
  }

  .page-latest-matches__hero-content {
    text-align: left;
  }

  .page-latest-matches__hero-image-wrapper {
    flex-shrink: 0;
    width: 500px;
  }

  .page-latest-matches__app-download-content {
    flex-direction: row;
    text-align: left;
    justify-content: center;
    gap: 50px;
  }

  .page-latest-matches__app-cta {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .page-latest-matches {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-latest-matches__hero-title {
    font-size: 2.2em;
  }

  .page-latest-matches__hero-description {
    font-size: 1em;
  }

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

  .page-latest-matches__section-description {
    font-size: 0.9em;
  }

  /* Mobile Image/Video/Button Adaptation */
  .page-latest-matches img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-latest-matches video,
  .page-latest-matches__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-latest-matches__section,
  .page-latest-matches__card,
  .page-latest-matches__container,
  .page-latest-matches__video-section,
  .page-latest-matches__video-container,
  .page-latest-matches__video-wrapper,
  .page-latest-matches__cta-buttons,
  .page-latest-matches__button-group,
  .page-latest-matches__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-latest-matches__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  .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__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-latest-matches__cta-buttons,
  .page-latest-matches__button-group,
  .page-latest-matches__btn-container {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}