.page-resources-popular-games {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: var(--primary-color, #1A202C); /* Ensure consistency with body background */
}

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

.page-resources-popular-games__dark-bg {
  background-color: #1A202C;
  color: #ffffff;
}

.page-resources-popular-games__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-resources-popular-games__highlight {
  color: #FFD700;
  font-weight: bold;
}

/* Hero Section */
.page-resources-popular-games__hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Add padding for fixed header on desktop */
  min-height: 70vh;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.page-resources-popular-games__hero-content {
  flex: 1;
  max-width: 600px;
  padding-left: 20px;
  z-index: 1;
}

.page-resources-popular-games__main-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFD700;
}

.page-resources-popular-games__hero-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-resources-popular-games__hero-cta-buttons {
  display: flex;
  gap: 20px;
}

.page-resources-popular-games__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 20px;
  z-index: 0;
}

.page-resources-popular-games__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* General Section Styling */
.page-resources-popular-games__games-overview-section,
.page-resources-popular-games__strategy-section,
.page-resources-popular-games__download-app-section,
.page-resources-popular-games__faq-section,
.page-resources-popular-games__cta-section {
  padding: 80px 0;
}

.page-resources-popular-games__section-title {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 20px;
}

.page-resources-popular-games__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Game Cards Grid */
.page-resources-popular-games__game-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources-popular-games__game-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #333333;
  display: flex;
  flex-direction: column;
}

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

.page-resources-popular-games__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 15px;
}

.page-resources-popular-games__card-title {
  font-size: 1.5em;
  color: #1A202C;
  margin: 0 15px 10px 15px;
  flex-grow: 1;
}

.page-resources-popular-games__card-title a {
  color: #1A202C;
  text-decoration: none;
}

.page-resources-popular-games__card-title a:hover {
  color: #FFD700;
}

.page-resources-popular-games__card-text {
  font-size: 0.95em;
  color: #555555;
  padding: 0 15px 15px 15px;
}

.page-resources-popular-games__btn-text {
  display: inline-block;
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px 20px 15px;
  transition: color 0.3s ease;
}

.page-resources-popular-games__btn-text:hover {
  color: #1A202C;
}

/* Strategy Section */
.page-resources-popular-games__strategy-section .page-resources-popular-games__section-description {
  color: #f0f0f0;
}

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

.page-resources-popular-games__strategy-item {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  color: #ffffff;
}

.page-resources-popular-games__strategy-title {
  font-size: 1.6em;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-resources-popular-games__strategy-text {
  font-size: 1em;
  color: #e0e0e0;
}

.page-resources-popular-games__cta-buttons--center {
  justify-content: center;
  margin-top: 40px;
}

/* Download App Section */
.page-resources-popular-games__download-app-section .page-resources-popular-games__content-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.page-resources-popular-games__download-content {
  flex: 1;
  max-width: 600px;
}

.page-resources-popular-games__download-content .page-resources-popular-games__section-title {
  text-align: left;
  color: #1A202C;
}

.page-resources-popular-games__download-content .page-resources-popular-games__section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  color: #333333;
}

.page-resources-popular-games__download-app-section .page-resources-popular-games__cta-buttons {
  justify-content: flex-start;
}

.page-resources-popular-games__download-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources-popular-games__download-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-resources-popular-games__faq-section .page-resources-popular-games__section-description {
  color: #555555;
}

.page-resources-popular-games__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources-popular-games__faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  background-color: #f9f9f9;
  color: #333333;
}

.page-resources-popular-games__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  background-color: #ffffff;
  color: #1A202C;
  transition: background-color 0.3s ease;
}

.page-resources-popular-games__faq-question:hover {
  background-color: #f0f0f0;
}

.page-resources-popular-games__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-resources-popular-games__faq-item.active .page-resources-popular-games__faq-toggle {
  transform: rotate(45deg);
}

.page-resources-popular-games__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
}

.page-resources-popular-games__faq-item.active .page-resources-popular-games__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px;
}

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

.page-resources-popular-games__faq-answer a {
  color: #FFD700;
  text-decoration: none;
}

