.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--auxiliary-color); /* Matches body background #FFFFFF */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
}

.page-index__text-block {
  font-size: 18px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  line-height: 1.8;
  color: #555555;
}

/* Color Contrast Classes */
.page-index__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-index__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-index__dark-section .page-index__section-title,
.page-index__dark-section .page-index__text-block,
.page-index__dark-section .page-index__feature-title,
.page-index__dark-section .page-index__feature-item p,
.page-index__dark-section .page-index__quick-link-button {
  color: #ffffff;
}

/* Hero Section */
.page-index__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #017439, #005f2c);
}

.page-index__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-index__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-index__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-index__hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #FFFF00; /* Custom color for registration/login font */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index__hero-description {
  font-size: 20px;
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #C30808; /* Custom color for login/register */
  color: #FFFF00; /* Custom color for login/register font */
  text-decoration: none;
  border-radius: 50px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-index__cta-button:hover {
  background: #a30606;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Introduction Section */
.page-index__introduction-section {
  padding: 80px 0;
  background-color: #ffffff;
  color: #333333;
}

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

.page-index__feature-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-index__feature-title {
  font-size: 24px;
  color: #017439;
  margin-top: 15px;
  margin-bottom: 10px;
}

.page-index__feature-item p {
  font-size: 16px;
  color: #666666;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 60px 0;
  background-color: #017439;
}

.page-index__quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
  justify-content: center;
}

.page-index__quick-link-button {
  display: block;
  padding: 15px 25px;
  background: #C30808; /* Custom color for login/register */
  color: #FFFF00; /* Custom color for login/register font */
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-index__quick-link-button:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Core Games Section */
.page-index__core-games-section {
  padding: 80px 0;
  background-color: #f5f5f5;
}

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

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

.page-index__game-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

.page-index__game-title {
  font-size: 22px;
  color: #017439;
  margin: 20px 15px 10px 15px;
}

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

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

.page-index__game-description {
  font-size: 16px;
  color: #666666;
  padding: 0 15px 20px 15px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: #C30808; /* Custom color for login/register */
  color: #FFFF00; /* Custom color for login/register font */
  text-decoration: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  border: none;
}

.page-index__btn-primary:hover {
  background: #a30606;
  transform: translateY(-2px);
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 0;
  background-color: #017439;
}

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

.page-index__promo-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.page-index__promo-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index__promo-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__promo-title {
  font-size: 20px;
  color: #017439;
  margin: 15px 15px 10px 15px;
}

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

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

.page-index__promo-description {
  font-size: 15px;
  color: #666666;
  padding: 0 15px 20px 15px;
}

.page-index__button-group {
  text-align: center;
  margin-top: 40px;
}

/* Security & CS Section */
.page-index__security-cs-section {
  padding: 80px 0;
  background-color: #ffffff;
}

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

.page-index__security-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.page-index__security-item img {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 5px;
}

.page-index__security-title {
  font-size: 22px;
  color: #017439;
  margin-bottom: 10px;
}

.page-index__security-item p {
  font-size: 16px;
  color: #666666;
}

.page-index__contact-info {
  text-align: center;
  margin-top: 40px;
  font-size: 18px;
  color: #555555;
}

.page-index__text-link {
  color: #017439;
  text-decoration: none;
  font-weight: bold;
}

.page-index__text-link:hover {
  text-decoration: underline;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 0;
  background-color: #017439;
}

.page-index__faq-list {
  max-width: 900px;
  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, opacity 0.3s ease;
  padding: 0 15px;
  opacity: 0;
}

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

.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: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: #333333;
}

.page-index__faq-toggle {
  font-size: 28px;
  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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Optional: rotate for 'X' effect */
}

/* Latest Blog Section */
.page-index__latest-blog-section {
  padding: 80px 0;
  background-color: #f5f5f5;
}

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

.page-index__blog-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.page-index__blog-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-index__blog-card img {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__blog-title {
  font-size: 20px;
  color: #017439;
  margin: 15px 15px 10px 15px;
}

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

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

.page-index__blog-excerpt {
  font-size: 15px;
  color: #666666;
  padding: 0 15px 20px 15px;
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
  text-decoration: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.page-index__btn-secondary:hover {
  background: #017439;
  color: #ffffff;
  transform: translateY(-2px);
}

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

  .page-index__hero-description {
    font-size: 18px;
  }

  .page-index__section-title {
    font-size: 32px;
  }

  .page-index__text-block {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-index__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__hero-title {
    font-size: 32px;
    margin-top: 20px;
  }

  .page-index__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-index__cta-button {
    padding: 12px 30px;
    font-size: 18px;
    width: 100% !important;
    max-width: 300px !important; /* Constrain max-width for aesthetic */
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .page-index__section-title {
    font-size: 28px;
  }

  .page-index__container {
    padding: 30px 15px;
  }

  .page-index__text-block {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-index__features-grid,
  .page-index__quick-links-grid,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__security-features,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__quick-link-button {
    font-size: 16px;
    padding: 12px 20px;
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__game-card img,
  .page-index__promo-card img,
  .page-index__blog-card img {
    
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    width: 100% !important;
    max-width: 250px !important; /* Constrain max-width for aesthetic */
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .page-index__faq-question {
    padding: 15px;
  }

  .page-index__faq-question h3 {
    font-size: 16px;
  }

  .page-index__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }

  /* Ensure all images are responsive and don't overflow */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__hero-container,
  .page-index__hero-image,
  .page-index__hero-content,
  .page-index__features-grid,
  .page-index__feature-item,
  .page-index__quick-links-grid,
  .page-index__quick-link-button,
  .page-index__games-grid,
  .page-index__game-card,
  .page-index__promotions-grid,
  .page-index__promo-card,
  .page-index__security-features,
  .page-index__security-item,
  .page-index__faq-list,
  .page-index__faq-item,
  .page-index__blog-grid,
  .page-index__blog-card,
  .page-index__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__hero-section .page-index__container {
    padding-left: 0;
    padding-right: 0;
  }
  .page-index__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-index__hero-title {
    font-size: 28px;
  }

  .page-index__hero-description {
    font-size: 15px;
  }

  .page-index__cta-button {
    font-size: 16px;
    padding: 10px 25px;
  }

  .page-index__section-title {
    font-size: 24px;
  }

  .page-index__text-block {
    font-size: 14px;
  }

  .page-index__feature-title,
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__security-title,
  .page-index__blog-title {
    font-size: 18px;
  }

  .page-index__feature-item p,
  .page-index__game-description,
  .page-index__promo-description,
  .page-index__security-item p,
  .page-index__contact-info,
  .page-index__blog-excerpt {
    font-size: 14px;
  }

  .page-index__faq-question h3 {
    font-size: 14px;
  }

  .page-index__faq-toggle {
    font-size: 22px;
    width: 26px;
    height: 26px;
  }
}