:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #00CED1; /* Turquoise */
  --text-on-dark: #ffffff;
  --text-on-light: #333333;
  --background-dark: #1a1a2e; /* Body background from shared.css */
  --background-light: #f8f9fa;
  --card-background: #ffffff;
  --border-color: #e0e0e0;
}

/* Ensure content is not hidden by fixed header */
.page-community__intro-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
}

.page-community {
  font-family: 'Arial', sans-serif;
  color: var(--text-on-dark); /* Default text color for dark body background */
  line-height: 1.6;
}

.page-community__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-community__main-title,
.page-community__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-community__description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-on-dark);
}

.page-community__highlight-text {
  color: var(--primary-color);
  font-weight: bold;
}

.page-community__dark-bg {
  background-color: var(--background-dark);
  color: var(--text-on-dark);
}

.page-community__light-bg {
  background-color: var(--background-light);
  color: var(--text-on-light);
}

.page-community__intro-section .page-community__description {
    color: var(--text-on-dark);
}

.page-community__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.page-community__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
}

.page-community__btn-primary {
  background: var(--primary-color);
  color: var(--background-dark); /* Dark text on light primary color */
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.page-community__btn-primary:hover {
  background: #e0b800;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

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

.page-community__btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.page-community__card {
  background-color: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-on-light);
}

.page-community__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Features Section */
.page-community__features-section .page-community__section-title,
.page-community__promotions-section .page-community__section-title,
.page-community__faq-section .page-community__section-title {
  color: var(--text-on-light);
}

.page-community__features-section .page-community__description,
.page-community__promotions-section .page-community__description,
.page-community__faq-section .page-community__description {
    color: var(--text-on-light);
}

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

.page-community__feature-icon {
  width: 200px; /* Min size 200px */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

.page-community__feature-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-community__feature-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-community__read-more {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-community__read-more:hover {
  color: #008b8b;
  border-color: #008b8b;
}

/* Games Section (Carousel) */
.page-community__games-section .page-community__section-title,
.page-community__blog-section .page-community__section-title {
  color: var(--primary-color);
}

.page-community__games-section .page-community__description,
.page-community__blog-section .page-community__description {
    color: var(--text-on-dark);
}

.page-community__game-carousel {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  margin-top: 40px;
}

.page-community__game-carousel::-webkit-scrollbar {
  height: 8px;
}

.page-community__game-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.page-community__game-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.page-community__game-card-small {
  flex: 0 0 280px; /* Fixed width for small cards */
  scroll-snap-align: start;
  padding: 20px;
  color: var(--text-on-light);
}

.page-community__game-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-community__game-name-small {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.page-community__game-desc-small {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-community__game-link {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-community__game-link:hover {
  color: #008b8b;
  border-color: #008b8b;
}

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

.page-community__promo-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-community__promo-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-community__promo-text {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.page-community__promo-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
}

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

.page-community__blog-post {
  text-align: left;
  padding: 0;
  overflow: hidden;
  color: var(--text-on-light);
}

.page-community__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.page-community__blog-content {
  padding: 25px;
}

.page-community__blog-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-community__blog-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-community__blog-title a:hover {
  color: #e0b800;
}

.page-community__blog-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-light);
  margin-bottom: 15px;
}

.page-community__blog-date {
  font-size: 14px;
  color: #888888;
}

.page-community__text-center {
  text-align: center;
  margin-top: 50px;
}

/* FAQ Section */
.page-community__faq-section .page-community__section-title {
  margin-bottom: 50px;
}

.page-community__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-community__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-community__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-community__faq-item.active .page-community__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-community__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-community__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-community__faq-question:active {
  background: #eeeeee;
}

.page-community__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-on-light);
}

.page-community__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-community__faq-item.active .page-community__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg);
}

.page-community__faq-answer p {
    color: var(--text-on-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-community__main-title {
    font-size: 32px;
  }

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

  .page-community__description {
    font-size: 17px;
  }

  .page-community__game-card-small {
    flex: 0 0 250px;
  }
}

@media (max-width: 768px) {
  .page-community__intro-section {
    padding-top: 100px !important; /* Mobile: Adjust for mobile header height */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-community__container {
    padding: 20px 15px;
  }

  .page-community__main-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .page-community__section-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .page-community__description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-community__cta-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-community__cta-button {
    padding: 12px 20px;
    font-size: 16px;
  }

  .page-community__features-grid,
  .page-community__promotions-grid,
  .page-community__blog-grid {
    gap: 20px;
  }

  .page-community__feature-card,
  .page-community__promo-card,
  .page-community__blog-post {
    padding: 20px;
  }

  .page-community__feature-icon,
  .page-community__promo-image {
    width: 100%;
    height: auto;
    max-width: 100% !important;
  }

  .page-community__game-carousel {
    padding-bottom: 15px;
  }

  .page-community__game-card-small {
    flex: 0 0 220px;
    padding: 15px;
  }

  .page-community__game-thumbnail {
    height: 150px;
  }

  .page-community__feature-title,
  .page-community__promo-title,
  .page-community__game-name-small,
  .page-community__blog-title {
    font-size: 18px;
  }

  .page-community__feature-text,
  .page-community__promo-text,
  .page-community__game-desc-small,
  .page-community__blog-excerpt {
    font-size: 14px;
  }
  
  .page-community__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-community__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-community__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-community__faq-answer {
    padding: 0 15px;
  }
  
  .page-community__faq-item.active .page-community__faq-answer {
    padding: 15px !important;
  }

  /* Force all images to be responsive */
  .page-community img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-community__section,
  .page-community__card,
  .page-community__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-community__main-title {
    font-size: 24px;
  }

  .page-community__section-title {
    font-size: 20px;
  }

  .page-community__cta-button {
    font-size: 15px;
    padding: 10px 15px;
  }
  
  .page-community__game-card-small {
    flex: 0 0 180px;
  }
  
  .page-community__game-thumbnail {
    height: 120px;
  }
  
  .page-community__feature-icon {
    width: 150px;
  }
  .page-community__promo-image {
    height: 160px;
  }
}