/* style/resources.css */
.page-resources {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --button-register-color: #C30808;
  --button-login-color: #C30808;
  --background-color-page: #FFFFFF;
  --font-register-login: #FFFF00;

  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-color-page);
}

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

.page-resources__hero-section {
  position: relative;
  width: 100%;
  padding: 80px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is below fixed header */
  background-color: var(--primary-color);
  color: var(--text-color-light);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-resources__btn-primary {
  background-color: var(--button-register-color); /* Sử dụng màu đỏ cho đăng ký/tải xuống */
  color: var(--font-register-login);
  border: 2px solid var(--button-register-color);
}

.page-resources__btn-primary:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-resources__btn-primary--red {
  background-color: var(--button-register-color);
  color: var(--font-register-login);
  border: 2px solid var(--button-register-color);
}

.page-resources__btn-primary--red:hover {
  background-color: #a00606;
  border-color: #a00606;
}

.page-resources__btn-secondary {
  background-color: transparent;
  color: var(--text-color-light);
  border: 2px solid var(--text-color-light);
}

.page-resources__btn-secondary:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-resources__section-title {
  font-size: 2.5em;
  margin-bottom: 40px;
  text-align: center;
  color: var(--primary-color);
}

.page-resources__introduction-section,
.page-resources__download-guide,
.page-resources__tips-strategies,
.page-resources__news-updates,
.page-resources__faq-section,
.page-resources__support-contact {
  padding: 80px 0;
}

.page-resources__introduction-section,
.page-resources__tips-strategies,
.page-resources__faq-section {
  background-color: var(--background-color-page);
  color: var(--text-color-dark);
}

.page-resources__download-guide,
.page-resources__news-updates,
.page-resources__support-contact {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__download-guide .page-resources__section-title,
.page-resources__news-updates .page-resources__section-title,
.page-resources__support-contact .page-resources__section-title {
  color: var(--text-color-light);
}

.page-resources__download-guide .page-resources__paragraph,
.page-resources__news-updates .page-resources__paragraph,
.page-resources__support-contact .page-resources__paragraph {
  color: var(--text-color-light);
}

.page-resources__content-wrapper,
.page-resources__content-grid {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.page-resources__content-wrapper {
  flex-direction: row;
}

.page-resources__content-grid {
  flex-direction: row;
}

.page-resources__content-grid:nth-of-type(odd) {
  flex-direction: row-reverse; /* Swap order for alternating sections */
}

.page-resources__text-content {
  flex: 1;
}

.page-resources__paragraph {
  margin-bottom: 15px;
  font-size: 1.1em;
}

.page-resources__image {
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  max-width: 50%; /* Adjust as needed */
  height: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__image--left {
  margin-right: 20px;
}

.page-resources__image--right {
  margin-left: 20px;
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-resources__faq-item {
  background-color: var(--secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--primary-color);
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: #f0f0f0;
}

.page-resources__faq-title {
  margin: 0;
  color: var(--primary-color);
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg);
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-color-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 25px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 15px;
    padding-top: var(--header-offset, 120px) !important;
    min-height: 400px;
  }

  .page-resources__hero-title {
    font-size: 2.2em;
  }

  .page-resources__hero-description {
    font-size: 1em;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95em;
  }

  .page-resources__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-resources__introduction-section,
  .page-resources__download-guide,
  .page-resources__tips-strategies,
  .page-resources__news-updates,
  .page-resources__faq-section,
  .page-resources__support-contact {
    padding: 50px 0;
  }

  .page-resources__content-wrapper,
  .page-resources__content-grid {
    flex-direction: column !important;
    gap: 30px;
  }

  .page-resources__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources p,
  .page-resources li {
    font-size: 1em;
  }

  .page-resources__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-resources__faq-answer {
    padding: 0 20px;
  }

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px;
  }

  /* Ensure all content containers are within bounds */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}

/* Color Contrast Fixes */
.page-resources__dark-bg {
  color: var(--text-color-light); /* Deep background, light text */
}

.page-resources__light-bg {
  color: var(--text-color-dark); /* Light background, dark text */
}

.page-resources__faq-title,
.page-resources__faq-toggle {
  color: var(--primary-color);
}