/* style/index.css */

/* --- Base Styles and Global Overrides within page-index scope --- */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Text Main */
  background-color: var(--deep-navy); /* From shared.css body background */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: 700;
  color: #F2C14E; /* Gold */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  color: #AFC4E8; /* Text Secondary */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons don't exceed container width */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  text-align: center;
}

.page-index__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Button gradient */
  color: #ffffff;
  border: none;
}

.page-index__btn-primary:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  background: transparent;
  color: #F2C14E; /* Gold */
  border: 2px solid #F2C14E; /* Gold border */
}

.page-index__btn-secondary:hover {
  background: #F2C14E; /* Gold */
  color: var(--deep-navy);
  transform: translateY(-2px);
}

.page-index__card {
  background-color: #10233F; /* Card BG */
  border: 1px solid #244D84; /* Border color */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* --- 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;
  width: 100%;
  box-sizing: border-box;
}

.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 Showcase Section --- */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background-color: var(--deep-navy);
  box-sizing: border-box;
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: 4 small cards + 2 large cards */
  gap: 20px;
  width: 100%;
  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 small cards in a row */
}

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

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

.page-index__product-card:hover {
  transform: translateY(-3px); /* Only 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; /* Max width for the image container */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
  object-fit: contain; /* Ensure entire image is visible */
}

/* --- Module 1: Homepage Introduction --- */
.page-index__intro-section {
  padding: 80px 20px;
  background-color: #08162B; /* Deep Navy */
  color: #F3F8FF;
  box-sizing: border-box;
}

/* --- Module 2: Quick Access Links --- */
.page-index__quick-links-section {
  padding: 80px 20px;
  background-color: var(--deep-navy);
  box-sizing: border-box;
}

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

.page-index__link-card {
  display: block;
  text-decoration: none;
  padding: 30px;
  border-radius: 12px;
  background-color: #10233F; /* Card BG */
  border: 1px solid #244D84; /* Border color */
  color: #F3F8FF;
  transition: transform 0.3s ease, background-color 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-index__link-card:hover {
  transform: translateY(-5px);
  background-color: #1B3357; /* Slightly lighter for hover */
}

.page-index__link-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #F2C14E; /* Gold */
}

.page-index__link-text {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
}

/* --- Module 3: Core Games/Services --- */
.page-index__core-games-section {
  padding: 80px 20px;
  background-color: #08162B; /* Deep Navy */
  box-sizing: border-box;
}

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

.page-index__game-card {
  text-align: center;
  padding: 25px;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__game-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  object-fit: cover;
}

.page-index__game-title {
  font-size: 22px;
  font-weight: 700;
  color: #F2C14E; /* Gold */
  margin-bottom: 15px;
  flex-grow: 0; /* Prevent title from expanding too much */
}

.page-index__game-text {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to take available space */
}

/* --- Module 4: Promotions --- */
.page-index__promotions-section {
  padding: 80px 20px;
  background-color: var(--deep-navy);
  box-sizing: border-box;
}

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

.page-index__promo-card {
  text-align: left;
  padding: 0;
}

.page-index__promo-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.page-index__promo-image {
  max-width: 100%;
  height: auto;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-bottom: 0;
  display: block;
  object-fit: cover;
}

.page-index__promo-title {
  font-size: 22px;
  font-weight: 700;
  color: #F2C14E; /* Gold */
  margin-bottom: 15px;
  flex-grow: 0;
}

.page-index__promo-text {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
}

/* --- Module 5: Security & Customer Service --- */
.page-index__security-cs-section {
  padding: 80px 20px;
  background-color: #08162B; /* Deep Navy */
  box-sizing: border-box;
}

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

