/* style/resources.css */

/* Base styles for the page content, ensuring contrast with shared body background */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background from shared.css */
}

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

.page-resources__subsection-title {
  font-size: 1.8em;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #F5B041; /* Accent color for subtitles */
}

.page-resources__section-text {
  font-size: 1.1em;
  margin-bottom: 15px;
  text-align: justify;
}

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

.page-resources__dark-bg {
  background-color: #0A2342; /* Main brand color */
  color: #ffffff;
  padding: 80px 0;
}

.page-resources__light-bg {
  background-color: #1a1a2e; /* Using shared body background for these sections */
  color: #ffffff; /* Ensuring light text for dark background */
  padding: 80px 0;
}

.page-resources__white-text {
  color: #ffffff;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-tertiary,
.page-resources__btn-inline {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box; /* Crucial for responsive buttons */
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-resources__btn-primary {
  background-color: #F5B041; /* Accent color */
  color: #0A2342; /* Dark text for light background */
  border: 2px solid #F5B041;
}

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

.page-resources__btn-secondary {
  background-color: transparent;
  color: #F5B041; /* Accent color */
  border: 2px solid #F5B041;
}

.page-resources__btn-secondary:hover {
  background-color: #F5B041;
  color: #0A2342;
}

.page-resources__btn-tertiary {
  background-color: #0A2342;
  color: #F5B041;
  border: 1px solid #F5B041;
  padding: 10px 20px;
  font-size: 0.9em;
}

.page-resources__btn-tertiary:hover {
  background-color: #F5B041;
  color: #0A2342;
}

.page-resources__btn-inline {
  background-color: #F5B041;
  color: #0A2342;
  border: none;
  padding: 8px 15px;
  font-size: 0.9em;
  margin-top: 10px;
  margin-right: 10px;
  border-radius: 3px;
}

.page-resources__btn-inline:hover {
  background-color: #e09f3b;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px; /* Fixed height for desktop */
}

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

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

.page-resources__hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: 20px;
}

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

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

.page-resources__hero-cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Intro Section */
.page-resources__intro-section {
  text-align: center;
}

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

.page-resources__card {
  background-color: rgba(255, 255, 255, 0.08); /* Slightly transparent white for card background */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  height: 100%; /* Ensure cards have equal height */
}

.page-resources__card-image {
  width: 100%;
  height: 250px; /* Fixed height for card images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

.page-resources__card-title {
  font-size: 1.5em;
  color: #F5B041;
  margin-bottom: 15px;
  min-height: 60px; /* ensure title has enough space */
}

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

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

.page-resources__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1; /* Allows text to take available space */
}

/* Tips Section */
.page-resources__flex-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-resources__text-block {
  flex: 2;
}

.page-resources__image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources__image-block .page-resources__image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

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

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

.page-resources__list strong {
  color: #F5B041;
}

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

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  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;
  cursor: pointer;
  background-color: #0A2342; /* Main brand color for question */
  color: #ffffff;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

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

.page-resources__faq-heading {
  margin: 0;
  font-size: 1.2em;
  color: #ffffff;
}

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

.page-resources__faq-item.active .page-resources__faq-toggle {
  transform: rotate(45deg);
}

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  background-color: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
  color: #f0f0f0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  text-align: justify;
}

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

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

.page-resources__faq-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* CTA Section */
.page-resources__cta-section {
  text-align: center;
  padding: 60px 0;
}

.page-resources__cta-content {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
  .page-resources__section-title {
    font-size: 2em;
  }
  .page-resources__subsection-title {
    font-size: 1.5em;
  }
  .page-resources__flex-content {
    flex-direction: column;
    gap: 30px;
  }
  .page-resources__image-block {
    order: -1; /* Move image above text on smaller screens */
  }
  .page-resources__card-image {
    height: 200px;
  }
  .page-resources__card-title {
    font-size: 1.3em;
  }
}

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

  .page-resources__hero-title {
    font-size: 2.2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__hero-cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px 20px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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