/* style/index-popular-games.css */

/* Base styles for the page content */
.page-index-popular-games {
  font-family: Arial, sans-serif;
  color: #1F2D3D; /* Text Main color */
  background-color: #F4F7FB; /* Background color */
  line-height: 1.6;
}

/* Section general styles */
.page-index-popular-games__section {
  padding: 60px 0;
  overflow: hidden; /* Ensure no horizontal overflow */
}

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

/* Hero Section */
.page-index-popular-games__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  text-align: center;
  padding-bottom: 60px; /* Space below content */
  background: linear-gradient(180deg, #F4F7FB 0%, #E9EEF5 100%); /* Light gradient background */
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-index-popular-games__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Max width for the image */
  margin-bottom: 30px; /* Space between image and text */
}

.page-index-popular-games__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.page-index-popular-games__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-index-popular-games__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size for H1 */
  color: #2F6BFF; /* Main color */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-index-popular-games__hero-description {
  font-size: 1.15rem;
  color: #1F2D3D; /* Text Main color */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Buttons */
.page-index-popular-games__btn-primary,
.page-index-popular-games__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  white-space: nowrap; /* Prevent text wrap on desktop */
}

.page-index-popular-games__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(47, 107, 255, 0.3);
}

.page-index-popular-games__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 6px 20px rgba(47, 107, 255, 0.4);
  transform: translateY(-2px);
}

.page-index-popular-games__btn-secondary {
  background: #ffffff; /* Card BG color */
  color: #2F6BFF; /* Main color */
  border: 2px solid #2F6BFF; /* Border color */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-index-popular-games__btn-secondary:hover {
  background: #f0f5ff;
  color: #1a4fcb;
  transform: translateY(-2px);
}

.page-index-popular-games__btn-text {
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

.page-index-popular-games__btn-text:hover {
  color: #1a4fcb;
}

.page-index-popular-games__arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-index-popular-games__btn-text:hover .page-index-popular-games__arrow {
  transform: translateX(5px);
}

/* Section titles and text */
.page-index-popular-games__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #1F2D3D; /* Text Main color */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-index-popular-games__text-block {
  font-size: 1.05rem;
  color: #1F2D3D; /* Text Main color */
  margin-bottom: 20px;
  text-align: justify;
}

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

.page-index-popular-games__game-card {
  background: #ffffff; /* Card BG color */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #D6E2FF; /* Border color */
}

.page-index-popular-games__game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.page-index-popular-games__game-card-image {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index-popular-games__game-card-title {
  font-size: 1.5rem;
  color: #2F6BFF; /* Main color */
  padding: 20px 20px 10px;
  font-weight: 600;
}

.page-index-popular-games__game-card-title a {
  color: inherit;
  text-decoration: none;
}

.page-index-popular-games__game-card-title a:hover {
  text-decoration: underline;
}

.page-index-popular-games__game-card-description {
  font-size: 0.95rem;
  color: #1F2D3D; /* Text Main color */
  padding: 0 20px 15px;
  flex-grow: 1;
  text-align: justify;
}

.page-index-popular-games__game-card .page-index-popular-games__btn-text {
  padding: 0 20px 20px;
  align-self: flex-start;
}

/* Why Choose Section */
.page-index-popular-games__why-choose-section {
  background-color: #E9EEF5; /* Light background for contrast */
}

.page-index-popular-games__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-index-popular-games__feature-item {
  background: #ffffff; /* Card BG color */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #D6E2FF; /* Border color */
}

.page-index-popular-games__feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-index-popular-games__feature-title {
  font-size: 1.4rem;
  color: #2F6BFF; /* Main color */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index-popular-games__feature-description {
  font-size: 1rem;
  color: #1F2D3D; /* Text Main color */
  text-align: justify;
}

/* How to Start Section */
.page-index-popular-games__step-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-index-popular-games__step-item {
  background: #ffffff; /* Card BG color */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #D6E2FF; /* Border color */
}

.page-index-popular-games__step-title {
  font-size: 1.5rem;
  color: #2F6BFF; /* Main color */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-index-popular-games__step-description {
  font-size: 1rem;
  color: #1F2D3D; /* Text Main color */
  text-align: justify;
}

.page-index-popular-games__step-description a {
  color: #2F6BFF;
  text-decoration: none;
  font-weight: 600;
}

.page-index-popular-games__step-description a:hover {
  text-decoration: underline;
}

.page-index-popular-games__cta-center {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-index-popular-games__faq-section {
  background-color: #F4F7FB; /* Background color */
}

.page-index-popular-games__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

.page-index-popular-games__faq-item {
  background: #ffffff; /* Card BG color */
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #D6E2FF; /* Border color */
  overflow: hidden;
}

.page-index-popular-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1F2D3D; /* Text Main color */
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-index-popular-games__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for Chrome/Safari */
}

.page-index-popular-games__faq-question:hover {
  background-color: #f0f5ff;
}

.page-index-popular-games__faq-qtext {
  flex-grow: 1;
  color: #1F2D3D;
}

.page-index-popular-games__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: #2F6BFF; /* Main color */
}

