:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #000000;
  --card-background: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.2);
}

.page-resources {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body background is dark, so use light text */
  background-color: var(--background-dark);
  line-height: 1.6;
}

/* Ensure content is not hidden by fixed header */
.page-resources__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(139,0,0,0.1) 100%);
  text-align: center;
}

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

.page-resources__main-title {
  font-size: 3.2em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.15em;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto 30px auto;
  opacity: 0.9;
}

.page-resources__text-link {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-resources__text-link:hover {
  color: var(--text-light);
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 14px 30px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button--primary {
  background-color: var(--primary-color);
  color: var(--background-dark);
  border: 2px solid var(--primary-color);
}

.page-resources__cta-button--primary:hover {
  background-color: darken(var(--primary-color), 10%);
  color: var(--text-dark);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

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

.page-resources__cta-button--secondary:hover {
  background-color: var(--primary-color);
  color: var(--background-dark);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.page-resources__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
  margin-top: 60px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.page-resources__section-description {
  font-size: 1.05em;
  color: var(--text-light);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  opacity: 0.8;
}

/* Game Guides Section */
.page-resources__game-guides-section {
  padding: 60px 0;
  background-color: rgba(255, 255, 255, 0.03);
}

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

.page-resources__guide-card {
  background-color: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-resources__guide-card-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin: 20px 20px 10px 20px;
  flex-grow: 1;
}

.page-resources__guide-card-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-resources__guide-card-excerpt {
  font-size: 0.95em;
  color: var(--text-light);
  padding: 0 20px;
  margin-bottom: 20px;
  opacity: 0.85;
}

.page-resources__read-more-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px 20px 20px;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-resources__read-more-link:hover {
  color: var(--text-light);
}

/* Tips & Strategies Section */
.page-resources__tips-strategies-section {
  padding: 60px 0;
}

.page-resources__strategy-list {
  list-style: none;
  padding: 0;
  margin: 40px auto 0 auto;
  max-width: 900px;
}

.page-resources__strategy-item {
  background-color: var(--card-background);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.page-resources__strategy-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.page-resources__strategy-item-title {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.page-resources__strategy-item p {
  color: var(--text-light);
  font-size: 1em;
  opacity: 0.9;
}

/* Responsible Gambling Section */
.page-resources__responsible-gambling-section {
  padding: 60px 0;
  background-color: rgba(139, 0, 0, 0.1);
}

.page-resources__responsible-content {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-resources__responsible-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__responsible-text {
  flex: 1;
  min-width: 300px;
  color: var(--text-light);
}

.page-resources__responsible-text h3 {
  font-size: 2em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 20px;
}

.page-resources__responsible-text ul {
  list-style: disc inside;
  margin-left: 20px;
  margin-bottom: 20px;
}

.page-resources__responsible-text li {
  margin-bottom: 10px;
  font-size: 1.05em;
  opacity: 0.9;
}

.page-resources__responsible-text p {
  font-size: 1em;
  opacity: 0.9;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  background-color: var(--background-dark);
}

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

/* FAQ容器样式 */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* FAQ默认状态 - 答案隐藏 */
.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 20px;
  opacity: 0;
  color: var(--text-light);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  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: rgba(255, 255, 255, 0.12);
}

.page-resources__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

/* 问题标题样式 */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* 防止h3标签阻止点击事件 */
  color: var(--primary-color);
}

/* 切换图标 */
.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-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 {
  transform: rotate(45deg);
  color: var(--text-light);
}

/* Latest Articles Section */
.page-resources__latest-articles-section {
  padding: 60px 0;
  background-color: rgba(255, 215, 0, 0.03);
}

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

.page-resources__article-item {
  background-color: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-resources__article-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-resources__article-title {
  font-size: 1.35em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
}

.page-resources__article-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-resources__article-excerpt {
  font-size: 0.95em;
  color: var(--text-light);
  margin-bottom: 15px;
  opacity: 0.85;
  flex-grow: 1;
}

.page-resources__article-date {
  font-size: 0.85em;
  color: var(--text-light);
  opacity: 0.7;
  margin-bottom: 10px;
}

/* CTA Section */
.page-resources__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-resources__dark-section {
  background-color: var(--secondary-color); /* Dark Red background */
  color: var(--text-light);
}

.page-resources__dark-section .page-resources__section-title {
  color: var(--primary-color);
}

.page-resources__cta-buttons--centered {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 2.8em;
  }
  .page-resources__section-title {
    font-size: 2.2em;
  }
  .page-resources__guide-grid, .page-resources__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
    padding-bottom: 40px;
  }
  .page-resources__container {
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-resources__main-title {
    font-size: 2.2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__cta-button {
    padding: 12px 20px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-resources__section-title {
    font-size: 1.8em;
    margin-top: 40px;
  }
  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-resources__game-guides-section, .page-resources__tips-strategies-section, .page-resources__responsible-gambling-section, .page-resources__faq-section, .page-resources__latest-articles-section, .page-resources__cta-section {
    padding: 40px 0;
  }
  .page-resources__guide-grid, .page-resources__article-grid {
    grid-template-columns: 1fr;
  }
  .page-resources__guide-card-image, .page-resources__article-image {
    height: 180px;
  }
  .page-resources__guide-card-title, .page-resources__article-title {
    font-size: 1.2em;
  }
  .page-resources__strategy-item-title {
    font-size: 1.4em;
  }
  .page-resources__responsible-content {
    flex-direction: column;
    gap: 30px;
  }
  .page-resources__responsible-image {
    max-width: 100%;
  }
  .page-resources__responsible-text h3 {
    font-size: 1.6em;
  }
  /* FAQ Mobile Specifics */
  .page-resources__faq-question {
    padding: 15px;
  }
  .page-resources__faq-question h3 {
    font-size: 1em;
  }
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }
  /* Image responsive fixes */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-resources__section, .page-resources__card, .page-resources__container, .page-resources__guide-card, .page-resources__article-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__cta-buttons--centered {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__article-content {
    padding: 15px;
  }
  .page-resources__faq-list {
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__faq-item {
    margin-left: 0;
    margin-right: 0;
  }
}