.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #ffffff);
  padding: 0;
  margin: 0;
}

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

.page-index__main-heading,
.page-index__section-heading {
  color: #26A9E0;
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  font-weight: bold;
  line-height: 1.3;
}

.page-index__text-block {
  text-align: center;
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.7;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-login,
.page-index__btn-link {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
}

.page-index__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

.page-index__btn-primary:hover {
  background: #1f8ec4;
  border-color: #1f8ec4;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-index__btn-secondary:hover {
  background: #e0f2f7;
  color: #1f8ec4;
  border-color: #1f8ec4;
  transform: translateY(-2px);
}

.page-index__btn-login {
  background: #EA7C07;
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-index__btn-login:hover {
  background: #c26606;
  border-color: #c26606;
  transform: translateY(-2px);
}

.page-index__btn-link {
  color: #26A9E0;
  border: none;
  background: transparent;
  padding: 8px 0;
  text-decoration: underline;
}

.page-index__btn-link:hover {
  color: #1f8ec4;
}

.page-index__dark-section {
  background-color: #26A9E0;
  color: #ffffff;
}

.page-index__dark-section .page-index__main-heading,
.page-index__dark-section .page-index__section-heading {
  color: #ffffff;
}

.page-index__dark-section .page-index__text-block {
  color: #f0f0f0;
}

.page-index__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0; /* Assuming shared.css handles body padding-top */
  margin-top: 0;
  width: 100%;
  overflow: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* Product Showcase Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: var(--background-color, #f8f8f8);
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* First 4 take 4 units, last 2 take 2 units */
  gap: 20px;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
}

.page-index__products-grid--small {
  grid-template-columns: repeat(4, 1fr);
}

.page-index__products-grid--large {
  grid-template-columns: repeat(2, 1fr);
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each card */
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-3px);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  max-width: 300px;
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain original aspect ratio */
  display: block;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 60px 20px;
  background-color: var(--background-color, #ffffff);
  text-align: center;
}

.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Core Games Section */
.page-index__games-section {
  padding: 60px 20px;
}

.page-index__game-category {
  margin-bottom: 50px;
  padding: 30px;
  background-color: #f9f9f9;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-index__game-title {
  font-size: 24px;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-index__game-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 200px;
  min-height: 200px;
}

.page-index__game-description {
  font-size: 15px;
  margin-bottom: 25px;
  line-height: 1.8;
  text-align: justify;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
}

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

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

.page-index__promotion-title {
  font-size: 20px;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-index__promotion-description {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 60px 20px;
}

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

.page-index__feature-item {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.page-index__feature-title {
  font-size: 20px;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-index__feature-description {
  font-size: 15px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 60px 20px;
}

.page-index__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
}

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-index__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Ensure content expands fully */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-index__faq-question:active {
  background: #eeeeee;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #333;
  transform: rotate(45deg);
}

/* Blog Section */
.page-index__blog-section {
  padding: 60px 20px;
}

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

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

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

.page-index__blog-image {
  width: 100%;
  height: auto;
  display: block;
  min-width: 200px;
  min-height: 200px;
}

.page-index__blog-title {
  font-size: 20px;
  margin: 20px 20px 10px 20px;
  line-height: 1.4;
}

.page-index__blog-title a {
  color: #26A9E0;
  text-decoration: none;
}

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

.page-index__blog-summary {
  font-size: 15px;
  color: #555555;
  margin: 0 20px 20px 20px;
  flex-grow: 1;
}


/* Responsive Styles */
@media (max-width: 1024px) {
  .page-index__main-heading,
  .page-index__section-heading {
    font-size: 28px;
  }

  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids */
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-index__game-category {
    padding: 25px;
  }

  .page-index__promotion-card,
  .page-index__feature-item {
    padding: 25px;
  }

  .page-index__blog-card {
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  /* HERO Main Image */
  .page-index__hero-section {
    padding-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General Containers and Images */
  .page-index__container,
  .page-index__introduction-section,
  .page-index__quick-access-section,
  .page-index__games-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__main-heading,
  .page-index__section-heading {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .page-index__text-block {
    font-size: 15px;
    text-align: left;
  }

  /* Product Showcase Section */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 100%; /* Allows cards to shrink within 2 columns */
  }
  
  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }
  
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Each large card takes full width */
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 100%;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  /* Buttons and Button Groups */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index__btn-login,
  .page-index a[class*="button"],
  .page-index a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-index__button-group {
    flex-direction: column !important;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }

  /* Core Games Section */
  .page-index__game-category {
    padding: 20px;
    margin-bottom: 30px;
  }

  .page-index__game-title {
    font-size: 20px;
  }

  .page-index__game-description {
    font-size: 14px;
  }

  /* Promotions Section */
  .page-index__promotions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__promotion-card {
    padding: 20px;
  }

  .page-index__promotion-title {
    font-size: 18px;
  }

  /* Security & Support Section */
  .page-index__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__feature-item {
    padding: 20px;
  }

  .page-index__feature-title {
    font-size: 18px;
  }

  /* FAQ Section */
  .page-index__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-index__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-index__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-index__faq-answer {
    padding: 0 15px;
  }
  
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }

  /* Blog Section */
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__blog-title {
    font-size: 18px;
    margin: 15px 15px 8px 15px;
  }

  .page-index__blog-summary {
    font-size: 14px;
    margin: 0 15px 15px 15px;
  }
}