/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --accent-red: #C30808;
    --accent-yellow: #FFFF00;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
}

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

.page-resources__hero-section {
    position: relative;
    width: 100%;
    padding: 80px 20px;
    padding-top: calc(var(--header-offset, 120px) + 60px); /* Adjust for header and add some top padding */
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Ensure sufficient height */
}

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

.page-resources__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: bold;
}

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

.page-resources__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Ensure long words break */
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.page-resources__btn-primary {
    background-color: var(--accent-red);
    color: var(--accent-yellow);
    border: 2px solid var(--accent-red);
}

.page-resources__btn-primary:hover {
    background-color: #a00707;
    border-color: #a00707;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

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

.page-resources__section {
    padding: 60px 0;
    background-color: var(--bg-white);
}

.page-resources__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-resources__section-intro {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.page-resources__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.page-resources__content-wrapper--reverse {
    flex-direction: row-reverse;
}

.page-resources__text-block {
    flex: 1;
    min-width: 300px;
}

.page-resources__image-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-resources__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

.page-resources__list {
    list-style: disc inside;
    margin: 20px 0;
    padding-left: 20px;
}

.page-resources__list li {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.page-resources__btn-text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__btn-text-link:hover {
    color: #005a2e;
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: var(--bg-light);
}

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

.page-resources__faq-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-resources__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none; /* Remove default marker */
}

.page-resources__faq-item summary::-webkit-details-marker {
    display: none; /* Remove default marker for Webkit */
}

.page-resources__faq-qtext {
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    margin-left: 10px;
    width: 24px;
    text-align: center;
}

.page-resources__faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-dark);
    font-size: 1em;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-resources__faq-item[open] .page-resources__faq-answer {
    max-height: 500px; /* Sufficiently large to show content */
    padding-top: 10px;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
    content: '−';
}

.page-resources__section-outro {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1em;
}

.page-resources__section-outro a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
}

/* Promotions Section */
.page-resources__promotions-offers {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-resources__promotions-offers .page-resources__section-title,
.page-resources__promotions-offers .page-resources__section-intro {
    color: var(--text-light);
}

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

.page-resources__card {
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 20px;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding: 0 15px;
}

.page-resources__card-description {
    font-size: 1em;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding: 0 15px;
    flex-grow: 1;
}

.page-resources__card .page-resources__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
    margin: 0 auto; /* Center button */
}

.page-resources__card .page-resources__btn-primary:hover {
    background-color: #005a2e;
    border-color: #005a2e;
}

/* News Section */
.page-resources__news-updates {
    background-color: var(--bg-light);
}

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

.page-resources__news-item {
    background-color: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-resources__news-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__news-title {
    font-size: 1.3em;
    margin: 15px 15px 5px 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-resources__news-link {
    color: var(--primary-color);
    text-decoration: none;
}

.page-resources__news-link:hover {
    text-decoration: underline;
}

.page-resources__news-date {
    font-size: 0.9em;
    color: #777;
    margin: 0 15px 10px 15px;
}

.page-resources__news-excerpt {
    font-size: 0.95em;
    color: var(--text-dark);
    margin: 0 15px 15px 15px;
    flex-grow: 1;
}

.page-resources__cta-bottom {
    text-align: center;
    margin-top: 50px;
}

.page-resources__cta-final {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 80px 20px;
}

.page-resources__cta-final .page-resources__section-title,
.page-resources__cta-final .page-resources__section-intro {
    color: var(--text-light);
}

.page-resources__cta-final .page-resources__cta-buttons .page-resources__btn-secondary {
    border-color: var(--text-light);
    color: var(--text-light);
}

.page-resources__cta-final .page-resources__cta-buttons .page-resources__btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 992px) {
    .page-resources__hero-title {
        font-size: 2.4em;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__content-wrapper {
        flex-direction: column;
    }
    .page-resources__content-wrapper--reverse {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: calc(var(--header-offset, 120px) + 30px) !important; /* Mobile header offset */
        min-height: 400px;
    }
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.6em;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding: 12px 20px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__container {
        padding: 0 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-resources__image-wrapper,
    .page-resources__card-image,
    .page-resources__news-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-resources__content-wrapper,
    .page-resources__card,
    .page-resources__news-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 5px;
        padding-right: 5px;
    }
    .page-resources__faq-item summary {
        font-size: 1em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 0 15px 15px 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__section-title {
        font-size: 1.4em;
    }
    .page-resources__hero-description {
        font-size: 0.95em;
    }
    .page-resources__list {
        padding-left: 15px;
    }
}