.page-index {
  /* Ensures content starts below the fixed header */
  padding-top: var(--header-offset, 120px);
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light background */
  line-height: 1.6;
}

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

.page-index__section-padding {
  padding: 80px 0;
}

.page-index__bg-dark {
  background-color: #007bff;
  color: #ffffff;
}

.page-index__bg-light {
  background-color: #f8f9fa;
  color: #333333;
}

.page-index__section-title {
  font-size: 2.8em;
  color: #007bff;
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-index__section-title--light {
  color: #ffffff;
}

.page-index__section-subtitle {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 40px;
  color: #666666;
}

.page-index__section-subtitle--light {
  color: #e0e0e0;
}

.page-index__center-text {
  text-align: center;
}

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

.page-index__button--primary {
  background-color: #ffc107; /* Auxiliary color for primary action */
  color: #007bff; /* Primary color for text */
  border: 2px solid #ffc107;
}

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

.page-index__button--secondary {
  background-color: transparent;
  color: #007bff; /* Primary color for text */
  border: 2px solid #007bff;
  margin-left: 15px;
}

.page-index__button--secondary:hover {
  background-color: #0056b3;
  color: #ffffff;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.page-index__button--tertiary {
  background-color: #007bff;
  color: #ffffff;
  border: 2px solid #007bff;
}

.page-index__button--tertiary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.page-index__button--large {
  padding: 15px 30px;
  font-size: 1.3em;
}

.page-index__link {
  color: #007bff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__link:hover {
  color: #ffc107;
  text-decoration: underline;
}

/* Hero Section */
.page-index__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 20px 60px; /* Adjusted padding-top for header offset */
  background-color: #007bff;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

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

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

.page-index__hero-description {
  font-size: 1.4em;
  margin-bottom: 40px;
  opacity: 0.9;
}

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

.page-index__hero-image {
  margin-top: 60px;
  width: 100%;
  max-width: 1200px;
  z-index: 0;
}

.page-index__hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

/* About Section */
.page-index__about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.page-index__about-text p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.page-index__about-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-index__game-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-index__game-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
  object-fit: cover;
}

.page-index__game-card-title {
  font-size: 1.6em;
  color: #ffc107;
  margin-bottom: 10px;
}

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

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

.page-index__game-card p {
  color: #e0e0e0;
  font-size: 0.95em;
  flex-grow: 1;
  margin-bottom: 15px;
}

/* Promo Section */
.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: #ffffff;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__promo-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
  object-fit: cover;
}

.page-index__promo-card-title {
  font-size: 1.8em;
  color: #007bff;
  margin-bottom: 15px;
}

.page-index__promo-card p {
  color: #555555;
  font-size: 1.05em;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* Download Section */
.page-index__download-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.page-index__download-text {
  text-align: center;
  max-width: 700px;
}

.page-index__download-steps {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  text-align: left;
  font-size: 1.1em;
  color: #e0e0e0;
}

.page-index__download-steps li {
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
}

.page-index__step-number {
  color: #ffc107;
  font-size: 1.2em;
  position: absolute;
  left: 0;
  top: 0;
}

.page-index__download-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

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

.page-index__testimonial-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__testimonial-quote {
  font-style: italic;
  font-size: 1.1em;
  color: #444444;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index__testimonial-author {
  font-weight: bold;
  color: #007bff;
}

/* FAQ Section */
.page-index__faq-item {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.page-index__faq-question {
  font-size: 1.4em;
  color: #007bff;
  margin-bottom: 10px;
}

.page-index__faq-answer {
  font-size: 1.05em;
  color: #555555;
}

/* CTA Section */
.page-index__cta-content {
  text-align: center;
}

.page-index__cta-content .page-index__section-title {
  margin-bottom: 15px;
}

.page-index__cta-content .page-index__section-subtitle {
  margin-bottom: 30px;
}

/* Blog Preview Section */
.page-index__blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__blog-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-index__blog-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__blog-card-title {
  font-size: 1.5em;
  color: #007bff;
  margin-bottom: 10px;
}

.page-index__blog-card-title a {
  color: #007bff;
  text-decoration: none;
}

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

.page-index__blog-card p {
  color: #555555;
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-index__hero-title {
    font-size: 3em;
  }
  .page-index__hero-description {
    font-size: 1.2em;
  }
  .page-index__section-title {
    font-size: 2.2em;
  }
  .page-index__about-grid {
    grid-template-columns: 1fr;
  }
  .page-index__about-image {
    order: -1; /* Image on top for mobile */
  }
}

@media (max-width: 768px) {
  .page-index {
    padding-top: var(--header-offset, 80px); /* Adjust for smaller header on mobile */
  }
  .page-index__hero-section {
    padding: 80px 20px 40px;
  }
  .page-index__hero-title {
    font-size: 2.5em;
  }
  .page-index__hero-description {
    font-size: 1.1em;
  }
  .page-index__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__button {
    width: 100%;
    margin-left: 0 !important; /* Override margin-left for stacked buttons */
  }
  .page-index__section-padding {
    padding: 60px 0;
  }
  .page-index__section-title {
    font-size: 1.8em;
  }
  .page-index__section-subtitle {
    font-size: 1em;
  }
  .page-index__game-grid, .page-index__promo-grid, .page-index__testimonial-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
  }
  .page-index__download-content {
    flex-direction: column;
  }
  /* Mobile specific image sizing to prevent overflow */
  .page-index__hero-image img,
  .page-index__about-image img,
  .page-index__game-card img,
  .page-index__promo-card img,
  .page-index__download-image img,
  .page-index__blog-card img {
    max-width: 100%;
    height: auto;
    min-width: 200px; /* Ensure images are still large enough */
    min-height: 200px; /* Ensure images are still large enough */
  }
  /* Ensure no image filter is applied */
  .page-index img {
    filter: none; /* Explicitly ensure no filter */
  }
  .page-index__hero-section,
  .page-index__about-section,
  .page-index__games-section,
  .page-index__promo-section,
  .page-index__download-section,
  .page-index__testimonials-section,
  .page-index__faq-section,
  .page-index__cta-section,
  .page-index__blog-preview {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 2em;
  }
  .page-index__hero-description {
    font-size: 1em;
  }
  .page-index__button {
    min-width: unset;
  }
  .page-index__section-padding {
    padding: 40px 0;
  }
  .page-index__section-title {
    font-size: 1.5em;
  }
  .page-index__section-subtitle {
    font-size: 0.9em;
  }
  .page-index__game-card-title,
  .page-index__promo-card-title,
  .page-index__faq-question,
  .page-index__blog-card-title {
    font-size: 1.3em;
  }
  .page-index__download-steps li {
    font-size: 1em;
  }
}