/* style/index.css */

/* Base Styles */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-index__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-index__description {
  font-size: 16px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-small {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary {
  background: #C30808; /* Custom color for Register/Login */
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

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

.page-index__btn-secondary {
  background: transparent;
  color: #FFFF00; /* Custom font color for Register/Login */
  border: 2px solid #C30808;
}

.page-index__btn-secondary:hover {
  background: #C30808;
  color: #ffffff;
}

.page-index__btn-small {
  padding: 8px 18px;
  font-size: 14px;
  background: #017439;
  color: #ffffff;
  border: 1px solid #017439;
}

.page-index__btn-small:hover {
  background: #005a2d;
  border-color: #005a2d;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__cta-buttons--center {
  margin-top: 40px;
  text-align: center;
}

.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HERO Main Image Area */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Aligned with shared body padding-top */
  margin-top: 0;
}

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

.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 Area */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #1a1a1a; /* Slightly lighter dark background for contrast */
}

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

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

.page-index__products-grid--small {
  grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columns for first group */
}

.page-index__products-grid--large {
  grid-template-columns: repeat(2, 1fr); /* Desktop: 2 columns for second group */
}

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each product card */
  border-radius: 0; /* No rounded corners */
  overflow: hidden;
  background: transparent;
  box-shadow: none; /* No shadow */
  transition: transform 0.3s ease;
  justify-self: center; /* Center cards in their 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; /* Preserve aspect ratio */
  display: block;
}

/* Module 1: Homepage Introduction */
.page-index__intro-section {
  padding: 80px 20px;
  background: #121212; /* Body background color */
  color: #ffffff;
}

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

.page-index__feature-item h3 {
  font-size: 20px;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 10px;
}

.page-index__feature-item p {
  font-size: 15px;
  color: #f0f0f0;
}

/* Module 2: Quick Access Links */
.page-index__quick-access-section {
  padding: 80px 20px;
  background: #0d0d0d; /* Slightly darker */
  color: #ffffff;
}

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

.page-index__access-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-index__access-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.page-index__access-card-title {
  font-size: 20px;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 10px;
}

.page-index__access-card p {
  font-size: 15px;
  color: #f0f0f0;
}

/* Module 3: Core Game/Service Introduction */
.page-index__games-section {
  padding: 80px 20px;
  background: #121212;
  color: #ffffff;
}

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

.page-index__game-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  transition: transform 0.3s ease;
}

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

.page-index__game-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-index__game-card-title {
  font-size: 22px;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-index__game-card p {
  font-size: 15px;
  color: #f0f0f0;
  padding: 0 15px 20px;
}

/* Module 4: Promotions */
.page-index__promotions-section {
  padding: 80px 20px;
  background: #0d0d0d;
  color: #ffffff;
}

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

.page-index__promotion-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

.page-index__promotion-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.page-index__promotion-card-title {
  font-size: 20px;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 10px;
}

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

/* Module 5: Security & Customer Service */
.page-index__security-support-section {
  padding: 80px 20px;
  background: #121212;
  color: #ffffff;
}

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

.page-index__security-item-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  object-fit: contain;
}

.page-index__security-item h3 {
  font-size: 20px;
  color: #FFFF00; /* Yellow for highlights */
  margin-bottom: 10px;
}

.page-index__security-item p {
  font-size: 15px;
  color: #f0f0f0;
}

/* Module 6: FAQ */
.page-index__faq-section {
  padding: 80px 20px;
  background: #0d0d0d;
  color: #ffffff;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

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

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(255, 255, 255, 0.1);
}

.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFFF00; /* Yellow for question text */
}

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

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0 8px 8px;
  color: #f0f0f0;
}

.page-index__faq-answer p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.8;
}

.page-index__faq-answer a {
  color: #FFFF00;
  text-decoration: underline;
}

.page-index__faq-answer a:hover {
  color: #ffffff;
}

/* Module 7: Latest Blog Content */
.page-index__blog-section {
  padding: 80px 20px;
  background: #121212;
  color: #ffffff;
}

.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: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

.page-index__blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.page-index__blog-card-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.page-index__blog-card-title a {
  color: #FFFF00; /* Yellow for blog titles */
  text-decoration: none;
}

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

.page-index__blog-card-date {
  font-size: 13px;
  color: #cccccc;
  margin-bottom: 10px;
}

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

/* --- Responsive Design --- */

/* Mobile/Tablet common styles */
@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(2, 1fr); /* Tablet: 2 columns for small grid */
  }

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

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

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

  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__cta-button, .page-index__btn-primary, .page-index__btn-secondary {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* HERO Main Image Area */
  .page-index__hero-section {
    padding-top: 10px !important; /* Aligned with shared body padding-top */
  }
  
  /* Product Showcase Area */
  .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); /* Mobile: 2x2 grid */
    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%; /* Adjust max-width for 2-column layout */
  }
  
  .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; /* Mobile: 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% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* Buttons */
  .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;
    padding-right: 15px;
  }
  
  .page-index__cta-buttons,
  .page-index__button-group,
  .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Ensure vertical stacking for CTA buttons */
  }

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

  .page-index__description {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .page-index__intro-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 {
    padding: 40px 15px;
  }

  .page-index__intro-features, .page-index__access-links-grid, .page-index__games-grid, .page-index__promotions-grid, .page-index__security-grid, .page-index__blog-grid {
    gap: 20px;
    margin-top: 30px;
  }

  .page-index__feature-item h3, .page-index__access-card-title, .page-index__game-card-title, .page-index__promotion-card-title, .page-index__security-item h3, .page-index__blog-card-title {
    font-size: 18px;
  }

  .page-index__feature-item p, .page-index__access-card p, .page-index__game-card p, .page-index__promotion-card p, .page-index__security-item p, .page-index__faq-answer p, .page-index__blog-card p {
    font-size: 14px;
  }

  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: 20px;
    width: 24px;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }
  .page-index__blog-card-img, .page-index__promotion-card-img {
    
  }
  .page-index__game-card-img {
    
  }
}