:root {
  --primary-color: #017439; /* Main brand color */
  --secondary-color: #FFFFFF; /* Accent/background color */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-text-yellow: #FFFF00;
  --default-bg: #FFFFFF;
}

.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light body background */
  background-color: var(--default-bg); /* Explicitly set default white background */
}

/* Global Image Styles for Content Area (min size enforcement) */
/* This rule applies to all images within .page-index. Specific image dimensions in HTML will set the display size, but this ensures a minimum rendered size. */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Ensure images fill their space without distortion */
  min-width: 200px; /* Enforce minimum image width */
  min-height: 200px; /* Enforce minimum image height */
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color) 80%); /* Example gradient, adjust if needed */
  padding-top: var(--header-offset, 120px); /* As per HERO example, ensures space below fixed header */
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--text-color-light); /* Light text on potentially dark hero background */
}

.page-index__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-color-light); /* Ensure high contrast */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability */
}

.page-index__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light); /* Ensure high contrast */
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure button doesn't exceed container */
}

.page-index__cta-button--register {
  background: var(--button-register-bg);
  color: var(--button-text-yellow);
  border: 2px solid var(--button-text-yellow);
}

.page-index__cta-button--register:hover {
  background: #a60606; /* Darker shade for hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button--login {
  background: var(--button-login-bg);
  color: var(--button-text-yellow);
  border: 2px solid var(--button-text-yellow);
}

.page-index__cta-button--login:hover {
  background: #a60606; /* Darker shade for hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-index__section {
  padding: 80px 20px;
  text-align: center;
}

.page-index__section:nth-of-type(even) {
  background-color: #f8f8f8; /* Light grey background for alternating sections */
}

.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-index__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: bold;
}

.page-index__section-description {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Module 1: About Platform */
.page-index__about-platform .page-index__content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 40px;
  text-align: left;
}

.page-index__about-platform .page-index__text-block {
  flex: 2;
  font-size: 1.05em;
  color: var(--text-color-dark);
}

.page-index__about-platform .page-index__text-block p {
  margin-bottom: 15px;
}

.page-index__about-platform .page-index__image-block {
  flex: 1;
  min-width: 300px; /* Ensure image block has a minimum width */
}

.page-index__about-platform .page-index__image-block img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Module 2: Quick Links */
.page-index__quick-links {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-index__quick-links .page-index__section-title {
  color: var(--text-color-light);
}

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

.page-index__quick-link-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-decoration: none;
  color: var(--text-color-light);
  transition: transform 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.page-index__quick-link-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
}

.page-index__link-icon {
  font-size: 3em;
  margin-bottom: 15px;
  color: var(--button-text-yellow); /* Use a vibrant color for icons */
}

.page-index__link-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: var(--text-color-light);
}

.page-index__quick-link-item p {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.8);
}

/* Module 3: Core Games */
.page-index__core-games .page-index__games-carousel {
  display: flex;
  overflow-x: auto;
  gap: 30px;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-top: 40px;
}

.page-index__game-card {
  flex: 0 0 320px; /* Fixed width for cards, adjust as needed */
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  scroll-snap-align: start;
  min-width: 280px; /* Ensure minimum width for smaller screens */
}

.page-index__game-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__game-card .page-index__game-title {
  font-size: 1.3em;
  margin: 15px 15px 10px;
  color: var(--primary-color);
}

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

.page-index__game-card .page-index__game-title a:hover {
  text-decoration: underline;
}

.page-index__game-card p {
  font-size: 0.95em;
  color: #666;
  padding: 0 15px 15px;
}

.page-index__view-more {
  margin-top: 50px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%; /* Ensure button doesn't exceed container */
}

.page-index__btn-primary:hover {
  background: #005e2e; /* Darker shade for hover */
  transform: translateY(-2px);
}

/* Module 4: Promotions */
.page-index__promotions .page-index__promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__promo-card {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__promo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-index__promo-card .page-index__promo-content {
  padding: 15px;
  flex-grow: 1;
}

.page-index__promo-card .page-index__promo-title {
  font-size: 1.25em;
  margin: 0 0 10px;
  color: var(--primary-color);
}

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

.page-index__promo-card .page-index__promo-title a:hover {
  text-decoration: underline;
}

.page-index__promo-card p {
  font-size: 0.95em;
  color: #666;
  flex-grow: 1; /* Ensure text takes up available space */
}

.page-index__view-all-promos {
  margin-top: 50px;
}

/* Module 5: Security & Customer Service */
.page-index__security-support {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-index__security-support .page-index__section-title {
  color: var(--text-color-light);
}

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

.page-index__security-support .page-index__info-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  color: var(--text-color-light);
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background 0.3s ease;
}

.page-index__security-support .page-index__info-card:hover {
  background: rgba(255, 255, 255, 0.2);
}