/* style/popular-games.css */

/* Variables for consistency */
:root {
  --page-popular-games-primary-color: #1A2E44; /* Dark Blue */
  --page-popular-games-secondary-color: #FFD700; /* Gold */
  --page-popular-games-text-light: #F0F2F5; /* Light grey for text on dark bg */
  --page-popular-games-text-dark: #333333; /* Dark grey for text on light bg */
  --page-popular-games-background-light: #FFFFFF; /* White background */
  --page-popular-games-background-dark: #1A2E44; /* Dark background */
  --page-popular-games-border-color: #e0e0e0;
}

.page-popular-games {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--page-popular-games-text-dark);
  background-color: var(--page-popular-games-background-light);
}

.page-popular-games .highlight {
  color: var(--page-popular-games-secondary-color);
  font-weight: bold;
}

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

.page-popular-games__section {
  padding: 60px 0;
  text-align: center;
}

.page-popular-games__section:nth-of-type(even) {
  background-color: #f8f9fa; /* Slightly off-white for contrast */
}

.page-popular-games__section-title {
  font-size: 2.5em;
  color: var(--page-popular-games-primary-color);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 10px;
}

.page-popular-games__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--page-popular-games-secondary-color);
  border-radius: 2px;
}

.page-popular-games__section-description {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-popular-games__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.page-popular-games__btn--primary {
  background-color: var(--page-popular-games-secondary-color);
  color: var(--page-popular-games-primary-color);
  font-size: 1.1em;
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.page-popular-games__btn--primary:hover {
  background-color: #e6c200; /* Slightly darker gold */
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
  transform: translateY(-2px);
}

.page-popular-games__btn--secondary {
  background-color: var(--page-popular-games-primary-color);
  color: var(--page-popular-games-text-light);
  border: 2px solid var(--page-popular-games-secondary-color);
  font-size: 1em;
}

.page-popular-games__btn--secondary:hover {
  background-color: #2b4562; /* Slightly lighter dark blue */
  color: var(--page-popular-games-secondary-color);
  transform: translateY(-2px);
}

.page-popular-games__btn--small {
  padding: 8px 18px;
  font-size: 0.9em;
  border-radius: 5px;
}

.page-popular-games__btn--large {
  padding: 15px 35px;
  font-size: 1.3em;
  border-radius: 10px;
}

/* Hero Section */
.page-popular-games__hero {
  background: linear-gradient(135deg, var(--page-popular-games-background-dark), #3a5c81);
  color: var(--page-popular-games-text-light);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.page-popular-games__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: var(--page-popular-games-text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-popular-games__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
}

.page-popular-games__hero-image {
  position: absolute;
  bottom: -50px;
  right: -100px;
  width: 500px;
  height: auto;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
  animation: page-popular-games-float 6s ease-in-out infinite;
}

@keyframes page-popular-games-float {
  0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
  50% { transform: translateY(-10px) translateX(10px) rotate(1deg); }
  100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
}

.page-popular-games__hero > .page-popular-games__container {
  position: relative;
  z-index: 1;
}

/* Why Choose Section */
.page-popular-games__why-choose {
  background-color: var(--page-popular-games-background-light);
}

.page-popular-games__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: left;
}

.page-popular-games__feature-item {
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-popular-games__feature-title {
  font-size: 1.5em;
  color: var(--page-popular-games-primary-color);
  margin-bottom: 15px;
}

.page-popular-games__feature-description {
  font-size: 1em;
  color: #666;
}

/* Game Categories Section */
.page-popular-games__game-categories {
  background-color: #f8f9fa;
}

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

.page-popular-games__category-item {
  background-color: var(--page-popular-games-background-light);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-popular-games__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-popular-games__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 5px solid var(--page-popular-games-secondary-color);
}

.page-popular-games__category-title {
  font-size: 1.6em;
  color: var(--page-popular-games-primary-color);
  margin: 20px 0 10px;
  padding: 0 20px;
}

.page-popular-games__category-description {
  font-size: 0.95em;
  color: #666;
  padding: 0 20px 20px;
}

.page-popular-games__category-item .page-popular-games__btn {
  margin-bottom: 25px;
}

/* Detail Pages Section */
.page-popular-games__detail-pages {
  background-color: var(--page-popular-games-background-light);
}

.page-popular-games__detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  text-align: left;
}

.page-popular-games__detail-item {
  background-color: #fff;
  border: 1px solid var(--page-popular-games-border-color);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-popular-games__detail-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-popular-games__detail-title {
  font-size: 1.3em;
  margin-bottom: 10px;
}

.page-popular-games__detail-title a {
  color: var(--page-popular-games-primary-color);
  text-decoration: none;
}

.page-popular-games__detail-title a:hover {
  color: var(--page-popular-games-secondary-color);
  text-decoration: underline;
}

.page-popular-games__detail-description {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 20px;
}

/* How To Join Section */
.page-popular-games__how-to-join {
  background-color: #f8f9fa;
}

.page-popular-games__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: left;
}

.page-popular-games__step-item {
  background-color: var(--page-popular-games-background-light);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  padding-top: 70px;
}

.page-popular-games__step-number {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--page-popular-games-secondary-color);
  color: var(--page-popular-games-primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(255, 215, 0, 0.4);
}

.page-popular-games__step-title {
  font-size: 1.4em;
  color: var(--page-popular-games-primary-color);
  margin-bottom: 10px;
}

.page-popular-games__step-description {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 20px;
}

/* FAQ Section */
.page-popular-games__faq {
  background-color: var(--page-popular-games-background-light);
}

.page-popular-games__faq-list {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-popular-games__faq-item {
  border-bottom: 1px solid var(--page-popular-games-border-color);
  padding: 20px 0;
}

.page-popular-games__faq-item:last-child {
  border-bottom: none;
}

.page-popular-games__faq-question {
  font-size: 1.2em;
  color: var(--page-popular-games-primary-color);
  cursor: pointer;
  margin-bottom: 10px;
  position: relative;
  padding-right: 30px;
}

.page-popular-games__faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  color: var(--page-popular-games-secondary-color);
  transition: transform 0.3s ease;
}

.page-popular-games__faq-question.active::after {
  content: '-';
  transform: translateY(-50%) rotate(180deg);
}

.page-popular-games__faq-answer {
  font-size: 1em;
  color: #666;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding-left: 15px;
}

.page-popular-games__faq-answer.open {
  max-height: 200px; /* Adjust as needed for content length */
  padding-top: 10px;
}

/* Final CTA Section */
.page-popular-games__cta-final {
  background: var(--page-popular-games-primary-color);
  color: var(--page-popular-games-text-light);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.page-popular-games__cta-title {
  font-size: 3em;
  color: var(--page-popular-games-text-light);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-popular-games__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
}

.page-popular-games__cta-image {
  position: absolute;
  top: -50px;
  left: -100px;
  width: 500px;
  height: auto;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  animation: page-popular-games-float-reverse 6s ease-in-out infinite;
}

@keyframes page-popular-games-float-reverse {
  0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
  50% { transform: translateY(10px) translateX(-10px) rotate(-1deg); }
  100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
}

.page-popular-games__cta-final > .page-popular-games__container {
  position: relative;
  z-index: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-popular-games__hero-title {
    font-size: 3em;
  }
  .page-popular-games__section-title {
    font-size: 2em;
  }
  .page-popular-games__cta-title {
    font-size: 2.5em;
  }
  .page-popular-games__hero-image, .page-popular-games__cta-image {
    width: 400px;
  }
}

@media (max-width: 768px) {
  .page-popular-games__hero {
    padding: 60px 0;
  }
  .page-popular-games__hero-title {
    font-size: 2.5em;
  }
  .page-popular-games__hero-description {
    font-size: 1.1em;
  }
  .page-popular-games__section {
    padding: 40px 0;
  }
  .page-popular-games__section-title {
    font-size: 1.8em;
  }
  .page-popular-games__features, .page-popular-games__category-grid, .page-popular-games__detail-list, .page-popular-games__steps {
    grid-template-columns: 1fr;
  }
  .page-popular-games__hero-image, .page-popular-games__cta-image {
    width: 300px;
    bottom: -30px;
    right: -50px;
    top: -30px;
    left: -50px;
  }
  .page-popular-games__cta-title {
    font-size: 2em;
  }
  .page-popular-games__btn--large {
    font-size: 1.1em;
    padding: 12px 25px;
  }
  .page-popular-games__step-item {
    padding-top: 30px;
    padding-left: 70px;
  }
  .page-popular-games__step-number {
    top: 20px;
    left: 20px;
  }
}

@media (max-width: 480px) {
  .page-popular-games__hero-title {
    font-size: 2em;
  }
  .page-popular-games__section-title {
    font-size: 1.5em;
  }
  .page-popular-games__cta-title {
    font-size: 1.8em;
  }
  .page-popular-games__btn--primary, .page-popular-games__btn--secondary {
    font-size: 0.9em;
    padding: 10px 20px;
  }
  .page-popular-games__hero-image, .page-popular-games__cta-image {
    display: none;
  }
}