/* style/resources.css */

:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-btn-bg: #C30808;
  --login-btn-bg: #C30808;
  --register-login-text: #FFFF00;
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-light: #e0e0e0;
  --background-light: #f9f9f9;
}

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

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

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

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

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

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

.page-resources__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__dark-section .page-resources__section-title {
  color: var(--secondary-color);
}

.page-resources__dark-section .page-resources__section-description {
  color: var(--secondary-color);
}

/* --- 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%, #30A060 100%); /* Green gradient */
  color: var(--text-light);
}

.page-resources__hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

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

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

.page-resources__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-light);
}

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

.page-resources__hero-image {
  width: 100%;
  max-width: 800px; /* Adjust based on desired visual balance */
  margin-top: 30px;
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Card Grid --- */
.page-resources__card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__card {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  color: var(--text-dark);
}

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

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

.page-resources__card-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: 600;
}

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

.page-resources__card-title a:hover {
  color: #005f2c; /* Darker shade of primary color */
  text-decoration: underline;
}

.page-resources__card-text {
  font-size: 1em;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1; /* Allows text to take up available space */
}

/* --- Strategy List --- */
.page-resources__strategy-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
}

.page-resources__strategy-item {
  background-color: rgba(255, 255, 255, 0.1); /* Light background for dark section */
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
}

.page-resources__strategy-item:hover {
  transform: translateY(-5px);
}

.page-resources__strategy-heading {
  font-size: 1.3em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-resources__strategy-item p {
  color: var(--secondary-color);
  font-size: 1em;
}

/* --- Feature Grid (Security Section) --- */
.page-resources__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__feature-item {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: var(--text-dark);
}

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

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

.page-resources__feature-title {
  font-size: 1.4em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-resources__feature-item p {
  color: #666;
  font-size: 1em;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* --- FAQ Section --- */
.page-resources__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--secondary-color);
  border: 1px solid var(--border-light);
  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: var(--primary-color);
  background-color: var(--background-light);
}

.page-resources__faq-question:hover {
  background: var(--background-light);
  border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  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: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(180deg); /* Rotate for minus sign */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: var(--background-light);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  border-color: var(--primary-color);
}

.page-resources__faq-answer p {
  margin: 0;
  color: #444;
  font-size: 1em;
}

.page-resources__faq-answer .page-resources__btn-link {
  margin-top: 15px;
  display: inline-block;
}

/* --- News Section --- */
.page-resources__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-resources__news-item {
  background-color: var(--secondary-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text-dark);
}

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

.page-resources__news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-resources__news-title {
  font-size: 1.3em;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: 600;
  flex-grow: 1;
}

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

.page-resources__news-title a:hover {
  color: #005f2c;
  text-decoration: underline;
}

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

.page-resources__news-date {
  font-size: 0.85em;
  color: #999;
}

/* --- Buttons --- */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link,
.page-resources__btn-register,
.page-resources__btn-login {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.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: #005f2c;
  border-color: #005f2c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.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);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-link {
  background-color: transparent;
  color: var(--primary-color);
  border: none;
  padding: 0;
  text-decoration: underline;
  font-weight: normal;
  font-size: 0.95em;
}

.page-resources__btn-link:hover {
  color: #005f2c;
  text-decoration: none;
}

.page-resources__btn-register {
  background-color: var(--register-btn-bg); /* #C30808 */
  color: var(--register-login-text); /* #FFFF00 */
  border: 2px solid var(--register-btn-bg);
}

.page-resources__btn-register:hover {
  background-color: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-login {
  background-color: var(--login-btn-bg); /* #C30808 */
  color: var(--register-login-text); /* #FFFF00 */
  border: 2px solid var(--login-btn-bg);
}

.page-resources__btn-login:hover {
  background-color: #a00606;
  border-color: #a00606;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__btn-center {
  margin-top: 30px;
  display: block; /* Make it a block element to center with text-align */
  margin-left: auto;
  margin-right: auto;
  max-width: 250px; /* Constrain width for centering */
}

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

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

  .page-resources__hero-container {
    flex-direction: column;
    gap: 20px;
  }

  .page-resources__main-title {
    font-size: 2.2em;
    margin-bottom: 10px;
  }

  .page-resources__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-resources__cta-group {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px; /* Constrain buttons width on mobile */
    margin-left: auto;
    margin-right: auto;
  }

  .page-resources__hero-image {
    margin-top: 20px;
  }

  .page-resources__hero-image img {
    border-radius: 8px;
  }

  .page-resources__section {
    padding: 40px 0;
  }

  .page-resources__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-resources__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
    padding: 0 15px; /* Add padding to description on mobile */
  }

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

  .page-resources__card-grid,
  .page-resources__strategy-list,
  .page-resources__feature-grid,
  .page-resources__news-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .page-resources__card,
  .page-resources__strategy-item,
  .page-resources__feature-item,
  .page-resources__news-item {
    padding: 20px;
  }

  .page-resources__card-image,
  .page-resources__feature-image,
  .page-resources__news-image {
    height: 180px; /* Adjust height for mobile */
    min-width: 200px !important;
    min-height: 180px !important;
  }

  .page-resources__card-title,
  .page-resources__strategy-heading,
  .page-resources__feature-title,
  .page-resources__news-title {
    font-size: 1.2em;
  }

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

  .page-resources__faq-question h3 {
    font-size: 1em;
  }

  .page-resources__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

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

  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px 20px !important;
  }

  /* Mobile specific image and button responsiveness */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__feature-item,
  .page-resources__news-item,
  .page-resources__faq-list,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__cta-button,
  .page-resources__btn-primary,
  .page-resources__btn-secondary,
  .page-resources__btn-link,
  .page-resources__btn-register,
  .page-resources__btn-login,
  .page-resources a[class*="button"],
  .page-resources a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-resources__cta-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

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