/* style/resources.css */

/* Variables from shared.css will be used: --primary-color (#26A9E0), --secondary-color (#FFFFFF) */

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* White background for the main content area */
}

/* --- Hero Section --- */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensure space for fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Blends primary color with white */
  overflow: hidden; /* Prevent content overflow */
}

.page-resources__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum image size */
  min-height: 200px; /* Minimum image size */
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #000000; /* Darker text for contrast on gradient */
}

.page-resources__hero-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: #000000; /* Ensure high contrast */
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #333333; /* Ensure high contrast */
}

/* --- General Section Styling --- */
.page-resources__section {
  padding: 80px 20px;
  text-align: center;
}

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

.page-resources__section-title {
  font-size: 2.2em;
  margin-bottom: 20px;
  color: #26A9E0; /* Primary color for titles */
}

.page-resources__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

/* --- Grid Layouts --- */
.page-resources__grid {
  display: grid;
  gap: 30px;
  margin-top: 30px;
  justify-content: center;
}

.page-resources__grid--2-cols {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.page-resources__grid--3-cols {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* --- Card Styling --- */
.page-resources__card {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.page-resources__card--dark {
  background: #26A9E0; /* Primary color background */
  color: #ffffff; /* White text */
}

.page-resources__card--dark .page-resources__card-title {
  color: #ffffff; /* White text */
}

.page-resources__card--dark p,
.page-resources__card--dark li {
  color: #f0f0f0; /* Slightly off-white for body text */
}

.page-resources__card-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: #26A9E0;
  line-height: 1.3;
}

.page-resources__card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 20px;
  object-fit: cover;
  min-width: 200px; /* Minimum image size */
  min-height: 200px; /* Minimum image size */
}

.page-resources__card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.page-resources__card ul li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  color: #555555;
}

.page-resources__card--dark ul li {
  color: #f0f0f0;
}

.page-resources__card ul li::before {
  content: '✓';
  color: #26A9E0;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.page-resources__card--dark ul li::before {
  color: #FFFFFF; /* White checkmark on dark cards */
}

/* --- Button Styling --- */
.page-resources__cta-button,
.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none; /* Remove default button border */
  text-align: center;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-resources__btn-primary {
  background: #26A9E0; /* Primary color */
  color: #ffffff;
}

.page-resources__btn-primary:hover {
  background: #1e87b8; /* Slightly darker primary on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-secondary {
  background: #ffffff;
  color: #26A9E0; /* Primary color text */
  border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
  background: #f0f0f0; /* Light gray on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-resources__button-group {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 20px;
  justify-content: center;
  width: 100%; /* Ensure container takes full width */
  max-width: 100%; /* Ensure container doesn't overflow */
  box-sizing: border-box;
  overflow: hidden;
}

.page-resources__button-group .page-resources__btn-primary,
.page-resources__button-group .page-resources__btn-secondary {
  flex-grow: 1; /* Allow buttons to grow */
  min-width: 200px; /* Minimum width for buttons in a group */
}

/* --- Dark Background Sections --- */
.page-resources__dark-bg {
  background-color: #26A9E0; /* Primary color */
  color: #ffffff;
}

.page-resources__dark-bg .page-resources__section-title {
  color: #ffffff;
}

.page-resources__dark-bg .page-resources__section-description {
  color: #f0f0f0;
}

/* --- Light Background Sections --- */
.page-resources__light-bg {
  background-color: #ffffff;
  color: #333333;
}

/* --- Promotion Card Specifics --- */
.page-resources__promotion-card {
  text-align: center;
}

.page-resources__promotion-card .page-resources__card-title {
  margin-top: 15px;
  margin-bottom: 10px;
  color: #26A9E0;
}

.page-resources__promotion-card p {
  color: #555555;
  margin-bottom: 20px;
}

/* --- News Section Specifics --- */
.page-resources__news-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.page-resources__news-item img {
  margin-bottom: 15px;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__news-item .page-resources__card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
}

.page-resources__news-item .page-resources__card-title a {
  color: #ffffff; /* White link on dark card */
  text-decoration: none;
}

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

.page-resources__news-item p {
  color: #f0f0f0;
  flex-grow: 1;
}

.page-resources__news-date {
  display: block;
  font-size: 0.9em;
  color: #cccccc;
  margin-top: 15px;
}

/* --- Contact Section Specifics --- */
.page-resources__contact-info {
  margin-top: 30px;
  font-size: 1.1em;
  color: #f0f0f0;
}

.page-resources__contact-info p {
  margin-bottom: 10px;
}

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

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important to ensure priority, value large enough for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-resources__faq-answer p {
  color: #555555;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  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: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: #333333;
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
  font-size: 24px;
  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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #26A9E0; /* Primary color for active toggle */
  transform: rotate(45deg); /* Rotate to form an 'X' or similar */
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .page-resources__grid--2-cols,
  .page-resources__grid--3-cols {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
  }

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

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

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__hero-image img {
    border-radius: 4px;
  }
  
  .page-resources__hero-title {
    font-size: 1.8em;
  }

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

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

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

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

  .page-resources__card {
    padding: 20px;
  }

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

  /* Mobile image responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Ensure min size on mobile */
    min-height: 200px !important; /* Ensure min size on mobile */
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile button responsiveness */
  .page-resources__cta-button,
  .page-resources__btn-primary,
  .page-resources__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__button-group {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__button-group .page-resources__btn-primary,
  .page-resources__button-group .page-resources__btn-secondary {
    min-width: unset; /* Remove min-width for mobile stacking */
  }

  /* FAQ mobile */
  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 1em;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }
}