/* style/resources.css */

/* Base styles for the page content */
.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 is handled by shared.css */
}

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

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  background-color: #017439; /* Brand color for hero background */
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden; /* Prevent image overflow */
}

.page-resources__hero-section .page-resources__container {
  padding-top: 60px;
  padding-bottom: 60px;
  z-index: 1;
}

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

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

.page-resources__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to 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;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button adapts to container */
}

.page-resources__btn-primary {
  background-color: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  border: 2px solid #C30808;
}

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

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

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

.page-resources__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Subtle background image */
  z-index: 0;
}

/* Content Sections */
.page-resources__content-section {
  padding: 80px 0;
  background-color: #1a1a2e; /* Dark background for content sections */
  color: #ffffff; /* Light text for dark background */
}

.page-resources__content-section:nth-of-type(even) {
  background-color: #0f0f1c; /* Slightly darker shade for alternating sections */
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px auto;
  color: #f0f0f0;
}

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

.page-resources__grid-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly visible card background */
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__grid-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Enforce minimum image height */
  min-width: 200px; /* Enforce minimum image width */
}

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

.page-resources__grid-text {
  font-size: 1em;
  color: #cccccc;
}

.page-resources__read-more-btn {
  margin-top: 40px;
  text-align: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Card Grid for Registration & Promotions */
.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);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

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

.page-resources__card-text {
  font-size: 1em;
  color: #cccccc;
  flex-grow: 1; /* Allow text to take up available space */
}

.page-resources__card-btn {
  margin-top: 20px;
  width: 100%; /* Make card buttons full width */
}

/* Info Grid for Support & Security */
.page-resources__info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__info-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__info-icon {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Enforce minimum image height */
  min-width: 200px; /* Enforce minimum image width */
}

.page-resources__info-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-resources__info-text {
  font-size: 0.95em;
  color: #cccccc;
}

.page-resources__cta-buttons--centered {
  margin-top: 60px;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 0;
  background-color: #0f0f1c; /* Slightly darker shade */
  color: #ffffff;
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 0 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);
  color: #ffffff; /* Ensure text is light */
}

.page-resources__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.12); /* Slightly darker for summary */
  color: #ffffff;
}

.page-resources__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-resources__faq-qtext {
  flex-grow: 1;
  margin-right: 15px;
}

.page-resources__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  width: 20px;
  text-align: center;
  color: #FFFF00; /* Use highlight color for toggle */
}

.page-resources__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #cccccc;
  line-height: 1.6;
}

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

.page-resources__faq-btn {
  margin-top: 10px;
  width: auto;
  padding: 10px 20px;
  font-size: 0.9em;
  border-radius: 5px;
}

/* Conclusion Section */
.page-resources__conclusion-section {
  background-color: #017439; /* Brand color for conclusion */
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

.page-resources__conclusion-section .page-resources__section-title {
  color: #ffffff;
}

.page-resources__conclusion-section .page-resources__section-description {
  color: #f0f0f0;
}

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

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

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

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

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

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

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

  .page-resources__content-section {
    padding: 60px 0;
  }

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

  .page-resources__section-description {
    font-size: 1em;
    margin-bottom: 40px;
  }

  .page-resources__container {
    padding: 0 15px; /* Add padding to container for mobile */
  }

  .page-resources__grid-item,
  .page-resources__card,
  .page-resources__info-item {
    padding: 20px;
  }

  .page-resources__grid-image,
  .page-resources__card-image,
  .page-resources__info-icon {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all images within page-resources are responsive */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Ensure all content sections and containers are responsive */
  .page-resources__content-section,
  .page-resources__card-grid,
  .page-resources__image-text-grid,
  .page-resources__info-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__faq-item summary {
    padding: 15px 20px;
    font-size: 1.05em;
  }

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

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 2em;
  }

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

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

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