.page-index-popular-games__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #1F2D3D; /* Text Main color */
  line-height: 1.7;
}

.page-index-popular-games__faq-answer p {
  margin-bottom: 0;
}

/* Conclusion Section */
.page-index-popular-games__conclusion-section {
  text-align: center;
  padding-bottom: 80px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-index-popular-games__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-index-popular-games__main-title {
    font-size: 2.5rem;
  }

  .page-index-popular-games__hero-description {
    font-size: 1.05rem;
  }

  .page-index-popular-games__section-title {
    font-size: 2.2rem;
  }

  .page-index-popular-games__game-card-grid,
  .page-index-popular-games__feature-list,
  .page-index-popular-games__step-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .page-index-popular-games__section {
    padding: 40px 0;
  }

  .page-index-popular-games__container {
    padding: 0 15px; /* Add padding for mobile */
  }

  .page-index-popular-games__hero-section {
    padding-bottom: 40px;
    padding-top: 10px !important; /* body handles header offset, small top padding */
  }

  .page-index-popular-games__hero-image-wrapper {
    margin-bottom: 15px;
  }

  .page-index-popular-games__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-index-popular-games__main-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .page-index-popular-games__hero-content {
    padding: 0 15px;
  }

  .page-index-popular-games__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .page-index-popular-games__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px; /* Ensure buttons are within container */
  }

  .page-index-popular-games__btn-primary,
  .page-index-popular-games__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important; /* Allow text to wrap */
    word-wrap: break-word !important;
    min-width: unset; /* Remove min-width for mobile */
  }

  .page-index-popular-games__section-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .page-index-popular-games__text-block {
    font-size: 0.95rem;
  }

  .page-index-popular-games__game-card-grid,
  .page-index-popular-games__feature-list,
  .page-index-popular-games__step-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index-popular-games__game-card-image {
    height: 180px; /* Adjust height for mobile cards */
  }

  .page-index-popular-games__game-card-title {
    font-size: 1.3rem;
  }

  .page-index-popular-games__feature-title,
  .page-index-popular-games__step-title {
    font-size: 1.2rem;
  }

  .page-index-popular-games__faq-question {
    font-size: 1rem;
    padding: 15px;
  }

  .page-index-popular-games__faq-toggle {
    font-size: 1.5rem;
  }

  .page-index-popular-games__faq-answer {
    font-size: 0.9rem;
    padding: 0 15px 15px;
  }
  
  /* Ensure all images are responsive on mobile */
  .page-index-popular-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all image containers are responsive on mobile */
  .page-index-popular-games__section,
  .page-index-popular-games__card,
  .page-index-popular-games__container,
  .page-index-popular-games__game-card,
  .page-index-popular-games__feature-item,
  .page-index-popular-games__step-item,
  .page-index-popular-games__hero-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content overflow */
  }
}

@media (max-width: 480px) {
  .page-index-popular-games__main-title {
    font-size: 1.5rem;
  }
  .page-index-popular-games__section-title {
    font-size: 1.4rem;
  }
}