.page-index {
  color: #333333; /* Dark text for light body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-index__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background-color: #000000; /* Dark background for hero */
  color: #ffffff;
  text-align: center;
  padding-bottom: 60px;
}

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

.page-index__hero-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 1200px; /* Limit image width to maintain aspect ratio */
  margin: 0 auto;
  opacity: 0.7; /* Slightly dim image to make text pop */
  border-radius: 8px;
}

.page-index__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  z-index: 10;
}

.page-index__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-index__button {
  display: inline-block;
  padding: 12px 25px;
  font-size: 1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 200px; /* Ensure buttons are not too small */
  text-align: center;
}

.page-index__button--register {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
}

.page-index__button--register:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
}

.page-index__button--login {
  background-color: #FCBC45;
  color: #000000;
  border: 2px solid #FCBC45;
}

.page-index__button--login:hover {
  background-color: #e6a73c;
  transform: translateY(-2px);
}

.page-index__about-section,
.page-index__games-section,
.page-index__promotions-section,
.page-index__mobile-section,
.page-index__security-support-section,
.page-index__why-choose-section,
.page-index__blog-section {
  padding: 60px 0;
  background-color: #FFFFFF;
  text-align: center;
}

.page-index__about-section,
.page-index__security-support-section,
.page-index__why-choose-section {
  background-color: #f8f8f8;
}

.page-index__heading {
  font-size: 2.2em;
  color: #000000;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

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

.page-index__text-content {
  font-size: 1.1em;
  color: #333333;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

.page-index__link-button {
  display: inline-block;
  background-color: #000000;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.page-index__link-button:hover {
  background-color: #333333;
}

.page-index__link-button--full-width {
  width: auto;
  min-width: 250px;
}

.page-index__games-section {
  background-color: #FFFFFF;
}

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

.page-index__game-card {
  background-color: #fefefe;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  transition: transform 0.3s ease;
}

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

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

.page-index__game-card-title {
  font-size: 1.4em;
  color: #000000;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__game-card-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-card-title a:hover {
  color: #FCBC45;
}

.page-index__game-card-description {
  font-size: 0.95em;
  color: #555555;
  padding: 0 15px;
  margin-bottom: 20px;
}

.page-index__mobile-section {
  background-color: #000000;
  color: #ffffff;
}

.page-index__mobile-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  text-align: left;
}

.page-index__mobile-text {
  flex: 1;
}

.page-index__mobile-section .page-index__heading {
  color: #ffffff;
}

.page-index__mobile-section .page-index__text-content {
  color: #f0f0f0;
  text-align: left;
}

.page-index__mobile-image {
  flex: 1;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  min-width: 200px; /* Ensure image is not too small */
}

.page-index__button--download,
.page-index__button--join-now {
  background-color: #FCBC45;
  color: #000000;
  border: 2px solid #FCBC45;
  margin-top: 20px;
}

.page-index__button--download:hover,
.page-index__button--join-now:hover {
  background-color: #e6a73c;
  transform: translateY(-2px);
}

.page-index__support-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

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

.page-index__blog-card {
  background-color: #fefefe;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease;
}

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

.page-index__blog-image {
  width: 100%;
  height: 180px; /* Fixed height for blog images */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-index__blog-card-title {
  font-size: 1.3em;
  color: #000000;
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__blog-card-title a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-card-title a:hover {
  color: #FCBC45;
}

.page-index__blog-card-excerpt {
  font-size: 0.9em;
  color: #555555;
  padding: 0 15px;
  margin-bottom: 15px;
}

.page-index__read-more {
  display: inline-block;
  color: #FCBC45;
  text-decoration: none;
  font-weight: bold;
  padding: 0 15px 15px;
  transition: color 0.3s ease;
}

.page-index__read-more:hover {
  color: #e6a73c;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 2.2em;
  }
  .page-index__hero-description {
    font-size: 1.1em;
  }
  .page-index__heading {
    font-size: 1.8em;
  }
  .page-index__text-content {
    font-size: 1em;
  }
  .page-index__mobile-content {
    flex-direction: column;
    text-align: center;
  }
  .page-index__mobile-image {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-bottom: 40px;
  }
  .page-index__hero-title {
    font-size: 1.8em;
    line-height: 1.3;
  }
  .page-index__hero-description {
    font-size: 0.95em;
  }
  .page-index__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__button {
    width: 80%;
    margin: 0 auto; /* Center buttons */
  }
  .page-index__about-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__mobile-section,
  .page-index__security-support-section,
  .page-index__why-choose-section,
  .page-index__blog-section {
    padding: 40px 0;
  }
  .page-index__heading {
    font-size: 1.6em;
    margin-bottom: 20px;
  }
  .page-index__text-content {
    padding: 0 10px;
    text-align: left;
  }
  .page-index__game-categories,
  .page-index__blog-posts {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  .page-index__game-card-image,
  .page-index__blog-image {
    height: auto;
  }
  .page-index__game-card,
  .page-index__blog-card {
    margin: 0 auto;
    max-width: 400px;
  }
  .page-index__support-links {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__link-button,
  .page-index__link-button--full-width {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Critical: Prevent content overflow on mobile */
  .page-index img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 1.5em;
  }
  .page-index__hero-description {
    font-size: 0.9em;
  }
  .page-index__button {
    padding: 10px 20px;
    font-size: 0.9em;
    min-width: unset;
  }
  .page-index__heading {
    font-size: 1.4em;
  }
  .page-index__game-card-title,
  .page-index__blog-card-title {
    font-size: 1.2em;
  }
}