/* style/resources.css */
:root {
  --primary-color: #007BFF;
  --secondary-color: #FFC107;
  --dark-bg-1: #0d0d0d; /* Assuming a dark body background from shared.css */
  --dark-bg-2: #1a1a1a;
  --text-light: #ffffff;
  --text-dark: #333333;
  --border-light: #e0e0e0;
}

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

.page-resources__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 180px; /* Desktop padding for fixed nav */
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: var(--text-light);
  overflow: hidden;
}

.page-resources__hero-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.page-resources__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-resources__hero-subtitle {
  font-size: 20px;
  margin-bottom: 30px;
  color: #f0f0f0;
  max-width: 800px;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button:hover {
  background: #e0ac00;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__section {
  padding: 60px 20px;
  overflow: hidden;
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
}

.page-resources__text-block {
  font-size: 18px;
  margin-bottom: 20px;
  text-align: justify;
}

.page-resources__text-block .highlight {
  color: var(--primary-color);
  font-weight: bold;
}

/* Background and text color intelligent selection */
.page-resources__dark-bg {
  background-color: var(--dark-bg-2);
  color: var(--text-light);
}

.page-resources__light-bg {
  background-color: var(--text-light);
  color: var(--text-dark);
}

.page-resources__light-bg .page-resources__section-title {
  color: var(--text-dark);
}

.page-resources__light-bg .page-resources__text-block {
  color: var(--text-dark);
}

.page-resources__light-bg .page-resources__card {
  background-color: var(--dark-bg-1);
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__card-title {
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__card-description {
  color: #cccccc;
}

.page-resources__light-bg .page-resources__read-more {
  color: var(--secondary-color);
}

.page-resources__light-bg .page-resources__faq-question {
  background: var(--dark-bg-2);
  border: 1px solid #333;
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__faq-question h3 {
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__faq-toggle {
  color: #ccc;
}

.page-resources__light-bg .page-resources__faq-answer {
  background: #1a1a1a;
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__news-item {
  background-color: var(--dark-bg-2);
  border: 1px solid #333;
}

.page-resources__light-bg .page-resources__news-title a {
  color: var(--text-light);
}

.page-resources__light-bg .page-resources__news-excerpt {
  color: #ccc;
}

.page-resources__light-bg .page-resources__news-date {
  color: #999;
}

/* Guides Section */
.page-resources__guides-section .page-resources__section-title {
  color: var(--text-light);
}

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

.page-resources__card {
  background: var(--text-light);
  color: var(--text-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-resources__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  padding: 15px 20px 10px;
  color: var(--text-dark);
}

.page-resources__card-description {
  font-size: 16px;
  padding: 0 20px 15px;
  color: #555555;
  flex-grow: 1;
}

.page-resources__read-more {
  display: block;
  padding: 10px 20px 15px;
  color: var(--primary-color);
  font-weight: bold;
  text-align: right;
}

.page-resources__read-more:hover {
  text-decoration: underline;
}

/* Download Section */
.page-resources__download-section .page-resources__section-title {
  color: var(--text-dark);
}

.page-resources__download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.page-resources__btn-primary, .page-resources__btn-secondary {
  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-resources__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.page-resources__btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.page-resources__btn-secondary {
  background: var(--secondary-color);
  color: var(--text-dark);
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}

.page-resources__btn-secondary:hover {
  background: #e0ac00;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
}

.page-resources__download-image {
  display: block;
  max-width: 800px;
  width: 100%;
  height: auto;
  margin: 40px auto 0;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Promotion Section */
.page-resources__promotion-section .page-resources__section-title {
  color: var(--text-light);
}

.page-resources__promotion-list {
  list-style: none;
  padding: 0;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-resources__list-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 18px;
  display: flex;
  align-items: center;
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-resources__list-item::before {
  content: '✔';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 15px;
  font-size: 20px;
}

/* Game Types Section */
.page-resources__game-types-section .page-resources__section-title {
  color: var(--text-dark);
}

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

.page-resources__game-type-card {
  background: var(--dark-bg-2);
  color: var(--text-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding-bottom: 20px;
  text-align: center;
}

.page-resources__game-type-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-resources__game-type-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.page-resources__game-type-description {
  font-size: 16px;
  padding: 0 20px;
  color: #cccccc;
}

/* News Section */
.page-resources__news-section .page-resources__section-title {
  color: var(--text-light);
}

.page-resources__news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 30px;
}

.page-resources__news-item {
  background: var(--text-light);
  color: var(--text-dark);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 20px;
}

.page-resources__news-image {
  width: 250px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
}

.page-resources__news-content {
  flex-grow: 1;
}

.page-resources__news-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

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

.page-resources__news-title a:hover {
  text-decoration: underline;
}

.page-resources__news-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 10px;
}

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

/* FAQ Section */
.page-resources__faq-section .page-resources__section-title {
  color: var(--text-dark);
}

.page-resources__faq-list {
  margin-top: 30px;
}

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

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

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--dark-bg-2);
  border-radius: 0 0 5px 5px;
  color: var(--text-light);
}

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

.page-resources__faq-question:hover {
  background: #1a1a1a;
  border-color: #555;
}

.page-resources__faq-question:active {
  background: #2a2a2a;
}

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

.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  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: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Change + to X for active state */
}

/* General image responsiveness */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__hero-subtitle {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__news-image {
    width: 200px;
    height: 120px;
  }
  .page-resources__news-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: 160px !important; /* Mobile padding for fixed nav */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-resources__hero-subtitle {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-resources__text-block {
    font-size: 16px;
  }
  .page-resources__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-description {
    font-size: 15px;
  }
  .page-resources__download-buttons {
    flex-direction: column;
  }
  .page-resources__btn-primary, .page-resources__btn-secondary {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  .page-resources__download-image {
    margin-top: 30px;
  }
  .page-resources__promotion-list {
    gap: 10px;
  }
  .page-resources__list-item {
    font-size: 16px;
    padding: 12px 20px;
  }
  .page-resources__game-type-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__game-type-image {
    height: 180px;
  }
  .page-resources__game-type-title {
    font-size: 22px;
  }
  .page-resources__news-item {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  .page-resources__news-image {
    width: 100%;
    height: 180px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .page-resources__news-title {
    font-size: 18px;
  }
  .page-resources__news-excerpt {
    font-size: 15px;
  }
  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  /* Force image responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__news-item,
  .page-resources__game-type-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__hero-container {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 28px;
  }
  .page-resources__hero-subtitle {
    font-size: 14px;
  }
  .page-resources__section-title {
    font-size: 24px;
  }
  .page-resources__faq-question h3 {
    font-size: 15px;
  }
  .page-resources__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
}