:root {
  --primary-color: #0A2540;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --body-bg: #1a1a1a; /* From shared.css */
}

/* Base page styles */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Dark body background, so light text */
  background-color: var(--body-bg);
}

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

/* Shared section styles */
.page-resources__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary-color); /* Gold for titles */
  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__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.8);
}

.page-resources__section-text {
  font-size: 16px;
  text-align: justify;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.page-resources__dark-section {
  background-color: var(--primary-color); /* Dark blue background */
  padding: 80px 0;
}

/* 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); /* Ensure space for fixed header */
  background-color: #0A2540; /* Dark blue background for hero */
  overflow: hidden; /* Prevent content overflow */
}

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

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  max-width: 1200px; /* Max width for the image */
}

.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);
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
  filter: none;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.page-resources__hero-title {
  font-size: 52px;
  font-weight: 900;
  color: var(--secondary-color); /* Gold for hero title */
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__hero-description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color); /* Gold button */
  color: var(--primary-color); /* Dark blue text on gold */
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  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.4);
}

/* Introduction Section */
.page-resources__intro-section {
  padding: 100px 0;
}
.page-resources__intro-section .page-resources__section-title::after {
  background-color: var(--secondary-color);
}

/* Resource Categories Section */
.page-resources__categories-section {
  padding: 100px 0;
  background-color: #222222; /* Slightly lighter dark background */
}

.page-resources__categories-section .page-resources__section-title {
  color: var(--text-light);
}
.page-resources__categories-section .page-resources__section-title::after {
  background-color: var(--secondary-color);
}

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

.page-resources__card {
  background: var(--primary-color); /* Dark blue card background */
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 450px; /* Ensure cards have a minimum height */
}

.page-resources__card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.page-resources__card img {
  width: 100%;
  height: 200px; /* Fixed height for card images */
  object-fit: cover;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
  border-bottom: 4px solid var(--secondary-color); /* Gold border */
  filter: none;
}

.page-resources__card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary-color); /* Gold title */
  margin: 25px 15px 15px;
  line-height: 1.3;
}

.page-resources__card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: var(--text-light); /* Light text on hover */
}

.page-resources__card-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  padding: 0 20px;
  margin-bottom: 25px;
  flex-grow: 1; /* Allow text to take available space */
}

.page-resources__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  background: var(--secondary-color); /* Gold button */
  color: var(--primary-color); /* Dark blue text */
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 25px;
  transition: all 0.3s ease;
  max-width: 100%; /* Button responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-secondary:hover {
  background: #e6c200; /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Detailed Guides Section */
.page-resources__detailed-guides-section {
  padding: 100px 0;
  background-color: var(--primary-color);
}
.page-resources__detailed-guides-section .page-resources__section-title::after {
  background-color: var(--secondary-color);
}

.page-resources__content-block {
  background: #1a1a1a; /* Darker background for content blocks */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  margin-top: 60px;
}

.page-resources__content-subtitle {
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary-color); /* Gold for subtitles */
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 5px solid var(--secondary-color);
  padding-left: 15px;
}

.page-resources__content-block p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  text-align: justify;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 100px 0;
  background-color: #222222; /* Slightly lighter dark background */
}
.page-resources__faq-section .page-resources__section-title {
  color: var(--text-light);
}
.page-resources__faq-section .page-resources__section-title::after {
  background-color: var(--secondary-color);
}

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

/* FAQ容器样式 */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a; /* Dark background for FAQ items */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 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: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

/* 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: #0A2540; /* Dark blue background for active answer */
  border-radius: 0 0 8px 8px;
}

/* Vấn đề kiểu dáng */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #2a2a2a; /* Slightly lighter dark background for question */
  border: 1px solid #3a3a3a;
  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: #3a3a3a;
  border-color: var(--secondary-color);
}

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

/* Kiểu dáng 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(--secondary-color); /* Gold for FAQ question titles */
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
}

/* Chuyển đổi biểu tượng */
.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color); /* Gold for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng 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(--text-light); /* Light text when active */
  transform: rotate(180deg);
}

/* Call to Action Section (Bottom) */
.page-resources__cta-bottom-section {
  padding: 100px 0;
  background-color: var(--primary-color);
  text-align: center;
}

.page-resources__cta-bottom-section .page-resources__section-title {
  color: var(--secondary-color);
}
.page-resources__cta-bottom-section .page-resources__section-title::after {
  background-color: var(--secondary-color);
}

.page-resources__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 44px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__content-subtitle {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__hero-image img {
    border-radius: 8px;
  }

  .page-resources__hero-title {
    font-size: 36px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-resources__section-description {
    font-size: 16px;
    margin-bottom: 40px;
  }
  .page-resources__dark-section,
  .page-resources__categories-section,
  .page-resources__detailed-guides-section,
  .page-resources__faq-section,
  .page-resources__cta-bottom-section {
    padding: 60px 0;
  }

  .page-resources__grid-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
  }

  .page-resources__card {
    min-height: auto;
  }

  .page-resources__card img {
    
  }
  .page-resources__card-title {
    font-size: 20px;
    margin: 20px 10px 10px;
  }
  .page-resources__card-text {
    font-size: 14px;
    padding: 0 15px;
  }
  .page-resources__btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__content-block {
    padding: 25px;
    margin-top: 40px;
  }
  .page-resources__content-subtitle {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-left: 10px;
  }
  .page-resources__content-block p {
    font-size: 15px;
  }

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

  /* Mobile image and container adaptation */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-container,
  .page-resources__content-block,
  .page-resources__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Button group specific mobile adaptation */
  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px; /* Space between stacked buttons */
  }
}

/* Ensure no filter on images */
.page-resources img {
  filter: none;
}