:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
  --light-bg: #f9f9f9;
}

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

/* --- Hero Banner Section --- */
.page-resources__hero-banner {
  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); /* Fixed header offset */
  background-color: var(--light-bg); /* Light background for the section */
}

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

.page-resources__hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 30px;
}

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

.page-resources__hero-content h1 {
  font-size: 2.8em;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-resources__hero-content p {
  font-size: 1.1em;
  color: var(--text-dark);
  margin-bottom: 30px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__cta-button:hover {
  background: #1e87c0; /* Slightly darker primary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* --- General Section Styling --- */
.page-resources__section {
  padding: 80px 20px;
  text-align: center;
}

.page-resources__section--guides {
  background-color: var(--secondary-color);
}

.page-resources__section--faq {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__section--faq .page-resources__section-title,
.page-resources__section--faq .page-resources__section-description {
  color: var(--text-light);
}

.page-resources__section--news {
  background-color: var(--light-bg);
}

.page-resources__section--contact {
  background-color: var(--secondary-color);
  padding-bottom: 80px;
}

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

.page-resources__section-title {
  font-size: 2.2em;
  color: var(--primary-color);
  margin-bottom: 20px;
}

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

.page-resources__section-description {
  font-size: 1.05em;
  color: #666;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

.page-resources__section--faq .page-resources__section-description {
  color: #e0f0f8;
}

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

.page-resources__guide-item {
  background: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-resources__guide-item .page-resources__guide-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin: 20px 20px 10px 20px;
  min-height: 3.2em; /* Ensure consistent height for titles */
  display: flex;
  align-items: center;
}

.page-resources__guide-item .page-resources__guide-title a {
  color: inherit;
  text-decoration: none;
}

.page-resources__guide-item .page-resources__guide-title a:hover {
  text-decoration: underline;
}

.page-resources__guide-text {
  font-size: 0.95em;
  color: #555;
  padding: 0 20px;
  margin-bottom: 20px;
  min-height: 4.5em; /* Consistent height for text */
}

.page-resources__guide-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  padding: 0 20px 20px 20px;
  transition: color 0.3s ease;
}

.page-resources__guide-link:hover {
  color: #1e87c0;
  text-decoration: underline;
}

/* --- FAQ Section --- */
.page-resources__faq-list {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--secondary-color); /* White background for FAQ items */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.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: var(--text-dark); /* Dark text for answer */
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Ensure enough height for content */
  padding: 20px !important;
  opacity: 1;
  background: var(--light-bg); /* Light grey background for expanded answer */
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  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: var(--light-bg);
  border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color); /* Primary color for question title */
  pointer-events: none;
}

.page-resources__faq-toggle {
  font-size: 1.8em;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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 {
  color: #333; /* Darker color when active */
  transform: rotate(45deg); /* Rotate to form an 'X' or just change to minus */
}

.page-resources__btn-more-faq {
  margin-top: 40px;
}

/* --- News Section --- */
.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: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__news-image {
  width: 100%;
  height: 200px; /* Consistent height for news images */
  object-fit: cover;
  display: block;
}

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

.page-resources__news-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 10px;
  min-height: 3.2em; /* Consistent height */
  display: flex;
  align-items: center;
}

.page-resources__news-title a {
  color: inherit;
  text-decoration: none;
}

.page-resources__news-title a:hover {
  text-decoration: underline;
}

.page-resources__news-date {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 15px;
}

.page-resources__news-excerpt {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 20px;
  min-height: 4.5em; /* Consistent height */
}

.page-resources__news-readmore {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__news-readmore:hover {
  color: #1e87c0;
  text-decoration: underline;
}

.page-resources__btn-more-news {
  margin-top: 40px;
}

/* --- Contact Section --- */
.page-resources__contact-content {
  padding: 50px 20px;
  background-color: var(--light-bg);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  max-width: 900px;
}

.page-resources__contact-content .page-resources__section-title {
  color: var(--primary-color);
}

.page-resources__contact-content .page-resources__section-description {
  color: #555;
  margin-bottom: 40px;
}

.page-resources__contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Crucial for responsive buttons */
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__btn-primary:hover {
  background: #1e87c0;
  border-color: #1e87c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.page-resources__btn-secondary:hover {
  background: #e0f0f8; /* Light blue hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* --- Image and Button Responsive Adaptations (Crucial for Mobile) --- */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure all content sections/containers are responsive */
.page-resources__section,
.page-resources__container,
.page-resources__guide-grid,
.page-resources__news-grid,
.page-resources__faq-list,
.page-resources__contact-buttons {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* Prevent content overflow */
}

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

  .page-resources__hero-content h1 {
    font-size: 2em;
  }

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

  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 1em;
  }

  .page-resources__section {
    padding: 40px 15px;
  }

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

  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

  .page-resources__guide-grid,
  .page-resources__news-grid {
    grid-template-columns: 1fr; /* Stack items on mobile */
  }

  .page-resources__guide-image,
  .page-resources__news-image {
    height: 180px; /* Adjust image height for mobile */
  }

  .page-resources__guide-item .page-resources__guide-title,
  .page-resources__news-title {
    font-size: 1.1em;
    min-height: auto; /* Allow height to adjust */
  }

  .page-resources__guide-text,
  .page-resources__news-excerpt {
    font-size: 0.9em;
    min-height: auto; /* Allow height to adjust */
  }

  /* FAQ Mobile Styles */
  .page-resources__faq-item {
    margin-bottom: 10px;
    border-radius: 6px;
  }

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
    border-radius: 6px;
  }

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

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }
  
  /* Button Responsive Styles */
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources__cta-button {
    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__contact-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding: 0 15px; /* Add padding to the container */
  }

  /* Ensure all images are responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__guide-grid,
  .page-resources__news-grid,
  .page-resources__faq-list,
  .page-resources__contact-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__hero-banner .page-resources__container { /* Specific override for hero container padding */
    padding-left: 0;
    padding-right: 0;
  }
}