/* style/index.css */
:root {
  --primary-color: #1A202C;
  --accent-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-light: #f8f9fa;
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --section-dark-bg: #2D3748; /* Slightly lighter dark for distinction */
}

/* Global resets for page-index context, ensuring dark theme */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--primary-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.page-index__section-title {
  font-size: clamp(24px, 5vw, 38px); /* Responsive font size */
  font-weight: bold;
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-index__section-description {
  font-size: clamp(16px, 2.5vw, 18px); /* Responsive font size */
  color: var(--text-light);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-index__btn-primary,
.page-index__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px; /* Slightly more rounded */
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  white-space: nowrap; /* Prevent text wrapping inside buttons unless explicitly broken */
  box-sizing: border-box;
  font-size: 16px;
  min-width: 150px; /* Ensure minimum width for buttons */
}

.page-index__btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: 2px solid var(--accent-color);
}

.page-index__btn-primary:hover {
  filter: brightness(115%); /* Slightly more noticeable hover */
  transform: translateY(-2px); /* Subtle lift effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.page-index__btn-secondary {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.page-index__btn-secondary:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-2px); /* Subtle lift effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.page-index__cta-full-width {
  text-align: center;
  margin-top: 40px;
}

/* Marquee Section (Fixing contrast and ensuring smooth flow) */
.marquee-section {
  background-color: var(--section-dark-bg); /* Dark background for marquee */
  padding: 10px 0;
  overflow: hidden; /* Hide overflow for the scrolling effect */
}

.marquee-container {
  display: flex;
  align-items: center;
  max-width: 1200px; /* Match main container width */
  margin: 0 auto;
  padding: 0 20px;
}

.marquee-icon {
  flex-shrink: 0; /* Prevent icon from shrinking */
  margin-right: 15px;
  font-size: 24px;
  color: var(--accent-color); /* Emphasize icon */
}

.marquee-wrapper {
  flex-grow: 1;
  overflow: hidden; /* Essential for marquee effect */
}

.marquee-content {
  display: inline-block; /* Allows content to be wider than wrapper */
  white-space: nowrap; /* Keeps all content on one line */
  /* animation: marquee-scroll 30s linear infinite; */ /* JS will control this */
}

.marquee-text {
  color: var(--accent-color); /* Gold text for contrast */
  text-decoration: none;
  font-weight: bold;
  margin: 0 15px;
  font-size: 16px;
  transition: color 0.2s ease;
}

.marquee-text:hover {
  color: var(--text-light); /* White on hover */
}

.marquee-separator {
  color: var(--text-light); /* White separator */
  margin: 0 10px;
}

/* Header (Ensuring nav links are visible) */
.main-nav .nav-link {
  color: var(--text-light); /* Ensure visibility on dark nav background */
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active { /* Assuming an active class might be added */
  color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.1); /* Subtle hover background */
  border-radius: 4px;
}

/* HERO Section */
.page-index__hero-section {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 0; /* Remove any default padding */
  margin: 0; /* Remove any default margin */
}

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

.page-index__hero-image {
  width: 100%;
  height: auto; /* Maintain aspect ratio */
  line-height: 0; /* Remove extra space below image */
}

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

/* Products Section */
.page-index__products-section {
  padding: 60px 0;
  background-color: var(--primary-color);
}

.page-index__products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column; /* Stack grids on mobile */
  gap: 20px;
}

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

.page-index__products-grid--small {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
}

.page-index__products-grid--large {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
}

.page-index__product-card {
  background-color: var(--card-bg-dark); /* Card background */
  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;
}

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

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

.page-index__product-card-image {
  width: 100%;
  height: 0;
  padding-bottom: 66.66%; /* 3:2 aspect ratio (200/300) */
  position: relative;
}

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

/* Intro Section */
.page-index__intro-section {
  padding: 60px 0;
  background-color: var(--section-dark-bg); /* Distinct dark background */
}

/* Quick Links Section */
.page-index__quick-links-section {
  padding: 60px 0;
  background-color: var(--primary-color);
}

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

.page-index__link-card {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  padding: 25px;
  text-decoration: none;
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 150px; /* Ensure cards have some height */
}

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

.page-index__link-title {
  font-size: 22px;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index__link-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

/* Games Section */
.page-index__games-section {
  padding: 60px 0;
  background-color: var(--section-dark-bg);
}

.page-index__game-category {
  display: flex;
  flex-direction: row; /* Default layout */
  align-items: center;
  gap: 40px;
  margin-bottom: 60px;
}

.page-index__game-category:last-child {
  margin-bottom: 0;
}

.page-index__game-category--reverse {
  flex-direction: row-reverse;
}

.page-index__game-title {
  font-size: clamp(20px, 4vw, 30px);
  color: var(--accent-color);
  margin-bottom: 20px;
  text-align: left; /* Default text alignment */
  width: 100%; /* Ensure title takes full width in its flex item */
}

.page-index__game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Default text alignment */
}

