/* style/resources.css */
.page-resources {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Explicitly set body background color for context */
}

/* 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, #017439, #005f2e); /* Gradient background with primary color */
    color: #ffffff;
    overflow: hidden; /* Prevent content overflow */
}

.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%;
    box-sizing: border-box;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    z-index: 1;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    filter: none; /* No CSS filter allowed */
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px; /* Constrain text width */
    margin-top: -150px; /* Overlay text slightly on image */
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background for text readability */
    border-radius: 8px;
    box-sizing: border-box;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #FFFF00; /* Custom color for title */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* Enhance readability */
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom color for CTA button */
    color: #FFFF00; /* Custom font color for CTA button */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* Button responsive */
    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 4px 12px rgba(0, 0, 0, 0.2);
}

/* General Section Styling */
.page-resources__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
    width: 100%;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-title--white {
    color: #ffffff;
}

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

.page-resources__section-description--white {
    color: #f0f0f0;
}

.page-resources__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-resources__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

/* Intro Section */
.page-resources__intro-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* Resource Categories Grid */
.page-resources__resource-categories {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-resources__card {
    background: #ffffff;
    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;
    overflow: hidden; /* Ensure card content is within bounds */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    filter: none; /* No CSS filter allowed */
    max-width: 100%; /* Ensure image is responsive within card */
    display: block;
}

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

.page-resources__card-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #005f2e;
}

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

.page-resources__card-link {
    display: inline-block;
    padding: 10px 25px;
    background: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__card-link:hover {
    background: #005f2e;
    transform: translateY(-1px);
}

/* Value Proposition Section */
.page-resources__value-proposition {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0 15px; /* Add padding to prevent overflow */
}

.page-resources__btn-primary {
    background: #C30808;
    color: #FFFF00;
    border: none;
}

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

.page-resources__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background: #f0f0f0;
    color: #005f2e;
    border-color: #005f2e;
}

/* FAQ Section */
.page-resources__faq-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    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: #017439;
}

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

.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 event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #017439;
    transform: rotate(45deg); /* Rotate for 'x' effect, or just change text to '-' */
}

.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 20px;
    opacity: 0;
    background: #f9f9f9;
    color: #555555;
    font-size: 1em;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.page-resources__faq-answer p {
    margin: 0;
    padding: 0;
}

.page-resources__faq-answer a {
    color: #017439;
    text-decoration: underline;
}

.page-resources__faq-answer a:hover {
    color: #005f2e;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

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

    /* Hero Section */
    .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-content {
        margin-top: -100px; /* Adjust overlay for mobile */
        padding: 15px;
    }
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .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;
        margin-left: auto;
        margin-right: auto;
        display: block; /* Ensure it takes full width */
    }

    /* General Sections */
    .page-resources__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-resources__section-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* Cards Grid */
    .page-resources__cards-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .page-resources__card {
        padding: 20px;
    }
    .page-resources__card-image {
        height: 180px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important; /* Ensure image scales correctly */
        filter: none; /* No CSS filter allowed */
    }
    .page-resources__card-title {
        font-size: 1.3em;
    }
    .page-resources__card-link {
        padding: 10px 20px;
        font-size: 0.95em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* CTA Buttons */
    .page-resources__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-resources__cta-buttons .page-resources__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Section */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
        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;
    }

    /* Ensure all images in content area are responsive */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        filter: none; /* No CSS filter allowed */
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}