/* style/resources.css */

/* --- General Styles --- */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #FFFFFF; /* Ensure content background is white */
}

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

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

.page-resources__section-title {
    font-size: 36px;
    color: #017439; /* Primary brand color for titles */
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.page-resources__section-title--light {
    color: #ffffff; /* White text for dark backgrounds */
}

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

.page-resources__section-description--light {
    color: #f0f0f0; /* Light grey text for dark backgrounds */
}

/* --- Color Contrast Classes --- */
.page-resources__light-bg {
    background: #ffffff;
    color: #333333;
}

.page-resources__dark-bg {
    background: #017439; /* Primary color as dark background */
    color: #ffffff;
}

/* --- Introduction Section --- */
.page-resources__intro-section {
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    padding-bottom: 60px;
    text-align: center;
}

.page-resources__main-title {
    font-size: 48px;
    color: #017439;
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.2;
}

.page-resources__description {
    font-size: 20px;
    color: #555555;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.page-resources__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons fit in container */
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-primary {
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

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

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

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

/* --- Articles Section --- */
.page-resources__articles-section {
    padding-bottom: 60px;
}

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

.page-resources__article-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-resources__article-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-resources__article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* No filter allowed */
}

.page-resources__article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-resources__article-title {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.3;
}

.page-resources__article-title a {
    color: #017439; /* Primary color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.page-resources__article-summary {
    font-size: 16px;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__read-more-link {
    display: inline-flex;
    align-items: center;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__read-more-link:hover {
    color: #005f2e;
}

.page-resources__arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.page-resources__read-more-link:hover .page-resources__arrow {
    transform: translateX(5px);
}

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

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

.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: 20px 25px;
    background: #ffffff;
    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-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

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

.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Primary color for toggle icon */
    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: #C30808; /* Highlight color when active */
}

.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 25px;
    opacity: 0;
    background: #fcfcfc;
    color: #555555;
}

.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-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

/* --- Call to Action Section --- */
.page-resources__cta-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 40px;
    }

    .page-resources__section-title {
        font-size: 30px;
    }

    .page-resources__description,
    .page-resources__section-description {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .page-resources__container {
        padding: 30px 15px;
    }

    .page-resources__intro-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile fixed header spacing */
        padding-bottom: 40px;
    }

    .page-resources__main-title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .page-resources__description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-resources__cta-group {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-resources__btn-large {
        padding: 15px 30px;
        font-size: 18px;
    }

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

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

    .page-resources__card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__article-image-wrapper {
        height: 180px;
    }

    .page-resources__article-title {
        font-size: 20px;
    }

    .page-resources__article-summary {
        font-size: 15px;
    }

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

    .page-resources__faq-question h3 {
        font-size: 16px;
    }

    .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;
    }

    .page-resources__faq-answer p {
        font-size: 15px;
    }

    /* Mobile image adaptation */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__intro-section,
    .page-resources__articles-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}