.page-index__game-category--reverse .page-index__game-content {
  align-items: flex-end; /* Align content to the right for reverse */
  text-align: right;
}

.page-index__game-image {
  max-width: 50%; /* Image takes half width on desktop */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  /* margin-bottom: 20px; Removed from here, added to content for better control */
}

.page-index__game-content > img {
  margin-bottom: 20px;
}

.page-index__game-content p {
  margin-bottom: 20px;
  font-size: 17px;
}

.page-index__game-category--reverse .page-index__game-image {
  margin-left: auto; /* Push image to the right */
  margin-right: 0;
}

/* Promotions Section */
.page-index__promotions-section {
  padding: 60px 0;
  background-color: var(--primary-color);
}

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

.page-index__promo-card {
  background-color: var(--card-bg-dark);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-index__promo-image {
  width: 100%;
  height: 200px; /* Fixed height for promo images */
  object-fit: cover;
  display: block;
}

.page-index__promo-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__promo-title {
  font-size: 22px;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index__promo-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  flex-grow: 1; /* Push button to bottom */
}

/* Security & Support Section */
.page-index__security-support-section {
  padding: 60px 0;
  background-color: var(--section-dark-bg);
}

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

.page-index__feature-card {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__feature-icon {
  max-width: 100px;
  height: auto;
  margin: 0 auto 20px auto;
  display: block;
}

.page-index__feature-title {
  font-size: 22px;
  color: var(--accent-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index__feature-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.page-index__faq-section {
  padding: 60px 0;
  background-color: var(--primary-color);
}

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

.page-index__faq-item {
  background-color: var(--card-bg-dark);
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer; /* Added for better UX */
  background-color: rgba(255, 255, 255, 0.05); /* Slightly different background for question */
  transition: background-color 0.2s ease;
}

.page-index__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.1); 
}

.page-index__faq-question h3 {
  font-size: 18px;
  color: var(--accent-color);
  margin: 0;
  flex-grow: 1;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent-color);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-index__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  display: none; /* Hidden by default, JS toggles this */
  /* transition properties for height/opacity would require explicit height management in JS, so sticking to display:none */
}

/* Blog Section */
.page-index__blog-section {
  padding: 60px 0;
  background-color: var(--section-dark-bg);
}

.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-color: var(--card-bg-dark);
  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;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  display: block;
}

.page-index__blog-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-index__blog-title {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-index__blog-title a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-index__blog-title a:hover {
  color: var(--text-light);
}

.page-index__blog-summary {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__read-more {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  transition: color 0.2s ease;
  align-self: flex-start; /* Align to the left */
}

.page-index__read-more:hover {
  color: var(--text-light);
  text-decoration: underline;
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
  .page-index__game-category {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .page-index__game-category--reverse {
    flex-direction: column; /* Stack normally on mobile */
  }

  .page-index__game-content {
    align-items: center; /* Center content on mobile */
    text-align: center;
  }
  
  .page-index__game-category--reverse .page-index__game-content {
    align-items: center;
    text-align: center;
  }

  .page-index__game-image {
    max-width: 80%; /* Image takes more width on tablet */
    margin: 0 auto 20px auto;
  }

  .page-index__game-category--reverse .page-index__game-image {
    margin: 0 auto 20px auto; /* Center on mobile */
  }

  .page-index__game-title {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-index__container {
    padding: 30px 15px;
  }

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

  .page-index__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index__btn-primary,
  .page-index__btn-secondary {
    width: 100%;
    max-width: 300px; /* Limit button width even when stacked */
    margin: 0 auto;
    font-size: 15px;
  }

  .page-index__products-grid--small,
  .page-index__products-grid--large,
  .page-index__links-grid,
  .page-index__promotions-grid,
  .page-index__features-grid,
  .page-index__blog-grid {
    grid-template-columns: 1fr; /* Single column on small screens */
  }

  .page-index__product-card-image {
    padding-bottom: 75%; /* Adjust aspect ratio for better mobile display, e.g., 4:3 */
  }

  .marquee-section {
    padding: 8px 0;
  }
  
  .marquee-container {
    padding: 0 10px;
  }

  .marquee-icon {
    margin-right: 10px;
    font-size: 20px;
  }

  .marquee-text {
    font-size: 14px;
    margin: 0 10px;
  }

  .marquee-separator {
    margin: 0 8px;
  }
}

@media (max-width: 480px) {
  .page-index__section-title {
    font-size: 24px;
  }
  .page-index__faq-question h3 {
    font-size: 16px;
  }
  .page-index__faq-toggle {
    font-size: 20px;
  }
  .page-index__promo-image,
  .page-index__blog-image {
    height: 180px;
  }
}