/* style/resources.css */

/* Custom CSS Variables for this page */
:root {
  --primary-color: #017439; /* M88 Green */
  --secondary-color: #FFFFFF; /* White */
  --text-dark: #333333;
  --text-light: #ffffff;
  --button-register-login: #C30808;
  --button-register-login-font: #FFFF00;
  --border-color: #e0e0e0;
}

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

/* 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); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #00994d 100%); /* Green gradient */
  color: var(--text-light);
}

.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;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

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

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

.page-resources__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-register-login); /* Red for CTA */
  color: var(--button-register-login-font); /* Yellow for font */
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__cta-button:hover {
  background: #a30606; /* Darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--large {
  padding: 18px 50px;
  font-size: 20px;
}

/* General Section Styles */
.page-resources__section {
  padding: 60px 20px;
}

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

.page-resources__section--analysis {
  background-color: var(--primary-color); /* Dark section */
  color: var(--text-light);
}

.page-resources__section--strategy {
  background-color: #f5f5f5; /* Light grey background */
  color: var(--text-dark);
}

.page-resources__section--tools {
  background-color: var(--primary-color); /* Dark section */
  color: var(--text-light);
}

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

.page-resources__section--conclusion {
  background-color: var(--primary-color); /* Dark section */
  color: var(--text-light);
}

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

.page-resources__container--center {
  text-align: center;
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherits from section, so white for dark sections, dark for light sections */
}

.page-resources__sub-title {
  font-size: 28px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 20px;
  color: inherit;
}

.page-resources__text-block {
  margin-bottom: 20px;
  font-size: 17px;
}

.page-resources__text-block--center {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources__keyword {
  font-weight: bold;
  color: var(--primary-color); /* Highlight keywords with primary color */
}
.page-resources__section--analysis .page-resources__keyword,
.page-resources__section--tools .page-resources__keyword,
.page-resources__section--conclusion .page-resources__keyword {
  color: var(--button-register-login-font); /* Yellow for keywords in dark sections */
}

/* Grid Layouts */
.page-resources__grid-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.page-resources__grid-two-columns--reversed {
  grid-template-columns: 1fr 1fr;
}

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

.page-resources__content-block {
  padding: 20px 0;
}

.page-resources__content-block--full {
  grid-column: 1 / -1;
  padding: 20px 0;
}

.page-resources__image-wrapper {
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
}

/* List Styles */
.page-resources__list {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  padding-left: 0;
}

.page-resources__list-item {
  margin-bottom: 10px;
  font-size: 17px;
}

/* Card Styles */
.page-resources__card {
  background: var(--secondary-color);
  color: var(--text-dark);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-resources__section--tools .page-resources__card {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.page-resources__section--tools .page-resources__card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-resources__card-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: inherit;
}

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

/* Secondary Button (for cards) */
.page-resources__btn-secondary {
  display: inline-block;
  padding: 10px 25px;
  background: none;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}
.page-resources__section--tools .page-resources__btn-secondary {
  color: var(--button-register-login-font); /* Yellow for font */
  border-color: var(--button-register-login-font); /* Yellow border */
}

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

/* Primary Button */
.page-resources__btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--button-register-login);
  color: var(--button-register-login-font);
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Links within text */
.page-resources a:not([class*="btn"]):not([class*="button"]) {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}
.page-resources a:not([class*="btn"]):not([class*="button"]):hover {
  color: #005f2f; /* Darker green on hover */
}

/* FAQ Section */
.page-resources__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.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; /* Ensure enough height for content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-dark);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-dark);
}

.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;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: inherit;
}

.page-resources__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  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: #333;
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* Responsive Design */
@media (max-width: 992px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__hero-description {
    font-size: 18px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__sub-title {
    font-size: 24px;
  }
  .page-resources__grid-two-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .page-resources__grid-two-columns--reversed {
    grid-template-columns: 1fr;
  }
  .page-resources__grid-two-columns--reversed .page-resources__image-wrapper {
    order: -1; /* Image first on mobile for reversed grid */
  }
  .page-resources__grid-three-columns {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  /* Mobile general */
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-resources__container {
    padding: 0 15px !important; /* Ensure padding on mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hero Section Mobile */
  .page-resources__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Override desktop padding-top */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-resources__hero-title {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .page-resources__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }
  .page-resources__cta-button {
    padding: 12px 30px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-resources__cta-button--large {
    padding: 15px 40px;
    font-size: 18px;
  }

  /* Sections Mobile */
  .page-resources__section {
    padding: 40px 15px;
  }
  .page-resources__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-resources__sub-title {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 15px;
  }
  .page-resources__text-block {
    font-size: 16px;
  }

  /* Images Mobile */
  .page-resources__image-wrapper img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Ensure min size */
    min-height: 200px !important; /* Ensure min size */
  }
  .page-resources__image-wrapper {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  /* Cards Mobile */
  .page-resources__grid-three-columns {
    grid-template-columns: 1fr;
  }
  .page-resources__card {
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  .page-resources__card-title {
    font-size: 20px;
  }
  .page-resources__card-description {
    font-size: 15px;
  }
  .page-resources__btn-secondary {
    padding: 10px 20px;
    font-size: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-resources__btn-primary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* FAQ Mobile */
  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  .page-resources__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px); /* Adjust for toggle icon */
  }
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }
}

/* Ensure content area images are not too small */
.page-resources img:not(.page-resources__hero-image img) {
  min-width: 200px;
  min-height: 200px;
}
.page-resources a[href="promotions.html"] {
  color: var(--button-register-login);
  font-weight: bold;
}