/* style/resources.css */
:root {
  --primary-color: #336699;
  --secondary-color: #FFCC00;
  --text-on-dark: #ffffff;
  --text-on-light: #333333;
  --background-dark: #000000; /* Body background from shared.css */
  --background-dark-lightened: #1a1a1a; /* Slightly lighter dark for contrast */
  --card-background-light: #ffffff;
  --card-hover-shadow: rgba(0, 0, 0, 0.4);
  --border-color-light: #e0e0e0;
  --button-primary-hover: #e6b800;
  --button-secondary-hover-bg: #336699;
  --button-secondary-hover-text: #ffffff;
  --faq-question-hover-bg: #f5f5f5;
  --faq-question-hover-border: #d0d0d0;
  --faq-question-active-bg: #eeeeee;
  --faq-answer-bg: #f9f9f9;
  --text-grey-light: #cccccc;
  --text-grey-medium: #555555;
}

.page-resources {
  color: var(--text-on-dark); /* Default text color for page content on dark body background */
  background-color: var(--background-dark);
  padding-top: 180px; /* For fixed header on desktop */
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 140px; /* For fixed header on mobile */
  }
}

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

/* Hero Intro Section (not the homepage HERO module) */
.page-resources__hero-intro-section {
  background: linear-gradient(135deg, var(--primary-color), #2a527a); /* Darker gradient for contrast */
  padding: 80px 0;
  text-align: center;
  color: var(--text-on-dark);
  margin-bottom: 40px;
}

.page-resources__hero-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 18px;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-resources__highlight {
  color: var(--secondary-color);
  font-weight: bold;
}

.page-resources__hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button--primary {
  background: var(--secondary-color);
  color: var(--text-on-light);
}

.page-resources__cta-button--primary:hover {
  background: var(--button-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--secondary {
  background: var(--card-background-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-resources__cta-button--secondary:hover {
  background: var(--button-secondary-hover-bg);
  color: var(--button-secondary-hover-text);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-resources__section {
  padding: 60px 0;
  margin-bottom: 40px;
  background-color: var(--background-dark);
  color: var(--text-on-dark);
}

.page-resources__section:nth-of-type(odd) {
  background-color: var(--background-dark-lightened); /* Slightly lighter dark background for visual separation */
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.page-resources__section-description {
  font-size: 17px;
  line-height: 1.6;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-grey-light);
}

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

.page-resources__card {
  background: var(--card-background-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-on-light); /* Dark text on light card background */
}

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

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

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

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

.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(--button-hover-darken);
  text-decoration: underline;
}

.page-resources__card-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-grey-medium);
}

.page-resources__card-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-resources__card-link:hover {
  background: var(--button-hover-darken);
  transform: translateY(-2px);
}

/* FAQ Section */
.page-resources__faq-section {
  padding-bottom: 80px; /* Adjust padding for the FAQ section */
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background-color: var(--card-background-light); /* Light background for FAQ item */
}

.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;
  color: var(--text-on-light); /* Dark text on light FAQ answer background */
  background: var(--faq-answer-bg);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px 25px !important;
  opacity: 1;
  background: var(--faq-answer-bg);
  border-radius: 0 0 5px 5px;
}

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

.page-resources__faq-question:hover {
  background: var(--faq-question-hover-bg);
  border-color: var(--faq-question-hover-border);
}

.page-resources__faq-question:active {
  background: var(--faq-question-active-bg);
}

.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(--primary-color);
}

.page-resources__faq-toggle {
  font-size: 28px;
  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: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--button-hover-darken);
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 36px;
  }
  .page-resources__hero-description {
    font-size: 17px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__section-description {
    font-size: 16px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-text {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-intro-section {
    padding: 60px 0;
  }
  .page-resources__hero-title {
    font-size: 30px;
  }
  .page-resources__hero-description {
    font-size: 16px;
  }
  .page-resources__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__cta-button {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    font-size: 16px;
    padding: 12px 25px;
  }
  .page-resources__section {
    padding: 40px 0;
    margin-bottom: 30px;
  }
  .page-resources__section-title {
    font-size: 28px;
  }
  .page-resources__section-description {
    font-size: 15px;
  }
  .page-resources__card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .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: 14px;
  }
  .page-resources__card-link {
    padding: 8px 15px;
    font-size: 14px;
  }

  .page-resources__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
    margin-bottom: 0;
    width: calc(100% - 40px);
    color: var(--primary-color);
  }
  
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-resources__faq-answer {
    padding: 0 20px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 26px;
  }
  .page-resources__hero-description {
    font-size: 15px;
  }
  .page-resources__section-title {
    font-size: 24px;
  }
  .page-resources__faq-question h3 {
    font-size: 15px;
  }
}