/* style/index.css */

/* General Styles */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: #FFFFFF;
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #017439;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.2;
}

.page-index__main-title {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #017439;
  text-align: center;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(24px, 4vw, 48px); /* H1 clamp font size */
}

.page-index__description {
  font-size: 18px;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__content-text {
  font-size: 16px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 20px;
  text-align: justify;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-index__btn-primary:hover {
  background-color: #005f2e;
  border-color: #005f2e;
}

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

.page-index__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005f2e;
  border-color: #005f2e;
}

.page-index__button-centered {
  display: block;
  margin: 30px auto 0 auto;
  max-width: 300px;
}

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

.page-index__dark-bg .page-index__section-title,
.page-index__dark-bg .page-index__description,
.page-index__dark-bg .page-index__content-text {
  color: #ffffff;
}

.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: 10px; /* Assuming shared.css handles body padding-top */
  margin-top: 0;
  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;
}

/* Products Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #f8f8f8;
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr;
  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;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease;
  justify-self: center;
}

.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;
  display: block;
}

/* Introduction Section */
.page-index__introduction-section {
  padding: 60px 20px;
  background-color: #ffffff;
}

.page-index__intro-image-wrapper {
  margin: 40px auto;
  max-width: 800px;
  text-align: center;
}

.page-index__intro-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 60px 20px;
  text-align: center;
}

.page-index__button-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.page-index__button-group .page-index__cta-button {
  min-width: 180px;
}

.page-index__button-group .page-index__cta-button:nth-child(1) {
  background-color: #C30808;
  border-color: #C30808;
  color: #FFFF00;
}

.page-index__button-group .page-index__cta-button:nth-child(1):hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-index__button-group .page-index__cta-button:nth-child(2) {
  background-color: #C30808;
  border-color: #C30808;
  color: #FFFF00;
}

.page-index__button-group .page-index__cta-button:nth-child(2):hover {
  background-color: #a30606;
  border-color: #a30606;
}

/* Core Games Section */
.page-index__core-games-section {
  padding: 60px 20px;
  background-color: #f8f8f8;
}

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

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

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

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

.page-index__game-description {
  font-size: 15px;
  color: #666666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.page-index__content-image-wrapper {
  margin: 40px auto;
  max-width: 800px;
  text-align: center;
}

.page-index__content-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.page-index__promo-card {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-index__promo-title {
  font-size: 22px;
  color: #FFFF00;
  margin-bottom: 15px;
}

.page-index__promo-description {
  font-size: 15px;
  color: #f0f0f0;
  line-height: 1.6;
}

.page-index__promo-image-wrapper {
  margin: 40px auto;
  max-width: 1200px;
  text-align: center;
}

.page-index__promo-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

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

.page-index__feature-item {
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.page-index__feature-description {
  font-size: 15px;
  color: #666666;
  line-height: 1.6;
}

.page-index__security-image-wrapper {
  margin: 40px auto;
  max-width: 800px;
  text-align: center;
}

.page-index__security-image-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.page-index__faq-list {
  margin-top: 40px;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}

details.page-index__faq-item summary.page-index__faq-question:hover {
  background: #f5f5f5;
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #017439;
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
}

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

.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-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__blog-image-wrapper {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

.page-index__blog-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-index__blog-card h3 {
  padding: 20px 20px 10px;
  margin: 0;
}

.page-index__blog-card h3 a {
  font-size: 20px;
  color: #017439;
  text-decoration: none;
  font-weight: 600;
  display: block;
}

.page-index__blog-card h3 a:hover {
  color: #005f2e;
}

.page-index__blog-meta {
  font-size: 13px;
  color: #999999;
  padding: 0 20px;
  margin-bottom: 15px;
}

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

.page-index__read-more {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 20px 20px;
  background-color: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-index__read-more:hover {
  background-color: #005f2e;
}

/* Responsive Styles */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-index__container {
    padding: 30px 15px;
  }

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

  .page-index__main-title {
    font-size: clamp(22px, 3.5vw, 40px);
  }

  .page-index__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index__products-section {
    padding: 40px 15px;
  }

  .page-index__products-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

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

  .page-index__button-group {
    gap: 15px;
  }

  .page-index__game-categories,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .page-index__game-card,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    padding: 25px;
  }

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

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

  .page-index__blog-card h3 a {
    font-size: 18px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO Section */
  .page-index__hero-section {
    padding-top: 10px !important; /* Specific mobile override */
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

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

  /* Products Section */
  .page-index__products-section {
    padding: 30px 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%; /* Ensure cards are responsive within their grid cell */
  }

  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__products-grid--large {
    grid-template-columns: 1fr;
    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%; /* Ensure cards are responsive within their grid cell */
  }

  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Generic Image and Container Mobile Rules */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__container,
  .page-index__introduction-section,
  .page-index__quick-access-section,
  .page-index__core-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;
  }

  /* Buttons and Button Containers */
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .page-index__cta-button,
  .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;
    font-size: 15px;
  }

  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    flex-direction: column !important;
    gap: 10px;
  }

  .page-index__button-centered {
    max-width: 100%;
  }

  /* Other Content Modules */
  .page-index__section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .page-index__main-title {
    font-size: clamp(20px, 6vw, 36px);
    margin-bottom: 15px;
  }

  .page-index__description {
    font-size: 15px;
    margin-bottom: 25px;
  }

  .page-index__content-text {
    font-size: 15px;
  }

  .page-index__intro-image-wrapper,
  .page-index__content-image-wrapper,
  .page-index__promo-image-wrapper,
  .page-index__security-image-wrapper {
    margin: 30px auto;
  }

  .page-index__game-categories,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__game-card,
  .page-index__promo-card,
  .page-index__feature-item,
  .page-index__blog-card {
    padding: 20px;
  }

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

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

  .page-index__blog-image-wrapper {
    height: 180px;
  }

  .page-index__blog-card h3 a {
    font-size: 18px;
  }

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

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

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

  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }
}