/* General styles for the page-index scope */
.page-index {
  color: var(--text-main, #F3F8FF); /* Default text color for dark background */
  background-color: var(--deep-navy, #08162B); /* Ensure dark background */
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  padding-top: 10px; /* Small top padding as body already has --header-offset */
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-index__hero-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}

.page-index__hero-image {
  width: 100%;
  margin: 0;
}

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

@media (min-width: 850px) {
  .page-index__hero-image img {
    aspect-ratio: 16/5;
    object-fit: cover;
  }
}

/* Products Section (Gameshow) */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: var(--deep-navy, #08162B);
  color: var(--text-main, #F3F8FF);
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-index__products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, 1fr); /* Desktop: 6 columns */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.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 cards in grid cells */
}

.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; /* Max width for image container */
  overflow: hidden;
}

.page-index__product-card-image img {
  max-width: 100%;
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  display: block;
  border-radius: 0; /* No round corners */
}

/* Section Title (H1) */
.page-index__section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding: 24px 12px;
  box-sizing: border-box;
  text-align: center;
  background-color: var(--deep-navy, #08162B);
  color: var(--text-main, #F3F8FF);
}
.page-index__section-title {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.75rem); /* H1 font size clamp */
  line-height: 1.35;
  color: var(--text-main, #F3F8FF);
  font-weight: 700;
}
.page-index__section-title-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  opacity: 0.6;
  background-color: var(--divider, #1B3357);
}

/* Article Body (Long SEO Text) */
.page-index__article-body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px 48px;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: var(--deep-navy, #08162B);
  color: var(--text-main, #F3F8FF);
}
.page-index__article-body h2 {
  margin: 2rem 0 1rem;
  color: var(--text-main, #F3F8FF);
  font-size: 1.75rem;
  font-weight: 600;
}
.page-index__article-body h3 {
  margin: 1.25rem 0 0.75rem;
  color: var(--text-main, #F3F8FF);
  font-size: 1.4rem;
  font-weight: 500;
}
.page-index__article-body p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-secondary, #AFC4E8);
}
.page-index__article-body ul {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 1rem;
  color: var(--text-secondary, #AFC4E8);
}
.page-index__article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-secondary, #AFC4E8);
}
.page-index__article-body a {
  color: var(--secondary-color, #1D5FD1); /* Link color */
  text-decoration: underline;
}
.page-index__article-body a:hover {
  color: var(--glow, #4FA8FF);
}
.page-index__article-figure {
  margin: 1.5rem auto;
  max-width: 800px;
  text-align: center;
}
.page-index__article-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
.page-index__article-figure figcaption {
  font-style: italic;
  font-size: 0.9em;
  color: var(--text-secondary, #AFC4E8);
  margin-top: 0.5rem;
}
.page-index__article-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--border, #244D84);
  background-color: var(--card-bg, #10233F);
  color: var(--text-main, #F3F8FF);
  font-style: italic;
  line-height: 1.7;
}

/* CTA Buttons within article body */
.page-index__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Custom button color */
  color: #ffffff; /* White text for contrast */
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
/* Generic image response */
.page-index img {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 849px) {
  .page-index__hero-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: contain !important; /* Prevent cropping on mobile */
    max-height: none !important;
    display: block !important;
  }
}

@media (max-width: 768px) {
  /* General mobile container adjustments */
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .page-index__hero-section,
  .page-index__products-section,
  .page-index__article-body,
  .page-index__section-title-wrap,
  .page-index__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important; /* Ensure content has padding */
    padding-right: 15px !important; /* Ensure content has padding */
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  /* HERO Section Mobile */
  .page-index__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    margin-top: 0 !important;
  }

  /* Products Section Mobile */
  .page-index__products-section {
    padding: 40px 15px !important;
  }
  .page-index__products-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Mobile: 2 columns */
    gap: 15px !important;
  }
  .page-index__product-card,
  .page-index__product-card-image {
    max-width: 100% !important;
  }
  .page-index__product-card-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Section Title (H1) Mobile */
  .page-index__section-title-wrap {
    padding: 20px 15px !important;
  }
  .page-index__section-title {
    font-size: clamp(1rem, 6vw, 1.5rem) !important; /* Adjust H1 for smaller screens */
  }
  .page-index__section-title-line {
    max-width: 40px !important;
  }

  /* Article Body Mobile */
  .page-index__article-body {
    padding: 0 15px 32px !important; /* Adjust padding */
    font-size: 16px !important; /* Base font size for mobile */
  }
  .page-index__article-body h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem) !important; /* H2 for mobile */
    margin: 1.5rem 0 0.8rem !important;
  }
  .page-index__article-body h3 {
    font-size: clamp(1.1rem, 4.5vw, 1.3rem) !important; /* H3 for mobile */
    margin: 1rem 0 0.6rem !important;
  }
  .page-index__article-body p,
  .page-index__article-body li {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  .page-index__article-figure {
    margin: 1rem auto !important;
  }
  .page-index__article-figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__article-quote {
    padding: 0.8rem 1rem !important;
    margin: 1rem 0 !important;
    font-size: 15px !important;
  }

  /* CTA Buttons Mobile */
  .page-index__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    margin-top: 20px !important;
  }
  .page-index__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word !important;
    padding: 12px 15px !important;
    font-size: 0.95rem !important;
  }
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
}