:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f4f4f4; /* Matches body background from shared.css */
  --background-dark: #222222; /* A dark background for contrast sections */
  --border-color: #e0e0e0;
}

/* Base styles for the resources page */
.page-resources {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light background body */
  line-height: 1.6;
  background-color: var(--background-light); /* Ensure consistency with body background */
}

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

.page-resources__section-title {
  font-size: 36px;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 10px;
}

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

.page-resources__text-block {
  font-size: 17px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: var(--text-dark);
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-resources__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background effects */
}

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 1000px; /* Limit image width */
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--text-light); /* Light text for dark/gradient background */
}

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

.page-resources__hero-description {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-resources__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--primary-color);
  color: var(--text-dark); /* Dark text on primary color for contrast */
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: #e6c200; /* Slightly darker gold on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

.page-resources__dark-section {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-resources__dark-section .page-resources__section-title {
  color: var(--primary-color); /* Gold title on dark background */
}

.page-resources__dark-section .page-resources__text-block {
  color: #cccccc;
}

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

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

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

.page-resources__card img {
  width: 100%;
  height: 220px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-resources__card-title {
  font-size: 22px;
  margin: 20px 20px 10px 20px;
  color: var(--secondary-color);
  line-height: 1.4;
}

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

.page-resources__card-title a:hover {
  color: var(--primary-color);
}

.page-resources__card-description {
  font-size: 15px;
  color: #555555;
  padding: 0 20px 20px 20px;
  flex-grow: 1; /* Allow description to take available space */
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-small {
  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;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-resources__btn-primary {
  background: var(--primary-color);
  color: var(--text-dark); /* Dark text on primary color for contrast */
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.page-resources__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-small {
  padding: 8px 18px;
  font-size: 14px;
  margin-top: 15px;
  background: var(--secondary-color);
  color: var(--text-light);
  border: none;
  border-radius: 5px;
}

.page-resources__btn-small:hover {
  background: #7a0000;
  transform: translateY(-1px);
}

.page-resources__button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* List styles */
.page-resources__list {
  list-style: none;
  padding: 0;
  margin: 30px auto 0 auto;
  max-width: 900px;
  text-align: left;
}

.page-resources__list li {
  background: var(--text-light);
  border-left: 5px solid var(--primary-color);
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  color: var(--text-dark);
}

.page-resources__list li strong {
  color: var(--secondary-color);
}

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

.page-resources__security-item {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-resources__security-item img {
  
  
  object-fit: contain;
  margin-bottom: 20px;
}

.page-resources__security-item .page-resources__item-title {
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__security-item p {
  font-size: 15px;
  color: #cccccc;
}

/* VIP Section specific */
.page-resources__vip-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.page-resources__vip-item {
  background: var(--text-light);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: var(--text-dark);
}

.page-resources__vip-item h4 {
  font-size: 20px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.page-resources__vip-item p {
  font-size: 15px;
  color: #555555;
}

/* Payment & Support Section specific */
.page-resources__flex-group {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__flex-item {
  flex: 1;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-resources__flex-item .page-resources__item-title {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__flex-item p {
  color: #cccccc;
  margin-bottom: 25px;
}

/* FAQ Section */
.page-resources__faq-section {
  padding-bottom: 60px;
}

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

/* FAQ容器样式 */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 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;
  background: #f9f9f9;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.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; /* Điều chỉnh padding để có giao diện tốt hơn */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* Kiểu câu hỏi */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--text-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

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

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

/* Kiểu tiêu đề câu hỏi */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện click */
}

/* Nút chuyển đổi */
.page-resources__faq-toggle {
  font-size: 28px; /* Icon lớn hơn để dễ nhìn */
  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; /* Ngăn icon chặn sự kiện click */
  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); /* Xoay để tạo hiệu ứng 'x' */
}

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

.page-resources__news-card {
  background: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

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

.page-resources__news-title {
  font-size: 20px;
  margin: 20px 20px 10px 20px;
  color: var(--primary-color);
  line-height: 1.4;
}

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

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

.page-resources__news-excerpt {
  font-size: 15px;
  color: #cccccc;
  padding: 0 20px 20px 20px;
  flex-grow: 1;
}

.page-resources__view-all-news-button {
  margin-top: 50px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 30px;
  }
  .page-resources__text-block {
    font-size: 16px;
  }
  .page-resources__card-title,
  .page-resources__item-title,
  .page-resources__news-title h3 {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
}