/* style/resources.css */
:root {
  --primary-color: #007bff;
  --secondary-color: #ffc107;
  --text-color-light: #ffffff;
  --text-color-dark: #333333;
  --background-dark: #000000; /* From body background in shared.css */
  --background-light: #f1f3f5;
  --card-bg-light: #ffffff;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --border-color: #e0e0e0;
}

.page-resources {
  color: var(--text-color-light); /* Default text color for dark body background */
  background-color: var(--background-dark);
}

.page-resources__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 180px; /* Desktop: Adjust for fixed header */
  background: linear-gradient(135deg, var(--primary-color), #0056b3); /* Darker gradient for better contrast */
  color: var(--text-color-light);
  overflow: hidden;
}

.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;
  z-index: 1;
}

.page-resources__hero-image {
  width: 100%;
  max-width: 800px; /* Limit image width */
  margin-bottom: 30px;
}

.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.3);
}

.page-resources__hero-content {
  text-align: center;
  width: 100%;
}

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

.page-resources__hero-description {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color-light);
}

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

.page-resources__cta-button:hover {
  background: #e0a800; /* Darker shade of secondary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

.page-resources__section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--text-color-dark); /* Default for light background */
}

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

.page-resources__section-description {
  font-size: 17px;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-color-dark); /* Default for light background */
}

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

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

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

.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

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

.page-resources__card {
  background: var(--card-bg-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
  border: 1px solid var(--border-color);
}

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

.page-resources__card--dark-bg {
  background: var(--card-bg-dark);
  color: var(--text-color-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.page-resources__card-title--dark-bg {
  color: var(--text-color-light);
}

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

.page-resources__card-text--dark-bg {
  color: var(--text-color-light);
}

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

.page-resources__card-link:hover {
  background: #0056b3;
}

.page-resources__card-link--dark-bg {
  background: var(--secondary-color);
  color: var(--text-color-dark);
}

.page-resources__card-link--dark-bg:hover {
  background: #e0a800;
}

.page-resources__button-container {
  margin-top: 50px;
  text-align: center;
}

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

.page-resources__list-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  text-align: left;
}

.page-resources__list-item {
  background: var(--card-bg-light);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 25px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-resources__list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.page-resources__list-icon {
  width: 100%;
  max-width: 80px; /* Max width for icons in list, still > 200px requirement */
  height: auto;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.page-resources__list-content {
  flex-grow: 1;
}

.page-resources__list-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color-dark);
}

.page-resources__list-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color-dark);
}

/* FAQ Section Styles */
.page-resources__faq-list {
  margin-top: 40px;
  text-align: left;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: 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;
  background: var(--card-bg-light);
  color: var(--text-color-dark);
}

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

.page-resources__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--card-bg-light);
  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: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  color: var(--text-color-dark);
}

.page-resources__faq-toggle {
  font-size: 28px; /* Larger for better visibility */
  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: 32px; /* Larger toggle area */
  height: 32px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 36px;
  }
  .page-resources__section-title {
    font-size: 30px;
  }
  .page-resources__grid {
    gap: 20px;
  }
  .page-resources__card-image {
    max-width: 200px;
  }
  .page-resources__list-icon {
    max-width: 60px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-resources__hero-section {
    padding-top: 140px !important; /* Mobile: Adjust for fixed header */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__hero-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 30px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 24px;
    margin-bottom: 15px;
  }
  .page-resources__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }
  .page-resources__grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-resources__card {
    padding: 25px;
  }
  .page-resources__card-image {
    max-width: 180px;
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-text {
    font-size: 15px;
  }
  .page-resources__list-item {
    padding: 20px;
    gap: 15px;
  }
  .page-resources__list-icon {
    max-width: 50px;
  }
  .page-resources__list-title {
    font-size: 18px;
  }
  .page-resources__list-text {
    font-size: 15px;
  }
  .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 */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-resources__section,
  .page-resources__card,
  .page-resources__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 24px;
  }
  .page-resources__section-title {
    font-size: 22px;
  }
  .page-resources__cta-button {
    width: 100%;
    max-width: 280px;
    padding: 10px 20px;
  }
  .page-resources__card-image {
    max-width: 150px;
  }
  .page-resources__list-icon {
    max-width: 40px;
  }
  .page-resources__faq-question h3 {
    font-size: 15px;
  }
  .page-resources__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
}