.page-resources-popular-games__faq-answer a:hover {
  text-decoration: underline;
}

/* Call to Action Section */
.page-resources-popular-games__cta-section {
  text-align: center;
  padding: 100px 0;
}

.page-resources-popular-games__cta-content {
  max-width: 800px;
}

.page-resources-popular-games__cta-section .page-resources-popular-games__section-title {
  color: #FFD700;
}

.page-resources-popular-games__cta-section .page-resources-popular-games__section-description {
  color: #e0e0e0;
  margin-bottom: 50px;
}

.page-resources-popular-games__cta-section .page-resources-popular-games__cta-buttons {
  justify-content: center;
}

/* Buttons */
.page-resources-popular-games__btn-primary,
.page-resources-popular-games__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources-popular-games__btn-primary {
  background-color: #FFD700;
  color: #1A202C;
  border: 2px solid #FFD700;
}

.page-resources-popular-games__btn-primary:hover {
  background-color: #e6c200;
  border-color: #e6c200;
}

.page-resources-popular-games__btn-secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-resources-popular-games__btn-secondary:hover {
  background-color: #FFD700;
  color: #1A202C;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources-popular-games__hero-section {
    flex-direction: column;
    text-align: center;
    padding-top: 60px; /* Adjust for smaller screens */
  }

  .page-resources-popular-games__hero-content {
    max-width: 80%;
    padding-left: 0;
  }

  .page-resources-popular-games__hero-image-wrapper {
    justify-content: center;
    padding-right: 0;
    margin-top: 40px;
  }

  .page-resources-popular-games__main-title {
    font-size: 2.8em;
  }

  .page-resources-popular-games__download-app-section .page-resources-popular-games__content-container {
    flex-direction: column;
    text-align: center;
  }

  .page-resources-popular-games__download-content {
    max-width: 80%;
  }

  .page-resources-popular-games__download-content .page-resources-popular-games__section-title {
    text-align: center;
  }

  .page-resources-popular-games__download-content .page-resources-popular-games__section-description {
    text-align: center;
  }

  .page-resources-popular-games__download-app-section .page-resources-popular-games__cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-resources-popular-games__hero-section {
    padding: 40px 0;
    padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header offset */
  }

  .page-resources-popular-games__main-title {
    font-size: 2.2em;
  }

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

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

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

  .page-resources-popular-games__section-description {
    font-size: 0.95em;
  }

  .page-resources-popular-games__games-overview-section,
  .page-resources-popular-games__strategy-section,
  .page-resources-popular-games__download-app-section,
  .page-resources-popular-games__faq-section,
  .page-resources-popular-games__cta-section {
    padding: 60px 0;
  }

  .page-resources-popular-games__content-container {
    padding: 0 15px;
  }

  .page-resources-popular-games__game-cards-grid,
  .page-resources-popular-games__strategy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources-popular-games__game-card {
    padding-bottom: 20px;
  }

  .page-resources-popular-games__card-image {
    height: 180px;
  }

  /* Mobile specific image adaptation (all img tags) */
  .page-resources-popular-games img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Mobile specific video adaptation (all video tags) */
  .page-resources-popular-games video,
  .page-resources-popular-games__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Video container mobile adaptation */
  .page-resources-popular-games__video-section,
  .page-resources-popular-games__video-container,
  .page-resources-popular-games__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-resources-popular-games__video-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  /* Mobile specific button adaptation (all buttons) */
  .page-resources-popular-games__cta-button,
  .page-resources-popular-games__btn-primary,
  .page-resources-popular-games__btn-secondary,
  .page-resources-popular-games a[class*="button"],
  .page-resources-popular-games a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Button container mobile adaptation */
  .page-resources-popular-games__cta-buttons,
  .page-resources-popular-games__button-group,
  .page-resources-popular-games__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column !important; /* Ensure vertical stacking for multiple buttons */
  }

  .page-resources-popular-games__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-resources-popular-games__faq-answer {
    padding: 0 20px;
  }

  .page-resources-popular-games__faq-item.active .page-resources-popular-games__faq-answer {
    padding: 15px 20px;
  }
}