.page-index {
  color: #ffffff; /* Light text for dark body background */
  padding-top: var(--header-offset, 120px);
}

.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  overflow: hidden;
  min-height: 600px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.8) 0%, rgba(255, 215, 0, 0.4) 100%); /* Fallback gradient */
}

.page-index__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.6); /* Darken image slightly for text readability */
}

.page-index__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

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

.page-index__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-index__button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__button--primary {
  background-color: #FFD700;
  color: #8B0000;
}

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

.page-index__button--secondary {
  background-color: #8B0000;
  color: #FFD700;
  border: 2px solid #FFD700;
}

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

.page-index__section-title {
  font-size: 2.8em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 40px;
  margin-top: 60px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

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

.page-index__about-section,
.page-index__games-section,
.page-index__promotions-section,
.page-index__app-section,
.page-index__responsible-gaming-section,
.page-index__cta-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__about-content p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #e0e0e0;
}

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

.page-index__feature-item {
  background-color: rgba(255, 215, 0, 0.1);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-index__feature-icon {
  width: 250px; /* Minimum 200px */
  height: 187px; /* Minimum 200px */
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 2px solid #FFD700;
}

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

.page-index__feature-item p {
  font-size: 1em;
  color: #cccccc;
  line-height: 1.6;
}

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

.page-index__game-card,
.page-index__promotion-card {
  background-color: rgba(139, 0, 0, 0.3);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-index__game-image,
.page-index__promotion-image {
  width: 100%;
  height: 200px; /* Minimum 200px */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid #FFD700;
}

.page-index__game-title,
.page-index__promotion-title {
  font-size: 1.8em;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-index__game-title a,
.page-index__promotion-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-index__game-description,
.page-index__promotion-description {
  font-size: 1em;
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__button--small {
  padding: 10px 20px;
  font-size: 0.9em;
  margin-top: auto;
}

.page-index__promotions-cta {
  text-align: center;
  margin-top: 60px;
}

.page-index__app-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 50px;
  background-color: rgba(255, 215, 0, 0.1);
  padding: 60px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-index__app-content {
  flex: 1;
}

.page-index__app-content p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #e0e0e0;
}

.page-index__app-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.page-index__app-image {
  flex: 1;
  max-width: 50%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #FFD700;
  min-width: 250px; /* Ensure minimum display size */
  min-height: 200px; /* Ensure minimum display size */
}

.page-index__responsible-gaming-section p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #e0e0e0;
}

.page-index__responsible-gaming-section .page-index__button {
  margin-top: 30px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.page-index__cta-section {
  text-align: center;
  margin-top: 80px;
  padding: 80px 20px;
  background-color: rgba(139, 0, 0, 0.4);
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.page-index__cta-section .page-index__button {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 2.8em;
  }

  .page-index__section-title {
    font-size: 2.2em;
  }

  .page-index__app-section {
    flex-direction: column;
    text-align: center;
  }

  .page-index__app-image {
    max-width: 80%;
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding: 60px 15px;
    min-height: 500px;
  }

  .page-index__hero-title {
    font-size: 2.2em;
  }

  .page-index__hero-description {
    font-size: 1.1em;
  }

  .page-index__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__button {
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-index__section-title {
    font-size: 1.8em;
    margin-top: 40px;
  }

  .page-index__section-intro {
    font-size: 1em;
    margin-bottom: 40px;
  }

  .page-index__about-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__app-section,
  .page-index__responsible-gaming-section,
  .page-index__cta-section {
    padding: 40px 15px;
  }

  .page-index__feature-grid,
  .page-index__game-grid,
  .page-index__promotion-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index__feature-icon,
  .page-index__game-image,
  .page-index__promotion-image,
  .page-index__app-image {
    max-width: 100%;
    height: auto; /* Ensures images are responsive and do not overflow */
    min-width: 200px; /* Enforce min width */
    min-height: 150px; /* Enforce min height for responsiveness */
  }

  .page-index__app-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__app-image {
    max-width: 100%;
  }

  .page-index__cta-section {
    padding: 60px 15px;
  }
}

/* Ensure all images within .page-index are responsive and don't cause overflow */
@media (max-width: 768px) {
  .page-index img {
    max-width: 100% !important;
    height: auto !important;
  }
  .page-index {
    overflow-x: hidden;
  }
}