.page-index__feature-item {
  text-align: center;
  padding: 25px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.page-index__feature-icon {
  max-width: 100%;
  height: auto;
  width: 100px; /* Example fixed width for icons, but still responsive */
  height: 100px; /* Example fixed height for icons, but still responsive */
  object-fit: contain;
  margin: 0 auto 20px auto;
  display: block;
}

.page-index__feature-title {
  font-size: 22px;
  font-weight: 700;
  color: #F2C14E; /* Gold */
  margin-bottom: 15px;
}

.page-index__feature-text {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
}

/* --- Module 6: FAQ --- */
.page-index__faq-section {
  padding: 80px 20px;
  background-color: var(--deep-navy);
  box-sizing: border-box;
}

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid #244D84; /* Border color */
  overflow: hidden;
  background-color: #10233F; /* Card BG */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
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: #F3F8FF;
}
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-color: #1B3357; /* Slightly lighter for hover */
}
.page-index__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #F2C14E; /* Gold */
}
.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #F2C14E; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 25px;
  background-color: #08162B; /* Deep Navy */
  border-radius: 0 0 12px 12px;
  color: #AFC4E8;
  font-size: 16px;
}
details.page-index__faq-item .page-index__faq-answer p {
  margin: 0;
}

/* --- Module 7: Latest Blog Content --- */
.page-index__blog-section {
  padding: 80px 20px;
  background-color: #08162B; /* Deep Navy */
  box-sizing: border-box;
}

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

.page-index__blog-card {
  text-align: left;
  padding: 0;
}

.page-index__blog-image {
  max-width: 100%;
  height: auto;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-bottom: 0;
  display: block;
  object-fit: cover;
}

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

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

.page-index__blog-title a {
  color: #F2C14E; /* Gold */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__blog-title a:hover {
  color: #4FA8FF; /* Glow */
}

.page-index__blog-meta {
  font-size: 14px;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-index__blog-excerpt {
  font-size: 16px;
  color: #AFC4E8; /* Text Secondary */
  margin-bottom: 20px;
}

/* --- Responsive Styles --- */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .page-index__section-title {
    font-size: 30px;
  }
  .page-index__section-description {
    font-size: 16px;
  }
  .page-index__products-container {
    grid-template-columns: 1fr; /* Stack product grids vertically */
    padding: 0 15px;
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr); /* 2x2 for small cards */
  }
  .page-index__products-grid--large {
    grid-template-columns: repeat(2, 1fr); /* 2 large cards in a row */
  }
  .page-index__products-section,
  .page-index__intro-section,
  .page-index__quick-links-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__security-cs-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 60px 15px;
  }
  .page-index__links-grid,
  .page-index__games-grid,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-index__game-title,
  .page-index__promo-title,
  .page-index__feature-title,
  .page-index__blog-title {
    font-size: 20px;
  }
  .page-index__link-title {
    font-size: 20px;
  }
  .page-index__faq-qtext {
    font-size: 16px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* HERO Section */
  .page-index__hero-section {
    padding-top: 10px !important; /* Fixed small top padding */
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    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;
  }

  /* Product Showcase 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; /* Stack vertically */
    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: 300px;
  }
  .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; /* 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: 300px;
  }
  .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 containers, images, and buttons */
  .page-index__section-title {
    font-size: 24px;
    margin-bottom: 15px;
  }
  .page-index__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-index__container {
    padding: 0 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-index__intro-section,
  .page-index__quick-links-section,
  .page-index__core-games-section,
  .page-index__promotions-section,
  .page-index__security-cs-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

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

  /* Buttons and button containers */
  .page-index__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    margin-top: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px; /* Add padding to button container */
  }

  .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: 12px 20px !important;
    font-size: 16px !important;
  }

  .page-index__links-grid,
  .page-index__games-grid,
  .page-index__promo-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
    margin-top: 30px;
  }

  .page-index__link-card {
    padding: 25px 20px;
  }
  .page-index__link-title {
    font-size: 20px;
  }
  .page-index__link-text {
    font-size: 15px;
  }

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

  .page-index__game-text,
  .page-index__promo-text,
  .page-index__feature-text,
  .page-index__blog-excerpt {
    font-size: 15px;
  }

  /* FAQ specific mobile styles */
  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 20px;
  }
  .page-index__faq-qtext {
    font-size: 16px;
  }
  .page-index__faq-toggle {
    font-size: 24px;
    width: 25px;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 20px;
  }
}