/* style/resources.css */

/* General page styling */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default for light background */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

/* Section styling */
.page-resources__hero-intro-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #e0ffe0, #ffffff); /* Lighter gradient for intro */
    color: #333333;
}

.page-resources__content-section,
.page-resources__benefits-section,
.page-resources__faq-section,
.page-resources__conclusion-section {
    padding: 60px 0;
}

.page-resources__dark-bg {
    background-color: #017439; /* Primary brand color */
    color: #ffffff; /* White text for dark background */
}

.page-resources__light-bg {
    background-color: #ffffff; /* White background */
    color: #333333; /* Dark text for light background */
}

.page-resources__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #017439; /* Brand color for main title */
    line-height: 1.2;
}

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

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section (dark/light bg) */
}

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

/* Call to Action Buttons */
.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #017439; /* Primary brand color for text */
    border: 2px solid #017439;
}

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

.page-resources__btn-large {
    padding: 18px 45px;
    font-size: 1.2em;
}

/* Image styling */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin: 20px auto; /* Center images */
}

.page-resources__hero-image {
    max-width: 80%;
    margin-top: 40px;
}

.page-resources__feature-image,
.page-resources__community-image {
    max-width: 100%;
    margin-bottom: 20px;
}

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

.page-resources__feature-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-resources__feature-title {
    font-size: 1.5em;
    color: #017439;
    margin-bottom: 15px;
}

.page-resources__feature-item p {
    color: #555555;
    margin-bottom: 20px;
    text-align: left;
}

.page-resources__text-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push link to bottom */
}

.page-resources__text-link:hover {
    color: #005a2d;
    text-decoration: underline;
}

/* Benefits Grid */
.page-resources__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.page-resources__benefit-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
}

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

/* FAQ Section - as per strict requirements */
.page-resources__faq-section {
    background-color: #f8f8f8;
}

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

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

/* FAQ default state - answer 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;
}

/* FAQ expanded state - 🚨 Use!important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Use!important ensure priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click events */
  color: #333333;
}

/* Toggle icon */
.page-resources__faq-toggle {
  font-size: 24px;
  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 events */
  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' or '-' effect */
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-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__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-resources__intro-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-resources__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-resources__hero-intro-section,
    .page-resources__content-section,
    .page-resources__benefits-section,
    .page-resources__cta-section,
    .page-resources__faq-section,
    .page-resources__conclusion-section {
        padding: 40px 0;
    }

    .page-resources__container {
        padding: 0 15px; /* Add padding to prevent overflow */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Images responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-resources__hero-image {
        max-width: 95%; /* Adjust for mobile */
    }

    /* Buttons responsiveness */
    .page-resources__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px; /* Add padding to container */
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .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; /* Ensure text doesn't touch edges */
        padding-right: 15px;
    }

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