.page-sports {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #ffffff); /* Fallback to white if var not set */
}

/* Ensure text is readable on dark backgrounds, if any section has dark bg */
.page-sports__dark-bg {
  background-color: #017439; /* Main brand color */
  color: #ffffff; /* White text for dark background */
}

.page-sports__light-bg {
  background-color: #ffffff; /* Auxiliary brand color or white */
  color: #333333; /* Dark text for light background */
}

.page-sports__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-sports__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  overflow: hidden; /* Prevent image overflow */
}

.page-sports__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for hero image */
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-sports__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-sports__hero-content {
  position: relative; /* Ensure content is above the image visually if not directly stacked */
  z-index: 1;
  max-width: 900px;
  padding: 40px 20px;
  margin-top: -100px; /* Overlap slightly for visual effect, but not over the image itself */
  background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white background for readability */
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-sports__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  font-weight: 700;
  color: #017439;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-sports__description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
}

.page-sports__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  justify-content: center;
  gap: 20px;
}

.page-sports__btn-primary,
.page-sports__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;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
  text-align: center;
}

.page-sports__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

.page-sports__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-sports__btn-secondary {
  background-color: #ffffff;
  color: #017439; /* Main brand color */
  border: 2px solid #017439;
}

.page-sports__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

.page-sports__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 40px;
  padding-top: 40px;
}

.page-sports__dark-bg .page-sports__section-title {
  color: #ffffff;
}

/* About Section */
.page-sports__about-section {
  padding: 80px 0;
}

.page-sports__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-sports__feature-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

.page-sports__feature-card:hover {
  transform: translateY(-5px);
}

.page-sports__feature-icon {
  width: 100%;
  height: auto;
  max-height: 150px; /* Constrain icon height */
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-sports__feature-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
}

.page-sports__feature-text {
  color: #555555;
  flex-grow: 1; /* Allow text to grow and push button to bottom if present */
}

/* Sports Types Section */
.page-sports__sports-types {
  padding: 80px 0;
}

.page-sports__type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-sports__type-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-sports__type-card:hover {
  transform: translateY(-5px);
}

.page-sports__type-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  object-fit: cover;
}

.page-sports__type-card h3,
.page-sports__type-card p {
  padding: 0 20px;
}

.page-sports__type-title {
  font-size: 1.4em;
  color: #017439;
  margin: 20px 0 10px;
}

.page-sports__type-text {
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-sports__cta-center {
  text-align: center;
  margin-top: 50px;
}

/* Live Betting Section */
.page-sports__live-betting {
  padding: 80px 0;
}

.page-sports__live-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-sports__live-feature-item {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-sports__live-feature-img {
  width: 100%;
  height: auto;
  
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-sports__live-feature-title {
  font-size: 1.5em;
  color: #017439;
  margin-bottom: 15px;
}

.page-sports__live-feature-text {
  color: #555555;
  flex-grow: 1;
}

/* Promotions Section */
.page-sports__promotions {
  padding: 80px 0;
}

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

.page-sports__promo-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-sports__promo-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent card appearance */
  object-fit: cover;
}

.page-sports__promo-title {
  font-size: 1.4em;
  color: #017439;
  margin: 20px 0 10px;
  padding: 0 20px;
}

.page-sports__promo-text {
  color: #555555;
  margin-bottom: 20px;
  padding: 0 20px;
  flex-grow: 1;
}

/* Responsible Gaming Section */
.page-sports__responsible-gaming {
  padding: 80px 0;
}

.page-sports__responsible-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-sports__responsible-list li {
  background-color: #f9f9f9;
  border-left: 5px solid #017439;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 5px;
  color: #333333;
  font-size: 1.1em;
}

/* Final CTA Section */
.page-sports__cta-final {
  padding: 80px 0;
  text-align: center;
}

.page-sports__cta-content {
  max-width: 800px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-sports__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

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

@media (max-width: 768px) {
  .page-sports__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-sports__hero-content {
    margin-top: -80px;
    padding: 30px 15px;
  }

  .page-sports__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }

  .page-sports__description {
    font-size: 1em;
  }

  .page-sports__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-sports__btn-primary,
  .page-sports__btn-secondary {
    padding: 12px 20px;
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto; /* Center buttons */
  }

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

  .page-sports__about-section,
  .page-sports__sports-types,
  .page-sports__live-betting,
  .page-sports__promotions,
  .page-sports__responsible-gaming,
  .page-sports__cta-final {
    padding: 50px 0;
  }

  .page-sports__container {
    padding: 0 15px;
  }

  .page-sports__feature-card,
  .page-sports__type-card,
  .page-sports__live-feature-item,
  .page-sports__promo-card {
    padding: 20px;
  }

  /* Mobile image responsiveness */
  .page-sports img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile video responsiveness (if any) */
  .page-sports video,
  .page-sports__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-sports__video-section,
  .page-sports__video-container,
  .page-sports__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-sports__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Containers for images/videos/buttons on mobile */
  .page-sports__section,
  .page-sports__card,
  .page-sports__container,
  .page-sports__cta-buttons,
  .page-sports__button-group,
  .page-sports__btn-container,
  .page-sports__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}