/* style/resources.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register-bg: #C30808;
  --button-login-bg: #C30808;
  --button-font-color: #FFFF00;
}

.page-resources {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--secondary-color); /* Matches body background */
}

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

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

.page-resources__section-description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 500px;
  padding: 100px 20px;
  padding-top: var(--header-offset, 120px);
  overflow: hidden;
}

.page-resources__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
  z-index: 1;
}

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

.page-resources__hero-section .page-resources__container {
  position: relative;
  z-index: 2;
  color: var(--text-light);
}

.page-resources__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: var(--text-light);
  font-weight: bold;
}

.page-resources__hero-description {
  font-size: 1.3em;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.page-resources__btn-primary:hover {
  background-color: color-mix(in srgb, var(--primary-color) 80%, black);
  border-color: color-mix(in srgb, var(--primary-color) 80%, black);
}

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

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

.page-resources__btn-register {
  background-color: var(--button-register-bg);
  color: var(--button-font-color);
  border: 2px solid var(--button-register-bg);
}

.page-resources__btn-register:hover {
  background-color: color-mix(in srgb, var(--button-register-bg) 80%, black);
  border-color: color-mix(in srgb, var(--button-register-bg) 80%, black);
}

.page-resources__btn-login {
  background-color: var(--button-login-bg);
  color: var(--button-font-color);
  border: 2px solid var(--button-login-bg);
}

.page-resources__btn-login:hover {
  background-color: color-mix(in srgb, var(--button-login-bg) 80%, black);
  border-color: color-mix(in srgb, var(--button-login-bg) 80%, black);
}

/* Section Backgrounds */
.page-resources__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-resources__dark-bg .page-resources__section-description {
  color: var(--text-light);
}

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

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

/* Guide & Advantage Sections */
.page-resources__guides-section,
.page-resources__advantages-section,
.page-resources__safety-section {
  padding: 80px 20px;
}

.page-resources__guide-content,
.page-resources__advantage-content,
.page-resources__safety-content {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}

.page-resources__guide-content:nth-of-type(odd) {
  flex-direction: row-reverse; /* Swap image and text for odd sections */
}

.page-resources__guide-image,
.page-resources__advantage-image,
.page-resources__safety-image {
  flex: 1;
  min-width: 400px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__guide-text,
.page-resources__advantage-text,
.page-resources__safety-text {
  flex: 1;
}

.page-resources__guide-list,
.page-resources__advantage-list,
.page-resources__safety-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.page-resources__guide-list li,
.page-resources__advantage-list li,
.page-resources__safety-list li {
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%23017439"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>') no-repeat left center;
  background-size: 20px;
  padding-left: 30px;
  margin-bottom: 10px;
  color: inherit; /* Inherit color from parent section */
}

/* Video Section */
.page-resources__video-section {
  padding: 80px 20px;
  text-align: center;
}

.page-resources__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  cursor: pointer;
}

.page-resources__video-cta {
  margin-top: 30px;
}

/* Other Resources Cards */
.page-resources__other-resources {
  padding: 80px 20px;
}

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

.page-resources__card {
  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 25px;
  text-align: left;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

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

.page-resources__card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-resources__card-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-resources__card-text {
  font-size: 1em;
  color: var(--text-dark);
  flex-grow: 1;
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 20px;
}

.page-resources__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
}

.page-resources__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-light);
  background-color: var(--primary-color);
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background-color: color-mix(in srgb, var(--primary-color) 80%, black);
}

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

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

.page-resources__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: var(--text-light);
}

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

.page-resources__faq-answer p {
  margin: 0;
  padding-bottom: 10px;
  color: var(--text-light);
}

/* Final CTA Section */
.page-resources__final-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  overflow: hidden;
}

.page-resources__final-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay */
  z-index: 1;
}

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

.page-resources__final-cta .page-resources__container {
  position: relative;
  z-index: 2;
  color: var(--text-light);
}

.page-resources__final-cta .page-resources__section-title,
.page-resources__final-cta .page-resources__section-description {
  color: var(--text-light);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 3em;
  }
  .page-resources__hero-description {
    font-size: 1.2em;
  }
  .page-resources__guide-image,
  .page-resources__advantage-image,
  .page-resources__safety-image {
    min-width: 300px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__container {
    padding: 0 15px;
  }

  .page-resources__section-title {
    font-size: 2em;
    margin-bottom: 20px;
  }

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

  .page-resources__hero-section {
    padding: 80px 15px;
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
  }

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

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

  .page-resources__hero-buttons,
  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources__btn-register,
  .page-resources__btn-login {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__guide-content,
  .page-resources__advantage-content,
  .page-resources__safety-content {
    flex-direction: column;
    gap: 30px;
  }

  .page-resources__guide-image,
  .page-resources__advantage-image,
  .page-resources__safety-image {
    min-width: unset;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__video-section {
    padding: 60px 15px;
  }

  .page-resources__video-wrapper {
    padding-bottom: 56.25%; /* Ensure aspect ratio */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-resources__video {
    width: 100% !important;
    height: 100% !important;
  }
}