/* style/index.css */
.page-index {
  color: #ffffff; /* Light text for dark body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

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

.page-index__section-title {
  font-size: 2.5em;
  color: #FFD700; /* Accent color for titles */
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
  font-weight: bold;
}

.page-index__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #e0e0e0;
}

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

.page-index__button--primary {
  background-color: #FFD700; /* Accent color */
  color: #1A202C;
}

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

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

.page-index__button--secondary:hover {
  background-color: #FFD700;
  color: #1A202C;
}

.page-index__button--small {
  padding: 8px 18px;
  font-size: 0.9em;
  min-width: 150px; /* Smaller buttons for cards, but still >=200px width/height for images */
}

.page-index__button--text {
  background: none;
  border: none;
  color: #FFD700;
  text-decoration: underline;
  padding: 0;
  margin: 20px auto;
  display: block;
  width: fit-content;
}

.page-index__button--text:hover {
  color: #e6c200;
}

/* Hero Section */
.page-index__hero-section {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding: 80px 0;
  background-color: #1A202C;
}

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

.page-index__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2; /* Darken image for text readability */
}

.page-index__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

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

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

.page-index__hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* About Section */
.page-index__about-section {
  background-color: #0d121c;
  padding: 60px 0;
}

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

.page-index__feature-card {
  background-color: #1A202C;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index__feature-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 5px;
}

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

.page-index__feature-text {
  font-size: 1em;
  color: #e0e0e0;
}

/* Games Section */
.page-index__games-section {
  background-color: #131722;
  padding: 60px 0;
}

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

.page-index__game-card {
  background-color: #1A202C;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-index__game-card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
}

.page-index__game-card-title {
  font-size: 1.5em;
  color: #FFD700;
  margin: 20px 0 10px;
  padding: 0 15px;
}

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

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

.page-index__game-card-text {
  font-size: 0.95em;
  color: #e0e0e0;
  padding: 0 15px;
  flex-grow: 1;
}

.page-index__game-card .page-index__button {
  margin: 20px auto;
}

/* Promotions Section */
.page-index__promo-section {
  background-color: #0d121c;
  padding: 60px 0;
}

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

.page-index__promo-card {
  background-color: #1A202C;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-index__promo-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-index__promo-title {
  font-size: 1.6em;
  color: #FFD700;
  margin: 20px 0 10px;
  padding: 0 15px;
}

.page-index__promo-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-index__promo-text {
  font-size: 0.95em;
  color: #e0e0e0;
  padding: 0 15px;
  flex-grow: 1;
}

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

/* App Section */
.page-index__app-section {
  background-color: #131722;
  padding: 60px 0;
}

.page-index__app-flex {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap-reverse; /* Image on right for desktop, top for mobile */
}

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

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

.page-index__app-image-wrapper {
  flex: 0 0 400px; /* Fixed width for image on desktop */
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.page-index__app-image {
  width: 400px;
  height: 450px;
  object-fit: contain;
}

/* Responsible Gaming Section */
.page-index__responsible-gaming-section {
  background-color: #0d121c;
  padding: 60px 0;
}

/* Contact Section */
.page-index__contact-section {
  background-color: #131722;
  padding: 60px 0;
}

.page-index__contact-section .page-index__button {
  min-width: 250px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-index__hero-title {
    font-size: 3em;
  }
  .page-index__section-title {
    font-size: 2em;
  }
  .page-index__hero-section {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .page-index__hero-title {
    font-size: 2.5em;
  }
  .page-index__hero-description {
    font-size: 1.1em;
  }
  .page-index__section-title {
    font-size: 1.8em;
  }
  .page-index__section-description {
    font-size: 1em;
  }
  .page-index__hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .page-index__button {
    width: 80%;
    margin: 10px 0;
  }

  .page-index__app-flex {
    flex-direction: column-reverse;
  }
  .page-index__app-content {
    text-align: center;
  }
  .page-index__app-content .page-index__section-title,
  .page-index__app-content .page-index__section-description {
    text-align: center;
  }
  .page-index__app-image-wrapper {
    flex: none;
    width: 100%;
  }
  .page-index__app-image {
    width: 100%;
    height: auto;
    max-width: 300px;
  }

  /* IMPORTANT: Mobile content area images must be responsive and not overflow */
  .page-index img {
    max-width: 100% !important;
    height: auto !important;
  }

  .page-index__feature-icon,
  .page-index__game-card-image,
  .page-index__promo-image {
    width: 100%;
    height: auto;
    object-fit: cover; /* Maintain aspect ratio and cover area */
    min-width: 200px;
    min-height: 200px;
  }

  /* Ensure no horizontal scrolling */
  .page-index {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 2em;
  }
  .page-index__section-title {
    font-size: 1.5em;
  }
  .page-index__button {
    padding: 10px 20px;
  }
}