/* style/resources.css */

/* --- General Styles & Layout --- */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light background */
  background-color: #ffffff; /* Assuming body is light, but specific sections might override */
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

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

.page-resources__section--light {
  background-color: #f8f8f8; /* Light background for contrast */
  color: #333333;
}

.page-resources__section--dark {
  background-color: #26A9E0; /* Brand primary color as dark background */
  color: #ffffff;
}

.page-resources__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #26A9E0; /* Brand primary color for titles on light background */
}

.page-resources__section-title--white {
  color: #ffffff; /* White title on dark background */
}

.page-resources__section-intro {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__section-intro--white {
  color: #f0f0f0;
}

/* --- Hero Section --- */
.page-resources__hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  min-height: 500px;
  overflow: hidden;
  padding: 60px 20px;
  box-sizing: border-box;
  background-color: #26A9E0; /* Fallback background color */
}

.page-resources__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.page-resources__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7; /* Slightly dim image for text readability */
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
}

.page-resources__main-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff;
}

.page-resources__hero-description {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

/* --- Buttons --- */
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Ensure padding/border included in width */
  max-width: 100%; /* Ensure responsiveness */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-resources__btn-primary {
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  border: 2px solid #EA7C07;
  margin: 10px;
}

.page-resources__btn-primary:hover {
  background-color: #d16b05;
  border-color: #d16b05;
}

.page-resources__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
  margin: 10px;
}

.page-resources__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* --- Grid Layout for Cards --- */
.page-resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  text-align: left;
}

.page-resources__grid--single-column {
  grid-template-columns: 1fr;
  max-width: 700px; /* Constrain single column width */
  margin-left: auto;
  margin-right: auto;
}

/* --- Card Styles --- */
.page-resources__card {
  background-color: #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;
  display: flex;
  flex-direction: column;
  color: #333333;
  text-align: center;
}

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

.page-resources__card--dark-bg {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark section */
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__card--dark-bg:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.page-resources__card--dark-bg .page-resources__card-image {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.page-resources__card-title {
  font-size: 1.5em;
  margin: 20px 15px 10px;
  min-height: 60px; /* Ensure consistent title height */
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-resources__card-title a {
  color: #26A9E0; /* Brand primary for card titles */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: #1a7aa0;
}

.page-resources__card-title--white a {
  color: #ffffff; /* White for card titles on dark background */
}

.page-resources__card-title--white a:hover {
  color: #f0f0f0;
}

.page-resources__card-text {
  padding: 0 20px 20px;
  flex-grow: 1; /* Allow text to take available space */
}

.page-resources__card-text--white {
  color: #f0f0f0;
}

.page-resources__card-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: #26A9E0;
  color: #ffffff;
  border-radius: 5px;
  text-decoration: none;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
  background-color: #1a7aa0;
}

.page-resources__card-link--white {
  background-color: #ffffff;
  color: #26A9E0;
}

.page-resources__card-link--white:hover {
  background-color: #f0f0f0;
  color: #1a7aa0;
}

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

.page-resources__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f0f0f0;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: #333333;
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: #e5e5e5;
}

.page-resources__faq-heading {
  margin: 0;
  font-size: 1em; /* Adjust to fit parent font size */
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: #26A9E0;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg); /* Change + to X or - */
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #555555;
  background-color: #ffffff;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 20px;
}

.page-resources__faq-answer p {
  margin: 0;
  padding-bottom: 10px; /* Add some spacing */
}

/* --- Call to Action Section --- */
.page-resources__section--cta {
  background-color: #26A9E0;
  color: #ffffff;
  padding: 80px 0;
}

.page-resources__cta-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* --- Floating Button --- */
.page-resources__floating-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  padding: 15px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: background-color 0.3s ease;
  white-space: nowrap; /* Prevent text wrap on desktop */
}

.page-resources__floating-button:hover {
  background-color: #d16b05;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.2em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources__container,
  .page-resources__cta-content,
  .page-resources__hero-section .page-resources__hero-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-resources__hero-section {
    min-height: 400px;
    padding: 40px 15px;
  }

  .page-resources__main-title {
    font-size: 2.2em;
  }

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

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

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

  .page-resources__grid {
    grid-template-columns: 1fr; /* Single column layout for mobile */
    gap: 20px;
  }

  .page-resources__card-image {
    height: 200px; /* Adjust card image height for mobile */
  }

  .page-resources__card-title {
    font-size: 1.3em;
    min-height: auto; /* Allow height to adjust */
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    padding: 12px 20px;
    font-size: 1em;
    width: 100% !important; /* Full width for buttons */
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  /* Images responsive adaptation */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/content */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-section,
  .page-resources__cta-content,
  .page-resources__faq-list,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent horizontal overflow */
  }

  .page-resources__floating-button {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 0.9em;
    white-space: normal;
    text-align: center;
    width: auto;
    max-width: calc(100% - 40px);
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 1.8em;
  }
  .page-resources__hero-description {
    font-size: 0.9em;
  }
  .page-resources__section-title {
    font-size: 1.5em;
  }
  .page-resources__floating-button {
    font-size: 0.8em;
    padding: 10px 15px;
  }
}