/* style/index.css */

/* General Styles */
.page-index {
  color: #ffffff; /* Dark body background #1a1a2e, so light text */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.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: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
  line-height: 1.2;
}

.page-index__main-title {
  font-size: 42px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 25px;
  color: #ffffff;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  font-size: 16px;
}

.page-index__btn-primary {
  background: #C30808; /* Đăng ký/Đăng nhập color */
  color: #FFFF00; /* Đăng ký/Đăng nhập font color */
  border: 2px solid #C30808;
}

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

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

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

/* Dark background sections */
.page-index__dark-section {
  background: #1a1a2e;
  color: #ffffff;
}

.page-index__light-bg {
  background: #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 for header offset */
  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;
}

/* Product Display Section */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #1a1a2e; /* Using body's dark background */
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* 4 cards on left, 2 on right for desktop */
  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 product card */
  border-radius: 0; /* No round corners */
  overflow: hidden;
  background: transparent;
  box-shadow: none; /* No shadow */
  transition: transform 0.3s ease;
}

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

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

/* Module 1: Intro Section */
.page-index__intro-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-index__feature-item {
  text-align: center;
}

.page-index__feature-item img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 15px;
  border-radius: 50%;
  border: 5px solid #017439;
}

.page-index__feature-item h3 {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 10px;
}

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

.page-index__intro-summary {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto;
  color: #f0f0f0;
}

/* Module 2: Quick Access Section */
.page-index__quick-access-section {
  padding: 80px 20px;
  background: #1a1a2e;
}

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

.page-index__access-card {
  display: flex;
  flex-direction: column;
  padding: 25px;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards on dark bg */
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-index__access-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #FFFF00; /* Highlight for quick access titles */
}

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

.page-index__access-icon {
  font-size: 28px;
  align-self: flex-end;
  color: #017439;
}

/* Module 3: Core Games Section */
.page-index__games-section {
  padding: 80px 20px;
  text-align: center;
}

.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: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  padding-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-index__game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.page-index__game-card h3 {
  font-size: 22px;
  color: #ffffff;
  margin: 0 20px 10px;
}

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

.page-index__game-card .page-index__btn-secondary {
  margin: 0 20px;
  width: calc(100% - 40px);
}

/* Module 4: Promotions Section */
.page-index__promotions-section {
  padding: 80px 20px;
  background: #0d0d1a; /* Slightly lighter dark background */
}

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

.page-index__promo-card {
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0; /* Light border for light background card */
}

.page-index__promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.page-index__promo-card h3 {
  font-size: 22px;
  color: #333333;
  margin-bottom: 10px;
}

.page-index__promo-card p {
  font-size: 16px;
  color: #555555;
  margin: 0 20px 20px;
}

.page-index__promo-card .page-index__btn-primary {
  margin: 0 20px;
  width: calc(100% - 40px);
}

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

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

.page-index__info-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 30px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-index__info-card img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-index__info-card h3 {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-index__info-card p {
  font-size: 16px;
  color: #f0f0f0;
}

.page-index__contact-cta p {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 20px;
}

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

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
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(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: #ffffff;
}
.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #017439;
  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: rgba(0, 0, 0, 0.2); /* Slightly darker for answer */
  border-radius: 0 0 5px 5px;
  color: #f0f0f0;
}

/* Module 7: Blog Section */
.page-index__blog-section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-index__blog-card {
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

.page-index__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

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

.page-index__blog-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-index__blog-content h3 a {
  color: #333333; /* Dark text for light card */
  text-decoration: none;
}

.page-index__blog-content h3 a:hover {
  color: #017439;
}

.page-index__blog-content p {
  font-size: 15px;
  color: #666666;
  margin-bottom: 10px;
}

.page-index__view-all-posts {
  margin-top: 30px;
  text-align: center;
}

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

/* Mobile Responsive 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);
  }

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

@media (max-width: 768px) {
  /* HERO Section */
  .page-index__hero-section {
    padding-top: 10px !important; /* Always 10px on mobile for hero */
  }

  .page-index__main-title {
    font-size: 30px;
    margin-bottom: 15px;
  }

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

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

  /* Product Display Section */
  .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: 100% !important;
  }
  
  .page-index__products-grid--small .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Maintain aspect ratio */
  }
  
  .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: 100% !important;
  }
  
  .page-index__products-grid--large .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Maintain aspect ratio */
  }

  /* General Image Responsiveness */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-index__container,
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons Responsiveness */
  .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__quick-access-grid,
  .page-index__games-grid,
  .page-index__promotions-grid,
  .page-index__security-support-grid {
    grid-template-columns: 1fr !important; /* Stack cards vertically */
    gap: 20px !important;
  }

  .page-index__game-card img,
  .page-index__promo-card img {
    height: auto !important; /* Auto height for mobile cards */
  }

  .page-index__contact-cta {
    flex-direction: column !important;
    gap: 15px;
  }

  /* FAQ Section */
  details.page-index__faq-item summary.page-index__faq-question { padding: 15px !important; }
  .page-index__faq-qtext { font-size: 15px !important; }
  details.page-index__faq-item .page-index__faq-answer { padding: 0 15px 15px !important; }

  /* Blog Section */
  .page-index__blog-card img {
    height: auto !important;
  }
  .page-index__blog-content h3 {
    font-size: 18px !important;
  }
  .page-index__blog-content p {
    font-size: 14px !important;
  }
}