/* style/resources.css */

/* Variables and Base Styles */
:root {
  --primary-color: #0A2463;
  --secondary-color: #E0B048;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f9f9f9;
  --background-dark: #0A2463; /* Using primary color for dark sections */
  --border-color: #e0e0e0;
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light body background */
  background-color: #ffffff; /* Explicitly set for clarity, though shared.css might handle body */
}

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

/* 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); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a7a 100%); /* Gradient background for hero */
  color: var(--text-light);
  overflow: hidden; /* To contain the image if it overflows slightly */
}

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

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 800px;
}

.page-resources__main-heading {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Gold color for heading */
  line-height: 1.2;
}

.page-resources__intro-text {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #e0e0e0; /* Slightly lighter text for intro */
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary {
  background: var(--secondary-color); /* Gold background */
  color: var(--primary-color); /* Dark blue text */
  border: 2px solid var(--secondary-color);
}

.page-resources__btn-primary:hover {
  background: #eebb55;
  border-color: #eebb55;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.page-resources__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-image {
  width: 100%;
  max-width: 900px; /* Adjust max-width as needed */
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

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

/* General Content Sections */
.page-resources__content-section {
  padding: 60px 0;
}

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

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

.page-resources__section-heading--light {
  color: var(--text-light);
}

.page-resources__section-heading--light::after {
  background-color: var(--secondary-color);
}

.page-resources__sub-heading {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  border-left: 5px solid var(--secondary-color);
  padding-left: 15px;
}

.page-resources__paragraph {
  font-size: 1.05em;
  margin-bottom: 20px;
  line-height: 1.7;
}

.page-resources a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: var(--secondary-color);
}

.page-resources__content-image {
  width: 100%;
  height: auto;
  max-width: 800px; /* Content images max width */
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum size for content images */
  min-height: 200px;
}

/* CTA Section */
.page-resources__cta-section {
  text-align: center;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 50px 30px;
  border-radius: 12px;
  margin-top: 60px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-title {
  font-size: 2.2em;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-resources__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 0;
  background: var(--background-dark); /* Dark background for FAQ */
  color: var(--text-light);
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #2a4e8d; /* Slightly lighter dark blue for question background */
  color: var(--text-light);
  border: 1px solid #3a5e9d;
  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: #3a5e9d;
  border-color: #4a6ebf;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-light);
}

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color); /* Gold color for toggle icon */
  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: 28px;
  height: 28px;
}

.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: #1a3a7a; /* Dark blue for answer background */
  color: #e0e0e0; /* Lighter text for answer */
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(0deg); /* No rotation, just change text to '-' */
}

/* News Section */
.page-resources__news-section {
  padding: 60px 0;
  background: var(--background-light);
}

.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: #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;
}

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

.page-resources__news-card img {
  width: 100%;
  height: 220px; /* Fixed height for consistent card image size */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Minimum size for card images */
  min-height: 200px;
}

.page-resources__card-content {
  padding: 20px;
}

.page-resources__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-resources__card-date {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 15px;
}

.page-resources__card-description {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
}

.page-resources__read-more-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__read-more-link:hover {
  color: var(--primary-color);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-heading {
    font-size: 2.8em;
  }
  .page-resources__section-heading {
    font-size: 2.2em;
  }
  .page-resources__cta-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__hero-container {
    flex-direction: column;
    gap: 20px;
  }

  .page-resources__main-heading {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-resources__intro-text {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-resources__hero-image img,
  .page-resources__content-image,
  .page-resources__news-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Allow height to adjust */
  }

  .page-resources__container,
  .page-resources__news-grid,
  .page-resources__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__content-section,
  .page-resources__faq-section,
  .page-resources__news-section {
    padding: 40px 0;
  }

  .page-resources__section-heading {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-resources__sub-heading {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-resources__paragraph {
    font-size: 0.95em;
  }

  .page-resources__cta-title {
    font-size: 1.8em;
  }

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

  .page-resources__news-card img {
    height: auto; /* Allow height to adjust for mobile */
  }
}

@media (max-width: 480px) {
  .page-resources__main-heading {
    font-size: 1.8em;
  }
  .page-resources__intro-text {
    font-size: 0.9em;
  }
  .page-resources__section-heading {
    font-size: 1.5em;
  }
  .page-resources__cta-title {
    font-size: 1.6em;
  }
}

/* Ensure no image filters are used */
.page-resources img {
  filter: none !important;
}

/* Ensure content images meet minimum size requirements */
.page-resources__content-image {
  min-width: 200px;
  min-height: 200px;
}
.page-resources__news-card img {
  min-width: 200px;
  min-height: 200px;
}

/* Color Contrast Safeguards */
.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}
.page-resources__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}
.page-resources__cta-button {
  color: var(--primary-color); /* For primary button, text is dark blue */
}
.page-resources__btn-secondary {
  color: var(--secondary-color); /* For secondary button, text is gold */
}
.page-resources__btn-secondary:hover {
  color: var(--primary-color);
}

/* Override for primary button text color on gold background */
.page-resources__btn-primary {
  color: var(--primary-color);
}

.page-resources__hero-section .page-resources__btn-primary {
  color: var(--primary-color);
}

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

.page-resources__view-all-button .page-resources__btn-primary {
  color: var(--primary-color);
}