/* style/resources.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-color: #C30808;
  --login-btn-color: #C30808;
  --register-login-font-color: #FFFF00;
  --text-color-dark: #333333;
  --text-color-light: #FFFFFF;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Body background is light, so use dark text */
  background-color: var(--secondary-color);
}

.page-resources__hero-section {
  position: relative;
  width: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: var(--text-color-light);
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  box-sizing: border-box;
}

.page-resources__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.page-resources__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: var(--text-color-light);
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-color-light);
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary {
  background-color: var(--register-btn-color);
  color: var(--register-login-font-color);
  border: 2px solid var(--register-btn-color);
}

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

.page-resources__btn-secondary {
  background-color: transparent;
  color: var(--text-color-light);
  border: 2px solid var(--text-color-light);
}

.page-resources__btn-secondary:hover {
  background-color: var(--text-color-light);
  color: var(--primary-color);
}

.page-resources__section {
  padding: 60px 20px;
}

.page-resources__section--light-bg {
  background-color: var(--secondary-color);
  color: var(--text-color-dark);
}

.page-resources__section--dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

.page-resources__section-title {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-resources__section-title--white {
  color: var(--text-color-light);
}

.page-resources__section-intro {
  font-size: 1.1em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-color-dark);
}

.page-resources__section-intro--white {
  color: var(--text-color-light);
}

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

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

.page-resources__card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
  display: flex;
  flex-direction: column;
}

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

.page-resources__card--dark {
  background-color: var(--card-bg-dark);
  color: var(--text-color-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__card--dark .page-resources__card-title a {
  color: var(--text-color-light);
}

.page-resources__card--dark .page-resources__card-link {
  color: var(--register-login-font-color);
}

.page-resources__card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__card-title {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 15px;
}

.page-resources__card-title a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
  color: var(--register-btn-color);
}

.page-resources__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__card-link {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-resources__card-link:hover {
  color: var(--register-btn-color);
  border-color: var(--register-btn-color);
}

.page-resources__content-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

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

.page-resources__text-block p {
  margin-bottom: 20px;
}

.page-resources__image-block {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.page-resources__image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

.page-resources__faq-list {
  margin-top: 40px;
}

.page-resources__faq-item {
  background-color: var(--card-bg-dark);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-color-light);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__faq-item[open] .page-resources__faq-question {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question::-webkit-details-marker {
  display: none;
}

.page-resources__faq-question::marker {
  display: none;
}

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

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

.page-resources__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  color: var(--text-color-light);
}

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

.page-resources__faq-link {
  color: var(--register-login-font-color);
  text-decoration: underline;
  font-weight: bold;
}

.page-resources__faq-link:hover {
  color: #ffcc00;
}

.page-resources__cta-section {
  text-align: center;
  padding: 60px 20px;
}

.page-resources__cta-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-resources__cta-text {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: var(--text-color-dark);
}

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

/* Floating CTA buttons */
.page-resources__floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.page-resources__floating-btn {
  display: block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: normal;
  word-wrap: break-word;
  max-width: 150px; /* Limit width for floating buttons */
}

.page-resources__floating-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__floating-btn--register {
  background-color: var(--register-btn-color);
  color: var(--register-login-font-color);
}

.page-resources__floating-btn--login {
  background-color: var(--login-btn-color);
  color: var(--register-login-font-color);
}

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

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-resources__hero-section {
    min-height: 450px;
    padding: 80px 15px 40px 15px; /* Adjust padding for mobile header */
  }
  .page-resources__hero-title {
    font-size: 2em;
  }
  .page-resources__hero-description {
    font-size: 1em;
  }
  .page-resources__hero-buttons,
  .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__section {
    padding: 40px 0;
  }
  .page-resources__section-title {
    font-size: 1.8em;
  }
  .page-resources__section-intro {
    font-size: 1em;
  }
  .page-resources__grid {
    grid-template-columns: 1fr;
  }
  .page-resources__card {
    margin: 0 15px;
  }
  .page-resources__content-wrapper {
    flex-direction: column;
  }
  .page-resources__text-block,
  .page-resources__image-block {
    min-width: unset;
    width: 100%;
    padding: 0 15px;
  }
  .page-resources__image {
    width: 100%;
  }
  .page-resources__faq-item {
    margin: 0 15px 15px 15px;
  }
  .page-resources__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-resources__faq-answer {
    padding: 15px 20px;
  }
  .page-resources__cta-section {
    padding: 40px 15px;
  }
  .page-resources__cta-title {
    font-size: 2em;
  }
  .page-resources__cta-text {
    font-size: 1em;
  }
  .page-resources__floating-cta {
    bottom: 15px;
    right: 15px;
    flex-direction: row; /* Horizontal for small screens to save vertical space */
    gap: 8px;
  }
  .page-resources__floating-btn {
    padding: 10px 18px;
    font-size: 0.9em;
    max-width: 120px; /* Adjust max-width for smaller buttons */
  }

  /* Ensure all images are responsive */
  .page-resources img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__hero-section,
  .page-resources__cta-section,
  .page-resources__content-wrapper,
  .page-resources__text-block,
  .page-resources__image-block,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; 
  }
  /* Specific adjustments for elements that might have padding already */
  .page-resources__section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__card {
    padding-left: 0;
    padding-right: 0;
  }
  .page-resources__faq-item {
    padding-left: 0;
    padding-right: 0;
  }

  /* Button group specific for mobile */
  .page-resources__cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-resources__hero-title {
    font-size: 1.8em;
  }
  .page-resources__section-title {
    font-size: 1.6em;
  }
  .page-resources__floating-cta {
    flex-direction: column; /* Stack vertically if horizontal is too cramped */
    gap: 5px;
    right: 10px;
    bottom: 10px;
  }
  .page-resources__floating-btn {
    max-width: 100px;
    font-size: 0.85em;
    padding: 8px 15px;
  }
}