/* style/index.css */

/* Base styles for the page-index scope */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Light text for dark body background */
  background-color: #0a0a0a; /* Ensure consistency with body background */
}

/* Responsive padding for the first content module to clear fixed header */
/* The HERO section handles its own positioning, so this applies to sections after it if needed */
/* For this specific design, products section comes right after hero and doesn't need extra top padding for fixed header */

/* --- HERO Section --- */
.page-index__hero-section {
  position: relative;
  width: 100%;
  padding-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  margin-top: 0; /* Ensure no extra margin for fixed header as hero is first */
}

.page-index__hero-container {
  position: relative;
  width: 100%;
  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 Section --- */
.page-index__products-section {
  width: 100%;
  padding: 60px 20px;
  background: #0a0a0a; /* Dark background matching body */
}

.page-index__products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 4fr 2fr; /* Desktop: First 4 cards take 4/6 width, last 2 take 2/6 */
  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%;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly visible on dark background */
  border: 3px solid #ffd700; /* Gold border */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-index__product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.page-index__product-card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.page-index__product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- General Section Styles --- */
.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page-index__dark-section {
  background-color: #1A2B4C; /* Primary color as background */
  color: #ffffff;
  padding: 80px 0;
}

.page-index__light-bg {
  background-color: #f5f5f5; /* Light background for contrast */
  color: #333333;
  padding: 80px 0;
}

.page-index__heading-primary {
  font-size: 3.2em;
  color: #ffd700; /* Gold for primary heading */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
}

.page-index__heading-secondary {
  font-size: 2.5em;
  color: #ffd700; /* Gold for secondary headings */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

.page-index__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* --- CTA Buttons --- */
.page-index__cta-buttons {
  text-align: center;
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-index__btn-primary,
.page-index__btn-secondary,
.page-index__btn-small {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.page-index__btn-primary {
  background: #ffd700;
  color: #1A2B4C; /* Dark text on gold for contrast */
  border-color: #ffd700;
}

.page-index__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-3px);
}

.page-index__btn-secondary {
  background: transparent;
  color: #ffd700;
  border-color: #ffd700;
}

.page-index__btn-secondary:hover {
  background: #ffd700;
  color: #1A2B4C;
  transform: translateY(-3px);
}

.page-index__btn-small {
  padding: 10px 20px;
  font-size: 0.9em;
  background: #1A2B4C;
  color: #ffffff;
  border-color: #1A2B4C;
}

.page-index__btn-small:hover {
  background: #ffd700;
  color: #1A2B4C;
  border-color: #ffd700;
}

/* --- Quick Links Section --- */
.page-index__link-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-index__link-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-index__link-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__link-card-content {
  display: block;
  padding: 25px;
  text-decoration: none;
  color: #ffffff;
}

.page-index__link-card-title {
  font-size: 1.4em;
  color: #ffd700;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-index__link-card-desc {
  font-size: 0.95em;
  color: #f0f0f0;
}

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

.page-index__game-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding-bottom: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

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

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

.page-index__game-card-title {
  font-size: 1.5em;
  color: #1A2B4C;
  margin-bottom: 15px;
  padding: 0 20px;
}

.page-index__game-card-description {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  padding: 0 20px;
}

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

.page-index__promo-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding-bottom: 25px;
}

.page-index__promo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__promo-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index__promo-card-title {
  font-size: 1.4em;
  color: #ffd700;
  margin-bottom: 10px;
  padding: 0 20px;
}

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

/* --- Security & Support Section --- */
.page-index__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-index__feature-item {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  color: #333333;
  transition: transform 0.3s ease;
}

.page-index__feature-item:hover {
  transform: translateY(-5px);
}

.page-index__feature-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-index__feature-title {
  font-size: 1.4em;
  color: #1A2B4C;
  margin-bottom: 10px;
}

.page-index__feature-description {
  font-size: 0.95em;
  color: #555555;
}

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

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-index__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.05); /* Light translucent background for answers */
  color: #f0f0f0; /* Light text */
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #1A2B4C; /* Dark blue background for questions */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #2a3d60; /* Slightly lighter on hover */
  border-color: #ffd700;
}

