/* style/index.css */

/* General Styles for page-index */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Text color for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

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

.page-index__main-title,
.page-index__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-index__description,
.page-index__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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

.page-index__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* Product Display Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #0a0a0a; /* Match body background */
  box-sizing: border-box;
}

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

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

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

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

.page-index__product-card {
  width: 100%;
  max-width: 300px; /* Max width for each card */
  border-radius: 0; /* No border-radius */
  overflow: hidden;
  background: transparent;
  box-shadow: none; /* No box-shadow */
  transition: transform 0.3s ease;
  margin: 0 auto; /* Center cards in their grid cell */
}

.page-index__product-card:hover {
  transform: translateY(-3px); /* Only slight lift */
}

.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 aspect ratio, no fixed height or object-fit: cover */
  display: block;
  border-radius: 0;
  box-shadow: none;
}

/* Introduction Section */
.page-index__introduction-section {
  padding: 80px 20px;
}

/* Quick Access Section */
.page-index__quick-access-section {
  padding: 60px 20px;
  background-color: #f0f0f0; /* Light background for contrast */
  color: #333333;
}

.page-index__quick-access-section .page-index__section-title,
.page-index__quick-access-section .page-index__section-description {
  color: #333333;
}

.page-index__backup-link-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9em;
  color: #555555;
}

.page-index__backup-link {
  color: #017439;
  text-decoration: underline;
}

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

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

.page-index__game-card {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for dark background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
}

.page-index__game-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  margin-bottom: 15px;
}

.page-index__game-card-title {
  font-size: 1.4em;
  color: #ffffff;
  margin: 0 15px 10px;
}

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

.page-index__game-card-title a:hover {
  color: #FFFF00;
}

.page-index__game-card-text {
  font-size: 0.95em;
  color: #f0f0f0;
  padding: 0 15px;
  margin-bottom: 20px;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 20px;
  background-color: #f0f0f0; /* Light background for contrast */
  color: #333333;
}

.page-index__promotions-section .page-index__section-title,
.page-index__promotions-section .page-index__section-description {
  color: #333333;
}

.page-index__promotion-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-index__promotion-item {
  background: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-left: 5px solid #017439;
}

.page-index__promotion-item h3 {
  color: #017439;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 10px;
}

.page-index__promotion-item p {
  color: #555555;
  font-size: 0.95em;
}

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

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

.page-index__feature-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-index__feature-item h3 {
  color: #FFFF00;
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index__feature-item p {
  color: #f0f0f0;
  font-size: 1em;
}

/* FAQ Section */
.page-index__faq-section {
  padding: 60px 20px;
  background-color: #f0f0f0; /* Light background for contrast */
  color: #333333;
}

.page-index__faq-section .page-index__section-title,
.page-index__faq-section .page-index__section-description {
  color: #333333;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  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: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  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: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}

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

.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: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

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

.page-index__blog-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.page-index__blog-card-title {
  font-size: 1.3em;
  color: #ffffff;
  margin: 15px 15px 10px;
}

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

.page-index__blog-card-title a:hover {
  color: #FFFF00;
}

.page-index__blog-card-meta {
  font-size: 0.85em;
  color: #999999;
  margin: 0 15px 10px;
}

.page-index__blog-card-excerpt {
  font-size: 0.95em;
  color: #f0f0f0;
  padding: 0 15px;
  margin-bottom: 20px;
}

/* Buttons */
.page-index__button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-index__button-group--center {
  justify-content: center;
}

.page-index__cta-button {
  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;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

/* Common image responsive styles */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
}

/* Dark/Light Background Classes */
.page-index__dark-bg {
  background-color: #0a0a0a;
  color: #ffffff;
}

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

/* --- Responsive Styles (max-width: 1024px) --- */
@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); /* 2x2 for smaller screens */
  }

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

  .page-index__main-title,
  .page-index__section-title {
    font-size: 2em;
  }

  .page-index__description,
  .page-index__section-description {
    font-size: 1em;
  }
}

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

  /* Product Display 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); /* 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% !important;
    width: 100% !important;
  }
  
  .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; /* Each card on its own row */
    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% !important;
    width: 100% !important;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  /* Buttons and Button Containers */
  .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__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-direction: column !important; /* Stack buttons vertically */
    gap: 10px;
  }

  /* Other Content Modules */
  .page-index__main-title,
  .page-index__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-index__description,
  .page-index__section-description {
    font-size: 0.95em;
    margin-bottom: 25px;
  }

  .page-index__introduction-section,
  .page-index__quick-access-section,
  .page-index__games-overview-section,
  .page-index__promotions-section,
  .page-index__security-support-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__game-categories,
  .page-index__promotion-list,
  .page-index__features-grid,
  .page-index__blog-grid {
    gap: 20px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px;
  }
  .page-index__faq-qtext {
    font-size: 15px;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 15px 15px;
  }

  .page-index__blog-card-title {
    font-size: 1.2em;
  }
  .page-index__blog-card-meta,
  .page-index__blog-card-excerpt {
    font-size: 0.9em;
  }
}