.page-xs__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding as per rule */
  background-color: #100224; /* Dark background for hero */
  color: #FFFFFF;
  text-align: center;
}

.page-xs__hero-visual {
  width: 100%;
  overflow: hidden;
}

.page-xs__hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/5; /* Recommended for hero, can adjust for mobile */
}

.page-xs__hero-content {
  padding: 20px;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

.page-xs__hero-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 15px;
  font-size: clamp(1.8rem, 4vw, 3rem); /* H1 font size with clamp */
}

.page-xs__hero-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #E0E0E0;
}

.page-xs__hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-xs__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 150px;
  text-align: center;
  box-sizing: border-box;
}

.page-xs__btn--primary {
  background: linear-gradient(90deg, #ff9500, #ff5e3a); /* Orange-red gradient */
  color: #FFFFFF;
  border: none;
}

.page-xs__btn--primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.page-xs__btn--secondary {
  background-color: #C30808; /* Login/Register color */
  color: #FFFF00; /* Login/Register font color */
  border: 1px solid #C30808;
}

.page-xs__btn--secondary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.page-xs__section-spacing {
  padding: 40px 20px;
  background-color: #FFFFFF; /* Default background for sections */
  color: #333333;
}

.page-xs__lottery-types {
  background-color: #F0F2F5;
}

.page-xs__section-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: #017439; /* Primary color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-xs__section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
  color: #555555;
}

.page-xs__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-xs__game-tile {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #FFFFFF;
}

.page-xs__game-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.page-xs__game-tile img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  min-width: 200px;
  min-height: 200px;
}

.page-xs__benefits {
  background-color: #FFFFFF;
}

.page-xs__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-xs__benefit-item {
  text-align: center;
  padding: 25px;
  background-color: #F8F8F8;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-xs__benefit-item img {
  width: 100%;
  
  height: auto;
  display: block;
  margin: 0 auto 15px auto;
  min-width: 200px;
  min-height: 200px;
}

.page-xs__benefit-item h3 {
  font-size: 1.4rem;
  color: #017439;
  margin-bottom: 10px;
}

.page-xs__benefit-item p {
  font-size: 1rem;
  color: #666666;
  line-height: 1.5;
}

.page-xs__how-to-play {
  background-color: #100224;
  color: #FFFFFF;
}

.page-xs__how-to-play .page-xs__section-title {
  color: #FFFFFF;
}

.page-xs__how-to-play .page-xs__section-description {
  color: #E0E0E0;
}

.page-xs__steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-xs__step-item {
  background-color: #1a053c; /* Slightly lighter dark background */
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-xs__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #ff9500, #ff5e3a); /* Orange-red gradient */
  color: #FFFFFF;
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.page-xs__step-item h3 {
  font-size: 1.3rem;
  color: #FFFFFF;
  margin-bottom: 10px;
}

.page-xs__step-item p {
  font-size: 0.95rem;
  color: #D0D0D0;
  line-height: 1.5;
}

.page-xs__step-item a {
  color: #FFFF00; /* Register/Login font color */
  text-decoration: underline;
}

.page-xs__step-item a:hover {
  color: #FFF;
}

.page-xs__latest-results {
  background-color: #F0F2F5;
}

.page-xs__results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-xs__result-card {
  background-color: #FFFFFF;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.page-xs__result-card h3 {
  font-size: 1.3rem;
  color: #017439;
  margin-bottom: 10px;
}

.page-xs__result-card p {
  font-size: 1rem;
  color: #666666;
  margin-bottom: 8px;
}

.page-xs__result-numbers {
  font-size: 1.6rem;
  font-weight: bold;
  color: #C30808; /* Use for emphasis, like winning numbers */
  margin-bottom: 15px;
}

.page-xs__btn--link {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  border: 1px solid #017439;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-xs__btn--link:hover {
  background-color: #017439;
  color: #FFFFFF;
}

.page-xs__faq {
  background-color: #FFFFFF;
}

.page-xs__faq-item {
  margin-bottom: 15px;
  border: 1px solid #EEEEEE;
  border-radius: 8px;
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-xs__faq-toggle {
  display: none;
}

.page-xs__faq-question {
  display: block;
  padding: 18px 25px;
  background-color: #F8F8F8;
  color: #017439;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s ease;
}

.page-xs__faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: #017439;
}

.page-xs__faq-toggle:checked + .page-xs__faq-question {
  background-color: #E0E0E0;
}

.page-xs__faq-toggle:checked + .page-xs__faq-question::after {
  content: '-';
}

.page-xs__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  padding: 0 25px;
  color: #555555;
}

.page-xs__faq-toggle:checked ~ .page-xs__faq-answer {
  max-height: 200px; /* Arbitrary max-height, adjust if content is longer */
  padding: 15px 25px;
}

.page-xs__faq-answer p {
  margin-bottom: 0;
  line-height: 1.6;
}

.page-xs__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

.page-xs__cta-section {
  background-color: #017439; /* Primary brand color for CTA */
  color: #FFFFFF;
  text-align: center;
}

.page-xs__cta-section .page-xs__section-title {
  color: #FFFFFF;
}

.page-xs__cta-section .page-xs__section-description {
  color: #E0E0E0;
  margin-bottom: 40px;
}

.page-xs__btn--large {
  padding: 15px 40px;
  font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 849px) {
  .page-xs__hero-visual img {
    aspect-ratio: 4/3;
  }

  .page-xs__hero-title {
    font-size: clamp(1.6rem, 6vw, 2.5rem);
  }

  .page-xs__hero-description {
    font-size: 1rem;
  }

  .page-xs__hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .page-xs__btn {
    width: 100%;
    max-width: 300px;
  }

  .page-xs__game-grid,
  .page-xs__benefits-grid,
  .page-xs__steps-grid,
  .page-xs__results-summary {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .page-xs__game-tile img,
  .page-xs__benefit-item img {
    min-width: 200px;
    min-height: 200px;
    width: 100%; /* Ensure images don't overflow */
    height: auto;
  }

  .page-xs__section-spacing {
    padding: 30px 15px;
  }

  .page-xs__section-title {
    font-size: clamp(1.3rem, 5vw, 2rem);
  }
}

@media (max-width: 549px) {
  .page-xs__hero-visual img {
    aspect-ratio: 16/9;
  }

  .page-xs__hero-content {
    padding: 15px;
  }

  .page-xs__hero-title {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  .page-xs__hero-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .page-xs__hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .page-xs__game-grid,
  .page-xs__benefits-grid,
  .page-xs__steps-grid,
  .page-xs__results-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-xs__btn--large {
    font-size: 1rem;
    padding: 12px 30px;
  }

  .page-xs__section-spacing {
    padding: 25px 10px;
  }

  .page-xs__faq-question,
  .page-xs__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Ensure content area images are responsive and don't overflow */
.page-xs img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Content area image CSS size lower bound check */
.page-xs__game-tile img,
.page-xs__benefit-item img {
  min-width: 200px;
  min-height: 200px;
}

/* Ensure no horizontal scroll on mobile */
.page-xs {
  overflow-x: hidden;
}