.page-index__faq-question:active {
  background: #3a4d70;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: #ffffff;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #ffd700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #ffffff;
  transform: rotate(180deg);
}

/* --- Blog Section --- */
.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: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
}

.page-index__blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.page-index__blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

.page-index__blog-card-title {
  font-size: 1.4em;
  color: #1A2B4C;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-index__blog-card-date {
  font-size: 0.85em;
  color: #888888;
}

.page-index__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
  .page-index__heading-primary {
    font-size: 2.8em;
  }
  .page-index__heading-secondary {
    font-size: 2.2em;
  }
  .page-index__container {
    padding: 20px 40px;
  }
}

@media (max-width: 1024px) {
  .page-index__products-container {
    grid-template-columns: 1fr; /* Mobile: two grids stack vertically */
  }
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for small cards */
  }
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Each large card takes full width */
  }
  .page-index__products-grid--small .page-index__product-card,
  .page-index__products-grid--large .page-index__product-card {
    aspect-ratio: 1 / 1; /* Make all cards square */
  }
  .page-index__product-card-image {
    height: 100%; /* Adjust image height for square cards */
  }
  .page-index__game-categories, .page-index__promo-grid, .page-index__features-grid, .page-index__blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-index__hero-section {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  .page-index__hero-image img {
    width: 100%;
    height: auto;
  }

  .page-index__products-section {
    padding: 40px 15px;
  }
  
  .page-index__products-container {
    grid-template-columns: 1fr; /* Mobile: two grids stack vertically */
    gap: 15px;
  }
  
  .page-index__products-grid--small {
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for small cards */
    gap: 15px;
  }
  
  .page-index__products-grid--small .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square on mobile */
  }
  
  .page-index__products-grid--small .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square on mobile */
  }
  
  .page-index__products-grid--large {
    grid-template-columns: 1fr; /* Each large card takes full width */
    gap: 15px;
  }
  
  .page-index__products-grid--large .page-index__product-card {
    aspect-ratio: 1 / 1; /* Square on mobile */
  }
  
  .page-index__products-grid--large .page-index__product-card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1; /* Square on mobile */
  }

  .page-index__heading-primary {
    font-size: 2em;
    margin-bottom: 20px;
  }
  .page-index__heading-secondary {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  .page-index__paragraph {
    font-size: 1em;
  }
  .page-index__dark-section, .page-index__light-bg {
    padding: 50px 0;
  }
  .page-index__container {
    padding: 20px 15px;
  }
  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-index__btn-primary, .page-index__btn-secondary {
    width: 100%;
  }
  .page-index__link-cards-grid, .page-index__game-categories, .page-index__promo-grid, .page-index__features-grid, .page-index__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-index__link-card-title {
    font-size: 1.2em;
  }
  .page-index__game-card-title, .page-index__promo-card-title, .page-index__feature-title, .page-index__blog-card-title {
    font-size: 1.3em;
  }
  .page-index__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-index__faq-question h3 {
    font-size: 1.1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  .page-index__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-index__faq-answer {
    padding: 0 15px;
  }
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }

  /* Mobile image forced adaptation */
  .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;
  }
}

@media (max-width: 480px) {
  .page-index__heading-primary {
    font-size: 1.8em;
  }
  .page-index__heading-secondary {
    font-size: 1.6em;
  }
  .page-index__btn-primary, .page-index__btn-secondary {
    padding: 12px 20px;
    font-size: 0.9em;
  }
  .page-index__products-grid--small {
    grid-template-columns: 1fr; /* Stack small cards on very small screens */
  }
  .page-index__products-grid--small .page-index__product-card-image {
    height: 200px; /* Ensure some height for stacked cards */
  }
}