/* style/resources.css */

/* Base styles for the resources page */
.page-resources {
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
  line-height: 1.6;
  font-family: Arial, sans-serif;
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding: 80px 0; /* Adjust as needed */
  text-align: center;
  background-color: #26A9E0; /* Use brand color for hero background */
  color: #ffffff; /* White text for brand color background */
  padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-resources__description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px;
}

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow text to break words */
}

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

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

.page-resources__btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-resources__btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Section common styles */
.page-resources__guides-section,
.page-resources__strategy-section,
.page-resources__news-section,
.page-resources__safety-section,
.page-resources__faq-section,
.page-resources__cta-bottom {
  padding: 60px 0;
  text-align: center;
}

.page-resources__section-title {
  font-size: 2.2em;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-resources__section-description {
  font-size: 1em;
  max-width: 900px;
  margin: 0 auto 40px;
  color: #f0f0f0; /* Slightly lighter for descriptions */
}

/* Background colors for sections */
.page-resources__dark-bg {
  background-color: #1a1a1a; /* Body background color */
  color: #ffffff;
}

.page-resources__light-bg {
  background-color: #26A9E0; /* Use primary brand color for contrast */
  color: #ffffff;
}

.page-resources__light-bg .page-resources__section-title,
.page-resources__light-bg .page-resources__section-description,
.page-resources__light-bg .page-resources__card-title a,
.page-resources__light-bg .page-resources__card-link {
  color: #ffffff; /* Ensure text is white on light blue background */
}

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

/* Card styles */
.page-resources__card {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards on dark bg */
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards in a row have equal height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff; /* White text on card background */
}

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

.page-resources__card-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  filter: none; /* Ensure no CSS filter is applied */
}

.page-resources__card-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-resources__card-title a {
  text-decoration: none;
  color: #ffffff;
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: #EA7C07; /* Highlight link on hover */
}

.page-resources__card-text {
  font-size: 0.95em;
  margin-bottom: 20px;
  flex-grow: 1; /* Make text content take available space */
  color: #f0f0f0;
}

.page-resources__card-link {
  display: inline-block;
  color: #EA7C07; /* Use accent color for links */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-resources__card-link:hover {
  text-decoration: underline;
  color: #d86c06;
}

/* Darker cards for sections with primary brand color background */
.page-resources__dark-card {
  background-color: rgba(0, 0, 0, 0.3); /* Darker transparent background */
  color: #ffffff;
}

.page-resources__dark-card .page-resources__card-title a {
  color: #ffffff;
}

.page-resources__dark-card .page-resources__card-link {
  color: #EA7C07;
}

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

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-q-text {
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: #EA7C07;
  transition: transform 0.3s ease;
}

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

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
}

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

.page-resources__faq-answer p {
  margin-bottom: 10px;
  color: #f0f0f0;
}

.page-resources__faq-answer a {
  color: #EA7C07;
  text-decoration: none;
}

.page-resources__faq-answer a:hover {
  text-decoration: underline;
}

/* Call to Action Bottom */
.page-resources__cta-bottom {
  padding: 80px 0;
  background-color: #1a1a1a; /* Ensure dark background */
  color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 2.5em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

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

  .page-resources__description {
    font-size: 1em;
  }

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

  .page-resources__section-description {
    font-size: 0.9em;
  }

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to prevent overflow */
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1em;
    padding: 12px 20px;
  }

  .page-resources__grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-resources__card {
    padding: 20px;
  }

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

  .page-resources__card-title {
    font-size: 1.2em;
  }

  .page-resources__card-text {
    font-size: 0.9em;
  }

  .page-resources__faq-list {
    padding: 0 15px;
  }

  .page-resources__faq-question {
    padding: 15px 20px;
  }

  .page-resources__faq-q-text {
    font-size: 1em;
  }

  .page-resources__faq-answer {
    padding: 0 20px;
  }

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px 20px;
  }

  /* Images must be responsive */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure content containers are responsive */
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__guides-section .page-resources__container,
  .page-resources__strategy-section .page-resources__container,
  .page-resources__news-section .page-resources__container,
  .page-resources__safety-section .page-resources__container,
  .page-resources__faq-section .page-resources__container,
  .page-resources__cta-bottom .page-resources__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-resources__hero-section .page-resources__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* Specific rule for content area images to ensure no overflow */
  .page-resources__content-area img,
  .page-resources__grid img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}