:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07; /* Color for login/register */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #ffffff;
  --bg-dark: #26A9E0; /* Using primary color for dark background sections */
  --border-color: #e0e0e0;
}

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

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

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

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

.page-index__section-description {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Helper classes for background/text color based on contrast */
.page-index__light-bg {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

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

.page-index__dark-bg .page-index__section-title {
  color: var(--text-light);
}

.page-index__dark-bg .page-index__section-description {
  color: var(--text-light);
}

/* Buttons */
.page-index__cta-button,
.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-index__cta-button--primary,
.page-index__btn-primary {
  background-color: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-index__cta-button--primary:hover,
.page-index__btn-primary:hover {
  background-color: #1a8fbb; /* Darkened primary color */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button--secondary,
.page-index__btn-secondary {
  background-color: var(--bg-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-index__cta-button--secondary:hover,
.page-index__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 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;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
}

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

.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: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-index__hero-content h1 {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-index__hero-content p {
  font-size: 22px;
  color: var(--text-dark);
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__hero-cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%;
  max-width: 500px; /* Limit width to keep buttons centered and not too wide */
  margin: 0 auto;
}

/* Module 1: Introduction */
.page-index__introduction-section {
  padding-bottom: 0; /* Adjust padding for the grid below */
}

.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
  text-align: left;
}

.page-index__feature-item {
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-index__feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.page-index__feature-item img {
  width: 200px; /* Ensure minimum display size */
  height: 200px; /* Ensure minimum display size */
  margin-bottom: 20px;
  display: block;
  margin-left: 0; /* Align left */
  object-fit: cover; /* Maintain aspect ratio */
  border-radius: 8px; /* Added for consistency */
}

.page-index__feature-item h3 {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index__feature-item p {
  font-size: 16px;
  color: var(--text-dark);
}

/* Module 2: Quick Access Links */
.page-index__quick-access-section {
  padding: 80px 0;
}

.page-index__quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index__quick-link-card {
  background-color: var(--bg-light);
  color: var(--text-dark);
  text-decoration: none;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-index__quick-link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.page-index__quick-link-card img {
  width: 200px; /* Ensure minimum display size */
  height: 200px; /* Ensure minimum display size */
  margin-bottom: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.page-index__quick-link-card h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-index__quick-link-card p {
  font-size: 15px;
  color: var(--text-dark);
  flex-grow: 1;
}

/* Module 3: Core Games/Services Introduction */
.page-index__games-services-section {
  padding-bottom: 0;
}

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

.page-index__game-category-item {
  background-color: var(--bg-light);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: left;
}

.page-index__game-category-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.page-index__game-category-item img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__game-category-item h3 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-index__game-category-item h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-index__game-category-item h3 a:hover {
  text-decoration: underline;
}

.page-index__game-category-item p {
  font-size: 16px;
  color: var(--text-dark);
}

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

/* Module 4: Promotions */
.page-index__promotions-section {
  padding: 80px 0;
}

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

.page-index__promotion-card {
  background-color: var(--bg-light);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.page-index__promotion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.page-index__promotion-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-index__promotion-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

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

.page-index__promotion-card h3 a:hover {
  text-decoration: underline;
}

.page-index__promotion-card p {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1; /* Push button to bottom */
}

.page-index__promotion-card .page-index__btn-secondary {
  align-self: flex-start; /* Align button to left */
}

.page-index__view-all-promotions {
  margin-top: 50px;
  margin-bottom: 30px;
}