/* style/resources.css */
:root {
  --primary-color: #FFD700;
  --secondary-color: #8B0000;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9;
  --bg-dark: #222222;
  --border-color: #e0e0e0;
}

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

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

.page-resources__section {
  padding: 60px 0;
  text-align: center;
}

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

.page-resources__dark-bg {
  background-color: var(--secondary-color); /* Using auxiliary color for dark background section */
  color: var(--text-light);
}

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

.page-resources__section-title {
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: bold;
  color: var(--text-dark);
}

.page-resources__dark-section .page-resources__section-title,
.page-resources__dark-bg .page-resources__section-title {
  color: var(--text-light);
}

.page-resources__text-block {
  font-size: 17px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  line-height: 1.8;
}

/* Hero Section (Resources Page Specific) */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px 20px; /* Adjusted padding-bottom */
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  overflow: hidden;
}

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

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

.page-resources__hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px; /* Space between buttons and image */
  flex-wrap: wrap;
}

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

/* Buttons */
.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;
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
}

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

.page-resources__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%); /* Example for hover */
  border-color: darken(var(--primary-color), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

.page-resources__btn-link {
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
  transition: color 0.3s ease;
}

.page-resources__btn-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

.page-resources__card {
  background-color: var(--text-light);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text-dark);
}

.page-resources__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--secondary-color);
  line-height: 1.3;
}

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

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

.page-resources__card p {
  font-size: 16px;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* News List */
.page-resources__news-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
}

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

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

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

.page-resources__news-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--secondary-color);
  line-height: 1.3;
}

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

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

.page-resources__news-meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 10px;
}

.page-resources__news-summary {
  font-size: 16px;
  color: var(--text-dark);
}

.page-resources__view-all-button {
  margin-top: 50px;
}

/* CTA Section */
.page-resources__cta-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__cta-section .page-resources__section-title,
.page-resources__cta-section .page-resources__text-block {
  color: var(--text-light);
}

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

.page-resources__cta-section .page-resources__btn-primary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.page-resources__cta-section .page-resources__btn-primary:hover {
  background-color: darken(var(--secondary-color), 10%);
  border-color: darken(var(--secondary-color), 10%);
}

.page-resources__cta-section .page-resources__btn-secondary {
  background-color: var(--text-light);
  color: var(--secondary-color);
  border-color: var(--text-light);
}

.page-resources__cta-section .page-resources__btn-secondary:hover {
  background-color: var(--bg-light);
  color: var(--secondary-color);
}

/* FAQ Section */
.page-resources__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  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 25px;
  opacity: 0;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  text-align: left;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px 25px !important;
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-resources__faq-question:hover {
  background-color: darken(var(--primary-color), 5%);
  border-color: darken(var(--primary-color), 5%);
}

.page-resources__faq-item.active .page-resources__faq-question {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.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(--text-light);
  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: 30px;
  height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(180deg);
  color: var(--text-light);
}

/* Utility to darken color (simple example, ideally use SASS/LESS mixin) */
@function darken($color, $percentage) {
  @return mix(black, $color, $percentage);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 28px;
  }
  .page-resources__text-block {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-resources__container {
    padding: 0 15px;
  }
  .page-resources__section {
    padding: 40px 0;
  }
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 30px;
    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;
  }
  .page-resources__hero-actions {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
  }
  .page-resources__hero-image-content {
    border-radius: 8px;
  }
  .page-resources__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }
  .page-resources__text-block {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-resources__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card {
    padding: 20px;
  }
  .page-resources__card-title {
    font-size: 18px;
  }
  .page-resources__card p {
    font-size: 15px;
  }
  .page-resources__news-item {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }
  .page-resources__news-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .page-resources__news-content {
    text-align: center;
  }
  .page-resources__news-title {
    font-size: 18px;
  }
  .page-resources__news-meta,
  .page-resources__news-summary {
    font-size: 14px;
  }
  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .page-resources__faq-question {
    padding: 15px 20px;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
  }
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 25px;
    height: 25px;
  }
  .page-resources__faq-answer {
    padding: 0 20px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }
  /* Mobile image and container overflow prevention */
  .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__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}