.page-index {
  color: #333333; /* Default text color for light background */
}

.page-index__hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px; /* Ensure hero section has a minimum height */
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
}

.page-index__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #FFFFFF;
  padding: 20px;
  max-width: 800px;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

.page-index__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FCBC45;
  line-height: 1.2;
}

.page-index__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  line-height: 1.6;
}

.page-index__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.page-index__button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 1.1em;
  border: none;
  cursor: pointer;
}

.page-index__button--register {
  background-color: #FFFFFF; /* Register button background */
  color: #000000; /* Register button text */
}

.page-index__button--register:hover {
  background-color: #f0f0f0;
}

.page-index__button--login {
  background-color: #FCBC45; /* Login button background */
  color: #000000; /* Login button text */
}

.page-index__button--login:hover {
  background-color: #e0a53b;
}

.page-index__button--primary {
  background-color: #FCBC45;
  color: #000000;
  padding: 12px 25px;
}

.page-index__button--primary:hover {
  background-color: #e0a53b;
}

.page-index__button--small {
  background-color: #FCBC45;
  color: #000000;
  padding: 10px 20px;
  font-size: 0.9em;
}

.page-index__button--small:hover {
  background-color: #e0a53b;
}

.page-index__button--download {
  background-color: #FCBC45;
  color: #000000;
  padding: 15px 30px;
}

.page-index__button--download:hover {
  background-color: #e0a53b;
}

.page-index__section-title {
  font-size: 2.5em;
  color: #000000;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FCBC45;
  border-radius: 2px;
}

.page-index__section-text {
  font-size: 1.1em;
  line-height: 1.8;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
  color: #333333;
}

.page-index__about-section,
.page-index__games-section,
.page-index__promotions-section,
.page-index__app-section,
.page-index__guide-section,
.page-index__cta-section {
  padding: 80px 20px;
  background-color: #FFFFFF; /* All sections use white background */
}

.page-index__about-container,
.page-index__games-container,
.page-index__promotions-container,
.page-index__app-container,
.page-index__guide-container,
.page-index__cta-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.page-index__feature-card {
  background-color: #f8f8f8;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.page-index__feature-card:hover {
  transform: translateY(-10px);
}

.page-index__feature-icon {
  width: 100%; /* Ensure image takes full width of its container */
  height: auto;
  max-width: 400px; /* Constrain max width for larger images */
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-index__feature-title {
  font-size: 1.8em;
  color: #000000;
  margin-bottom: 15px;
}

.page-index__feature-text {
  font-size: 1em;
  line-height: 1.7;
  color: #555555;
}

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

.page-index__category-card,
.page-index__promo-card,
.page-index__guide-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.page-index__category-card:hover,
.page-index__promo-card:hover,
.page-index__guide-card:hover {
  transform: translateY(-10px);
}

.page-index__category-image,
.page-index__promo-image,
.page-index__guide-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__category-title,
.page-index__promo-title,
.page-index__guide-title {
  font-size: 1.5em;
  color: #000000;
  padding: 15px 20px 0;
}

.page-index__category-description,
.page-index__promo-description,
.page-index__guide-description {
  font-size: 0.95em;
  color: #555555;
  padding: 10px 20px 20px;
  line-height: 1.6;
}

.page-index__promo-card .page-index__button--small {
  margin: 0 20px 20px;
}

.page-index__view-all-games,
.page-index__view-all-promos,
.page-index__view-all-resources {
  text-align: center;
  margin-top: 50px;
}

.page-index__app-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
}

.page-index__app-content {
  flex: 1;
  min-width: 300px;
}

.page-index__app-content .page-index__section-title,
.page-index__app-content .page-index__section-text {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.page-index__app-image-wrapper {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-index__app-image {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.page-index__cta-section {
  background-color: #000000;
  color: #FFFFFF;
  text-align: center;
}

.page-index__cta-title {
  color: #FCBC45;
  font-size: 3em;
  margin-bottom: 20px;
}

.page-index__cta-text {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  line-height: 1.7;
}

.page-index__cta-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 2.8em;
  }
  .page-index__section-title {
    font-size: 2em;
  }
  .page-index__app-container {
    flex-direction: column;
  }
  .page-index__app-content .page-index__section-title,
  .page-index__app-content .page-index__section-text {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    min-height: 400px;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  }
  .page-index__hero-title {
    font-size: 2em;
  }
  .page-index__hero-description {
    font-size: 1em;
  }
  .page-index__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__button {
    width: 80%;
    margin: 0 auto;
  }
  .page-index__section-title {
    font-size: 1.8em;
  }
  .page-index__section-text {
    font-size: 0.95em;
  }
  .page-index__about-features,
  .page-index__game-categories-grid,
  .page-index__promo-cards-grid,
  .page-index__guide-cards-grid {
    grid-template-columns: 1fr;
  }
  .page-index__feature-icon, .page-index__category-image, .page-index__promo-image, .page-index__guide-image, .page-index__app-image {
    max-width: 100%;
    height: auto; /* Ensure images scale down correctly */
    width: 100%;
  }
  .page-index__cta-title {
    font-size: 2em;
  }
  .page-index__cta-text {
    font-size: 1em;
  }
  .page-index__cta-actions {
    flex-direction: column;
    gap: 15px;
  }

  /* Critical: Ensure all images within .page-index are responsive */
  .page-index img {
    max-width: 100%;
    height: auto;
  }
  .page-index__feature-card img, .page-index__category-card img, .page-index__promo-card img, .page-index__guide-card img, .page-index__app-image {
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 1.8em;
  }
  .page-index__section-title {
    font-size: 1.5em;
  }
  .page-index__cta-title {
    font-size: 1.8em;
  }
  .page-index__button {
    padding: 12px 20px;
    font-size: 1em;
  }
  .page-index__button--small {
    padding: 8px 15px;
    font-size: 0.8em;
  }
  .page-index__about-section, .page-index__games-section, .page-index__promotions-section, .page-index__app-section, .page-index__guide-section, .page-index__cta-section {
    padding: 60px 15px;
  }
}