/* style/resources.css */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --text-color-light: #ffffff;
  --text-color-dark: #333333;
  --background-light: #f1f3f5;
  --background-dark: #2C3E50;
  --card-background: #ffffff;
  --border-color: #e0e0e0;
}

.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.7;
  color: var(--text-color-dark);
}

/* Ensure content is not covered by fixed header */
.page-resources__hero-banner {
  padding-top: 180px; /* Desktop: Adjust based on fixed header height */
}

@media (max-width: 768px) {
  .page-resources__hero-banner {
    padding-top: 160px !important; /* Mobile: Adjust based on mobile fixed header height */
  }
}

.page-resources__section {
  padding: 60px 20px;
}

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

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

.page-resources__section--dark .page-resources__section-title,
.page-resources__section--dark .page-resources__sub-heading {
  color: var(--text-color-light);
}

.page-resources__section--dark a {
  color: #87CEEB; /* Lighter blue for links on dark background */
}

.page-resources__section--dark a:hover {
  color: #ADD8E6;
}

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

.page-resources__main-heading,
.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.page-resources__section-intro {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__sub-heading {
  font-size: 24px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-resources__hero-banner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Example gradient */
}

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

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

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: var(--text-color-light);
}

.page-resources__hero-content .page-resources__main-heading {
  color: var(--text-color-light);
}

.page-resources__hero-description {
  font-size: 18px;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__hero-description a {
  color: #FFD700;
  text-decoration: underline;
}

.page-resources__hero-description a:hover {
  color: #FFA500;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__cta-button--small {
  padding: 10px 25px;
  font-size: 16px;
  margin-top: 25px;
}

.page-resources__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__card {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

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

.page-resources__card-image {
  max-width: 250px; /* Ensure images are not small icons */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

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

.page-resources__card-text {
  font-size: 16px;
  color: var(--text-color-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.page-resources__card-text a:hover {
  color: #C0392B;
}

.page-resources__card-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: var(--text-color-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: auto;
}

.page-resources__card-button:hover {
  background: #34495E;
  transform: translateY(-1px);
}

.page-resources__content-block {
  background: var(--card-background);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 40px;
  margin-top: 40px;
}

.page-resources__section--dark .page-resources__content-block {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__section--dark .page-resources__content-block p,
.page-resources__section--dark .page-resources__content-block li {
  color: var(--text-color-light);
}

.page-resources__content-image {
  width: 100%;
  height: auto;
  max-width: 600px; /* Adjust max-width for content images */
  display: block;
  margin: 25px auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.page-resources__list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
}

.page-resources__list li {
  margin-bottom: 10px;
  font-size: 16px;
}

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

.page-resources__faq-list {
  margin-top: 40px;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--card-background);
  box-shadow: 0 2px 8px 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-color-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important;
  padding: 20px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-item.active .page-resources__faq-answer p {
  margin-bottom: 0;
}

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

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

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

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

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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-item.active .page-resources__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(45deg);
}

/* Responsive Design */
@media (max-width: 992px) {
  .page-resources__main-heading,
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__hero-description,
  .page-resources__section-intro {
    font-size: 16px;
  }
  .page-resources__sub-heading {
    font-size: 22px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-text,
  .page-resources__list li,
  .page-resources__faq-question h3,
  .page-resources__faq-answer p {
    font-size: 15px;
  }
  .page-resources__card-image {
    max-width: 200px;
  }
  .page-resources__content-block {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__container {
    padding: 0 10px;
  }
  .page-resources__main-heading,
  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .page-resources__hero-description,
  .page-resources__section-intro {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-resources__cta-button--small {
    padding: 8px 20px;
    font-size: 14px;
  }
  .page-resources__sub-heading {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 10px;
  }
  .page-resources__card-grid {
    gap: 20px;
  }
  .page-resources__card {
    padding: 20px;
  }
  .page-resources__card-image {
    max-width: 180px;
  }
  .page-resources__card-title {
    font-size: 18px;
  }
  .page-resources__card-text,
  .page-resources__list li,
  .page-resources__faq-question h3,
  .page-resources__faq-answer p {
    font-size: 14px;
  }
  .page-resources__content-block {
    padding: 25px;
  }
  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-resources__faq-question h3 {
    font-size: 15px;
    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;
  }

  /* Mobile image responsive adaptation */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-banner,
  .page-resources__hero-container,
  .page-resources__content-block {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

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

/* Ensure contrast for dark background elements */
.page-resources__section--dark .page-resources__content-block {
  color: var(--text-color-light);
}

.page-resources__section--dark .page-resources__content-block a {
  color: #87CEEB; /* Lighter blue for links on dark background */
}

.page-resources__section--dark .page-resources__content-block a:hover {
  color: #ADD8E6;
}