/* style/resources.css */
.page-resources {
  font-family: 'Arial', sans-serif;
  color: #333333; /* Default text color for light body background */
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

/* HERO Section */
.page-resources__hero-section {
  background: linear-gradient(135deg, #0A2647 0%, #0A2647 60%, #E6B31E 100%); /* Blend brand colors */
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-resources__hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.page-resources__hero-title {
  font-size: 48px;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-description {
  font-size: 18px;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* General Section Styles */
.page-resources__section {
  padding: 60px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.page-resources__section:nth-of-type(odd) {
  background: #ffffff;
}

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

.page-resources__section-title {
  font-size: 36px;
  color: #0A2647;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-resources__section-title--light {
  color: #ffffff;
}

.page-resources__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #555555;
}

.page-resources__section-intro--light {
  color: #f0f0f0;
}

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

/* Card Styles */
.page-resources__card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure cards in a row have equal height */
}

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

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

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to expand */
  display: flex;
  flex-direction: column;
}

.page-resources__card-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.3;
}

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

.page-resources__card-title a:hover {
  color: #E6B31E;
}

.page-resources__card-text {
  font-size: 16px;
  color: #666666;
  margin-bottom: 20px;
  flex-grow: 1; /* Push link to bottom */
}

.page-resources__card-link {
  display: inline-block;
  color: #E6B31E;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto; /* Align to bottom */
}

.page-resources__card-link:hover {
  color: #0A2647;
}

/* Dark Background Section */
.page-resources__dark-bg {
  background: #0A2647;
  color: #ffffff;
}

.page-resources__news-card {
  background: #1a3a5e; /* Slightly lighter dark background for cards */
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

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

.page-resources__news-title {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.page-resources__news-title a {
  color: #E6B31E;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
  color: #ffffff;
}

.page-resources__news-date {
  font-size: 14px;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-resources__news-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-link--light {
  color: #E6B31E;
}

.page-resources__card-link--light:hover {
  color: #ffffff;
}

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


/* CTA Section */
.page-resources__section--cta {
  background: #f0f0f0;
  padding: 80px 20px;
  text-align: center;
}

.page-resources__cta-box {
  background: #ffffff;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: 0 auto;
}

.page-resources__cta-title {
  font-size: 38px;
  color: #0A2647;
  margin-bottom: 20px;
  font-weight: 700;
}

.page-resources__cta-text {
  font-size: 18px;
  color: #555555;
  margin-bottom: 40px;
}

/* Button Styles */
.page-resources__btn-primary {
  display: inline-block;
  background: #E6B31E;
  color: #0A2647;
  padding: 15px 40px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
}

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

.page-resources__btn-secondary {
  display: inline-block;
  background: transparent;
  color: #E6B31E;
  padding: 15px 40px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  border: 2px solid #E6B31E;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.page-resources__btn-secondary:hover {
  background: #E6B31E;
  color: #0A2647;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary--inverted {
  background: #E6B31E;
  color: #0A2647;
  border: 2px solid #E6B31E;
}

.page-resources__btn-secondary--inverted:hover {
  background: #d4a21d;
  color: #0A2647;
  border-color: #d4a21d;
}

.page-resources__btn-primary--large {
  padding: 18px 50px;
  font-size: 20px;
}

/* FAQ Section */
.page-resources__section--faq {
  background: #f9f9f9;
  padding: 60px 20px;
}

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

/* FAQ container style */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer 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 15px;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Use!important and large enough max-height to ensure it expands */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important to ensure priority, value large enough to contain any content */
  padding: 20px 25px !important; /* Adjusted padding for better visual */
  opacity: 1;
  background: #fefefe;
  border-radius: 0 0 5px 5px;
  border-top: 1px solid #e0e0e0;
}

/* Question style */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjusted padding */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.page-resources__faq-item.active .page-resources__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d0d0d0;
  background-color: #f5f5f5;
}

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

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

/* Question title style */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Slightly larger font for readability */
  font-weight: 600;
  line-height: 1.5;
  color: #0A2647; /* Brand color for question */
  pointer-events: none; /* Prevent h3 tag from blocking click events */
}

/* Toggle icon */
.page-resources__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  line-height: 1;
  color: #E6B31E; /* Auxiliary color for toggle */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click events */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger touch area */
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #0A2647; /* Change color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect, or keep as '-' */
}

/* General image styles */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

@media (max-width: 768px) {
  .page-resources {
    padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__hero-section {
    padding: 60px 15px;
  }
  .page-resources__hero-title {
    font-size: 32px;
  }
  .page-resources__hero-description {
    font-size: 15px;
  }
  .page-resources__hero-cta {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources a[class*="button"],
  .page-resources a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__hero-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__container {
    padding: 0;
  }
  .page-resources__section-title {
    font-size: 26px;
  }
  .page-resources__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-resources__grid-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-resources__card {
    border-radius: 8px;
  }
  .page-resources__card-image {
    height: 180px;
  }
  .page-resources__card-content {
    padding: 20px;
  }
  .page-resources__card-title {
    font-size: 18px;
  }
  .page-resources__card-text {
    font-size: 15px;
  }

  .page-resources__news-card {
    border-radius: 8px;
  }
  .page-resources__news-image {
    height: 160px;
  }
  .page-resources__news-content {
    padding: 20px;
  }
  .page-resources__news-title {
    font-size: 16px;
  }
  .page-resources__news-date,
  .page-resources__news-excerpt {
    font-size: 14px;
  }

  .page-resources__cta-box {
    padding: 30px 20px;
  }
  .page-resources__cta-title {
    font-size: 28px;
  }
  .page-resources__cta-text {
    font-size: 16px;
  }
  .page-resources__btn-primary--large {
    padding: 15px 30px;
    font-size: 18px;
  }

  /* FAQ Mobile */
  .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;
  }
  
  /* Ensure all images are responsive in content area */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__cta-box,
  .page-resources__faq-list,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__section--faq .page-resources__container {
    padding-left: 0;
    padding-right: 0;
  }
}