/* style/resources.css */

/* --- Base Styles --- */
.page-resources {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text for light body background */
  background-color: #f8f8f8; /* Inherited from body, but explicitly set for clarity */
}

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

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

.page-resources__section-title {
  font-size: 38px;
  font-weight: bold;
  color: #1A2B4C; /* Brand primary color for titles */
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  margin: 10px;
  cursor: pointer;
  box-sizing: border-box; /* Ensure padding doesn't increase total width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-resources__btn-primary {
  background: #1A2B4C; /* Brand primary color */
  color: #ffffff;
  border: 2px solid #1A2B4C;
}

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

.page-resources__btn-secondary {
  background: #FFD700; /* Brand secondary color */
  color: #1A2B4C; /* Dark text for light background */
  border: 2px solid #FFD700;
}

.page-resources__btn-secondary:hover {
  background: #E6C200; /* Slightly darker */
  border-color: #E6C200;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-center {
  text-align: center;
  margin-top: 50px;
}

/* --- 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;
  /* 🚨 Fixed header spacing */
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, #1A2B4C, #2C4270); /* Gradient background */
  color: #ffffff; /* Light text for dark background */
}

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

.page-resources__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 800px; /* Constrain image width */
}

.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.3);
  min-width: 200px; /* Min size for all images */
  min-height: 200px; /* Min size for all images */
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-resources__main-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #FFD700; /* Auxiliary color for main title */
}

.page-resources__intro-text {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

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


/* --- Guide Overview Section --- */
.page-resources__guide-overview {
  background-color: #ffffff;
}

.page-resources__guide-overview .page-resources__section-title {
  color: #1A2B4C;
}

.page-resources__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
}

.page-resources__card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 450px; /* Ensure cards have some height */
}

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

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

.page-resources__card-title {
  font-size: 24px;
  font-weight: 700;
  color: #1A2B4C;
  margin-bottom: 15px;
}

.page-resources__card-text {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to take available space */
}

.page-resources__card-link {
  display: inline-block;
  color: #FFD700;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #FFD700;
  padding-bottom: 5px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-resources__card-link:hover {
  color: #1A2B4C;
  border-color: #1A2B4C;
}

/* --- Security & Support Section --- */
.page-resources__security-support {
  background-color: #1A2B4C; /* Dark background */
  color: #ffffff; /* Light text */
  padding: 80px 0;
}

.page-resources__security-support .page-resources__section-title {
  color: #FFD700; /* Auxiliary color for title on dark background */
}

.page-resources__security-support .page-resources__section-description {
  color: #f0f0f0;
}

.page-resources__content-wrapper {
  display: flex;
  align-items: center;
  gap: 50px;
  text-align: left;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__text-content {
  flex: 1;
  min-width: 300px;
}

.page-resources__text-content p {
  font-size: 17px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-resources__button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.page-resources__image-content {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-resources__image-full {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  min-width: 200px; /* Min size for all images */
  min-height: 200px; /* Min size for all images */
}

/* --- Latest News Section --- */
.page-resources__latest-news {
  background-color: #f8f8f8;
  padding-bottom: 80px;
}

.page-resources__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
}

.page-resources__news-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 200px; /* Ensure news items have some height */
  display: flex;
  flex-direction: column;
}

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

.page-resources__news-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  flex-grow: 1; /* Allow title to take available space */
}

.page-resources__news-title a {
  color: #1A2B4C;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
  color: #FFD700;
}

.page-resources__news-excerpt {
  font-size: 15px;
  color: #666666;
  margin-bottom: 15px;
}

.page-resources__news-date {
  font-size: 14px;
  color: #999999;
  font-style: italic;
}

/* --- FAQ Section --- */
.page-resources__faq-section {
  background-color: #f0f0f0;
  padding-bottom: 80px;
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px; /* Slightly larger border-radius */
  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 20px; /* Adjust padding */
  opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Ensure it expands fully */
  padding: 20px !important; /* Adjust padding */
  opacity: 1;
  background: #ffffff; /* White background for answer */
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px; /* Adjust padding */
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources__faq-item.active .page-resources__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d0d0d0;
  background-color: #f5f5f5;
}

.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: 18px; /* Slightly larger font size */
  font-weight: 600;
  line-height: 1.5;
  color: #1A2B4C; /* Brand primary color for question title */
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
  font-size: 28px; /* Larger toggle icon */
  font-weight: bold;
  line-height: 1;
  color: #FFD700; /* Auxiliary color for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px; /* Adjust margin */
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger toggle area */
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #1A2B4C; /* Primary color when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}

.page-resources__faq-answer p {
  font-size: 16px;
  line-height: 1.7;
  color: #333333;
  margin: 0;
}

/* --- Final CTA Section --- */
.page-resources__cta-final {
  background-color: #1A2B4C; /* Dark background */
  color: #ffffff; /* Light text */
  padding: 80px 0;
}

.page-resources__cta-final .page-resources__section-title {
  color: #FFD700;
}

.page-resources__cta-final .page-resources__section-description {
  color: #f0f0f0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources__section-title {
    font-size: 34px;
  }
  .page-resources__main-title {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  .page-resources__section {
    padding: 40px 0;
  }

  .page-resources__container {
    padding: 20px 15px; /* Adjust padding for mobile */
  }

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

  .page-resources__main-title {
    font-size: 32px;
  }

  .page-resources__intro-text {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-resources__section-title {
    font-size: 28px;
  }

  .page-resources__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-resources__cta-button {
    padding: 12px 25px;
    font-size: 16px;
    width: 100% !important; /* 🚨 Force full width on mobile */
    max-width: 100% !important;
    margin: 8px 0 !important; /* Stack buttons vertically */
  }

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

  .page-resources__grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
  }

  .page-resources__card {
    padding: 20px;
    min-height: auto; /* Allow height to adjust */
  }
  
  .page-resources__card-image {
    height: 180px; /* Adjust height for mobile cards */
  }

  .page-resources__card-title {
    font-size: 20px;
  }

  .page-resources__content-wrapper {
    flex-direction: column; /* Stack text and image vertically */
    gap: 30px;
  }
  
  .page-resources__text-content {
    order: 2; /* Text after image */
  }
  
  .page-resources__image-content {
    order: 1; /* Image before text */
  }

  .page-resources__news-grid {
    grid-template-columns: 1fr; /* Single column for news */
  }

  .page-resources__news-item {
    padding: 20px;
    min-height: auto;
  }

  .page-resources__news-title {
    font-size: 18px;
  }

  /* FAQ Mobile Styles */
  .page-resources__faq-question {
    padding: 15px 20px;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
  }
  
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }
  
  .page-resources__faq-answer {
    padding: 0 20px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }

  /* 🚨 Mobile image responsive adaptation */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__content-wrapper,
  .page-resources__news-grid,
  .page-resources__faq-list,
  .page-resources__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}