/* style/index.css */

/* Base styles for the page-index */
.page-index {
  color: var(--text-main);
  background: var(--background);
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary);
}

.page-index__main-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
  font-size: clamp(28px, 4vw, 48px); /* H1 with clamp for responsive font size */
}

.page-index__intro-text {
  font-size: 18px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary);
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Assuming shared.css sets 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;
}

/* Products Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: var(--background);
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* First 4 cards take 4/6, last 2 take 2/6 */
  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;
  justify-self: center; /* Center items in the grid cell */
}

.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;
}

/* About Section */
.page-index__about-section {
  padding: 80px 20px;
  background: var(--card-bg);
  color: var(--text-main);
}

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

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  border-radius: 10px;
  background: rgba(17, 168, 78, 0.1);
  border: 1px solid var(--border-color);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: inline-block;
  object-fit: contain;
}

.page-index__feature-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-main);
}

.page-index__feature-description {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Quick Links Section */
.page-index__quick-links-section {
  padding: 80px 20px;
  background: var(--background);
  text-align: center;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  border: none;
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-color);
}

.page-index__btn-secondary:hover {
  background: rgba(17, 168, 78, 0.2);
  transform: translateY(-2px);
}

/* Games Section */
.page-index__games-section {
  padding: 80px 20px;
  background: #ffffff;
  color: #333333;
}

.page-index__games-section .page-index__section-description {
  color: #555555;
}

.page-index__game-category {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.page-index__game-category:last-of-type {
  margin-bottom: 0;
}

.page-index__game-category--reverse {
  flex-direction: row-reverse;
}

.page-index__game-content {
  flex: 1;
}

.page-index__game-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #11A84E;
}

.page-index__game-text {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555555;
}

.page-index__game-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

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

.page-index__btn-text {
  display: inline-block;
  color: #11A84E;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid #11A84E;
  padding-bottom: 5px;
  transition: all 0.3s ease;
}

.page-index__btn-text:hover {
  color: #22C768;
  border-color: #22C768;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 80px 20px;
  background: var(--background);
  color: var(--text-main);
}

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

.page-index__promo-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: transform 0.3s ease;
}

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

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

.page-index__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 15px 10px 15px;
  color: var(--text-main);
}

.page-index__promo-text {
  font-size: 16px;
  color: var(--text-secondary);
  padding: 0 15px 20px 15px;
}

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

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

.page-index__security-support-section .page-index__section-description {
  color: #555555;
}

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

.page-index__security-item {
  text-align: center;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.page-index__security-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 15px;
  display: inline-block;
  object-fit: contain;
}

.page-index__security-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #11A84E;
}

.page-index__security-text {
  font-size: 16px;
  color: #555555;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 20px;
  background: var(--card-bg);
  color: var(--text-main);
}

.page-index__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--background);
}

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: rgba(17, 168, 78, 0.1);
}

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

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 20px 20px;
  background: var(--background);
  border-radius: 0 0 5px 5px;
  color: var(--text-secondary);
  font-size: 16px;
}

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

.page-index__blog-section .page-index__section-description {
  color: #555555;
}

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

.page-index__blog-card {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease;
}

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

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

.page-index__blog-content {
  padding: 20px;
}

.page-index__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-index__blog-title a:hover {
  color: #22C768;
}

.page-index__blog-meta {
  font-size: 14px;
  color: #888888;
  margin-bottom: 15px;
}

.page-index__blog-summary {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
}

.page-index__btn-readmore {
  display: inline-block;
  color: #11A84E;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid #11A84E;
  padding-bottom: 5px;
  transition: all 0.3s ease;
}

.page-index__btn-readmore:hover {
  color: #22C768;
  border-color: #22C768;
}

/* Global image responsiveness */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Dark/Light Background Specifics for contrast */
.page-index__dark-section {
  background: var(--background);
  color: var(--text-main);
}

.page-index__dark-section .page-index__section-description,
.page-index__dark-section .page-index__feature-description,
.page-index__dark-section .page-index__promo-text,
.page-index__dark-section .page-index__faq-answer {
  color: var(--text-secondary);
}

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

.page-index__light-bg .page-index__section-description,
.page-index__light-bg .page-index__game-text,
.page-index__light-bg .page-index__security-text,
.page-index__light-bg .page-index__blog-summary,
.page-index__light-bg .page-index__blog-meta {
  color: #555555;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids vertically */
  }

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

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

  .page-index__game-category {
    flex-direction: column;
  }

  .page-index__game-category--reverse {
    flex-direction: column;
  }

  .page-index__game-image {
    order: -1; /* Image above content for reverse layout */
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  /* HERO Section Mobile */
  .page-index__hero-section {
    padding-top: 10px !important; /* Specific override for mobile */
  }
  
  .page-index__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Products Section Mobile */
  .page-index__products-section {
    padding: 40px 15px;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--small .page-index__product-card-image {
    max-width: 300px !important; /* Maintain max-width for cards */
  }
  
  .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 !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__products-grid--large .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card-image {
    max-width: 300px !important;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* General Image Responsiveness Mobile */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__game-category {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Button Responsiveness Mobile */
  .page-index__cta-button,
  .page-index__btn-primary,
  .page-index__btn-secondary,
  .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 !important; /* Ensure padding inside button */
    padding-right: 15px !important;
  }
  
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    flex-direction: column !important; /* Stack buttons vertically */
  }

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

  .page-index__section-description,
  .page-index__intro-text {
    font-size: 16px;
  }

  .page-index__main-title {
    font-size: clamp(24px, 7vw, 36px);
  }

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

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

  .page-index__feature-description,
  .page-index__promo-text,
  .page-index__security-text,
  .page-index__blog-summary {
    font-size: 15px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px !important;
  }
  .page-index__faq-qtext {
    font-size: 15px !important;
  }
  .page-index__faq-toggle {
    font-size: 20px !important;
    width: 24px !important;
    height: 24px !important;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px !important;
  }
}