.page-index-popular-games {
  color: #333333; /* Dark text for light body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-index-popular-games__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.page-index-popular-games__hero-section {
  position: relative;
  text-align: center;
  color: #FFFFFF;
  padding: 100px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 600px;
  overflow: hidden;
}

.page-index-popular-games__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.7); /* Darken image for text readability */
}

.page-index-popular-games__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.page-index-popular-games__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FFFFFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-index-popular-games__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  color: #FFFFFF;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-index-popular-games__hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* General Section Styling */
.page-index-popular-games__section {
  padding: 80px 0;
  background-color: #FFFFFF;
}

.page-index-popular-games__section:nth-of-type(odd) {
  background-color: #f8f8f8;
}

.page-index-popular-games__section-title {
  font-size: 2.5em;
  color: #000000;
  text-align: center;
  margin-bottom: 30px;
}

.page-index-popular-games__section-text {
  font-size: 1.1em;
  color: #333333;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

/* Buttons */
.page-index-popular-games__button {
  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;
  white-space: nowrap;
  min-width: 150px; /* Ensure buttons are not too small */
  text-align: center;
}

.page-index-popular-games__button--primary {
  background-color: #FCBC45; /* Login color */
  color: #000000;
  border: 2px solid #FCBC45;
}

.page-index-popular-games__button--primary:hover {
  background-color: #e0a53b;
  border-color: #e0a53b;
}

.page-index-popular-games__button--secondary {
  background-color: transparent;
  color: #FFFFFF; /* Register color for hero, dark for other sections */
  border: 2px solid #FFFFFF;
}

.page-index-popular-games__hero-section .page-index-popular-games__button--secondary {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.page-index-popular-games__section:not(.page-index-popular-games__hero-section) .page-index-popular-games__button--secondary {
  color: #000000;
  border-color: #000000;
}

.page-index-popular-games__button--secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #FCBC45;
  border-color: #FCBC45;
}

.page-index-popular-games__button--small {
  padding: 10px 20px;
  font-size: 0.9em;
  min-width: 120px;
  background-color: #FCBC45;
  color: #000000;
  border: 2px solid #FCBC45;
}

.page-index-popular-games__button--small:hover {
  background-color: #e0a53b;
  border-color: #e0a53b;
}

/* Game Grid */
.page-index-popular-games__game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-index-popular-games__game-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 20px;
}

.page-index-popular-games__game-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-index-popular-games__game-card-title {
  font-size: 1.6em;
  color: #000000;
  margin-bottom: 15px;
  padding: 0 15px;
}

.page-index-popular-games__game-card-description {
  font-size: 0.95em;
  color: #555555;
  padding: 0 15px;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Mobile Layout */
.page-index-popular-games__mobile-layout {
  display: flex;
  align-items: center;
  gap: 50px;
  text-align: left;
}

.page-index-popular-games__mobile-content {
  flex: 1;
}

.page-index-popular-games__mobile-image {
  flex: 1;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.page-index-popular-games__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.page-index-popular-games__faq-question {
  font-size: 1.3em;
  color: #000000;
  margin-bottom: 10px;
}

.page-index-popular-games__faq-answer {
  font-size: 1em;
  color: #555555;
}

/* CTA Section */
.page-index-popular-games__cta-content {
  text-align: center;
}

.page-index-popular-games__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index-popular-games__hero-title {
    font-size: 2.8em;
  }

  .page-index-popular-games__hero-description {
    font-size: 1.1em;
  }

  .page-index-popular-games__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games__hero-section {
    padding: 80px 15px;
    min-height: 450px;
  }

  .page-index-popular-games__hero-title {
    font-size: 2.2em;
  }

  .page-index-popular-games__hero-description {
    font-size: 1em;
  }

  .page-index-popular-games__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-index-popular-games__button {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-index-popular-games__section {
    padding: 60px 0;
  }

  .page-index-popular-games__section-title {
    font-size: 1.8em;
  }

  .page-index-popular-games__section-text {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-index-popular-games__game-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-index-popular-games__game-card-image {
    height: 200px;
  }

  .page-index-popular-games__mobile-layout {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .page-index-popular-games__mobile-image {
    max-width: 100%;
    height: auto; /* Ensure mobile images do not overflow */
  }
  
  /* Ensure all images within content area are responsive and not smaller than 200px display size */
  .page-index-popular-games img {
    max-width: 100%;
    height: auto;
    min-width: 200px;
    min-height: 200px;
  }
  
  .page-index-popular-games__game-card-image {
    min-width: 280px; /* Card width minimum */
    min-height: 200px;
  }
  
  .page-index-popular-games__mobile-image {
    min-width: 280px; /* Example for content image */
    min-height: 200px;
  }

  .page-index-popular-games__faq-item {
    padding: 20px;
  }

  .page-index-popular-games__faq-question {
    font-size: 1.1em;
  }

  .page-index-popular-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}