/* style/resources.css */

/* Base styles for the page content */
.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light background */
  background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  width: 100%;
  height: 600px; /* Adjust height as needed */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  box-sizing: border-box;
}

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

.page-resources__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
  z-index: 1;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 800px;
  padding: 20px;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
}

/* Section General */
.page-resources__section {
  padding: 60px 0;
  background-color: var(--background-color, #ffffff);
}

.page-resources__section:nth-of-type(even) {
  background-color: #f8f8f8; /* Light grey background for alternating sections */
}

.page-resources__section-title {
  font-size: 2.5em;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-resources__section-description,
.page-resources__text-block {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #555555;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1.1em;
  text-align: center;
  box-sizing: border-box; /* Ensure padding doesn't push width */
}

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

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

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

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

/* Specific button colors for Register/Login */
.page-resources__hero-section .page-resources__btn-primary,
.page-resources__cta-section .page-resources__btn-primary {
  background: #C30808; /* Register color */
  color: #FFFF00; /* Register/Login font color */
  border-color: #C30808;
}

.page-resources__hero-section .page-resources__btn-primary:hover,
.page-resources__cta-section .page-resources__btn-primary:hover {
  background: #a30606;
  border-color: #a30606;
}


/* Video Section */
.page-resources__video-section {
  background-color: #017439; /* Darker background for video */
  color: #ffffff;
  padding-top: 60px; /* Reset for this section, as hero handles header offset */
}

.page-resources__video-section .page-resources__section-title,
.page-resources__video-section .page-resources__section-description {
  color: #ffffff;
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 40px auto;
  max-width: 900px; /* Limit video width */
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block; /* Ensure video takes full width */
  cursor: pointer;
}

.page-resources__video-cta {
  margin-top: 20px;
  background: #C30808; /* Register color */
  color: #FFFF00; /* Register/Login font color */
  border-color: #C30808;
}

.page-resources__video-cta:hover {
  background: #a30606;
  border-color: #a30606;
}

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

.page-resources__card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* Ensure cards in a row have equal height */
}

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

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

.page-resources__card-title {
  font-size: 1.5em;
  color: #017439;
  padding: 20px 20px 10px 20px;
  font-weight: bold;
}

.page-resources__card-title a {
  text-decoration: none;
  color: inherit;
}

.page-resources__card-title a:hover {
  text-decoration: underline;
}

.page-resources__card-text {
  font-size: 0.95em;
  color: #666666;
  padding: 0 20px 20px 20px;
  flex-grow: 1; /* Allow text to grow */
}

.page-resources__card .page-resources__btn-secondary {
  margin: 0 20px 20px 20px;
  align-self: flex-start; /* Align button to start within card */
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 60px auto;
  border-top: 1px solid #e0e0e0;
}

.page-resources__faq-item {
  border-bottom: 1px solid #e0e0e0;
}

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

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

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

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

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

.page-resources__faq-answer p {
  margin-bottom: 0; /* Remove default paragraph margin */
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 1000px !important; /* Use !important as required */
  padding: 15px 20px;
}

/* Call to Action Section */
.page-resources__cta-section {
  background: linear-gradient(135deg, #017439, #005f2e); /* Gradient background */
  color: #ffffff;
  padding: 80px 20px;
  text-align: center;
  border-radius: 10px;
  margin: 60px auto;
  max-width: 1200px;
  box-sizing: border-box;
}

.page-resources__cta-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-resources__cta-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-resources__cta-button {
  margin-top: 20px;
  padding: 18px 40px;
  font-size: 1.2em;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 2.8em;
  }

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

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

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

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__hero-section {
    height: 500px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
  }

  .page-resources__hero-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;
    padding: 0 15px;
  }

  .page-resources__section-description,
  .page-resources__text-block {
    font-size: 1em;
    padding: 0 15px;
  }

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

  .page-resources__card-image {
    height: 200px;
  }

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

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

  .page-resources__video-section .page-resources__container,
  .page-resources__cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__video-wrapper {
    margin: 20px auto;
  }

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

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

  /* Mobile image responsiveness - REQUIRED */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !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;
  }
  
  /* Mobile video responsiveness - REQUIRED */
  .page-resources video,
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Mobile button responsiveness - REQUIRED */
  .page-resources__cta-button,
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources a[class*="button"],
  .page-resources a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important; /* Make buttons full width on mobile */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto; /* Center buttons if they are block */
    margin-right: auto;
  }
  
  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex; /* Ensure flex is applied for wrapping */
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

  /* FAQ mobile padding */
  .page-resources__faq-list {
    padding: 0 15px;
  }
  .page-resources__faq-answer {
    padding: 0 15px; /* Adjust padding for mobile */
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 15px; /* Adjust padding for mobile */
  }
}