/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: transparent; /* Body background from shared.css */
}

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

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

.page-resources__section--guides,
.page-resources__section--types,
.page-resources__section--faq,
.page-resources__section--cta {
    background-color: #1a1a2e; /* Match body background for consistency */
}

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

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #ffffff;
    background-color: #1a1a2e;
}

.page-resources__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.3; /* Subtle background image */
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
}

.page-resources__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-resources__intro-text {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Titles */
.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #ffffff; /* Default for dark sections */
}

.page-resources__section--guides .page-resources__section-title,
.page-resources__section--types .page-resources__section-title,
.page-resources__section--faq .page-resources__section-title,
.page-resources__section--cta .page-resources__section-title {
    color: #ffffff; /* Ensure titles are white on dark body background */
}

.page-resources__section--strategies .page-resources__section-title {
    color: #ffffff; /* White text on brand color background */
}

.page-resources__section-intro {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

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

/* Cards */
.page-resources__card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff; /* Light text for card content */
}

.page-resources__card--light {
    background-color: #ffffff;
    color: #333333;
}

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

.page-resources__card--light .page-resources__card-title {
    color: #017439; /* Brand color for titles on light cards */
}

.page-resources__card-title a {
    color: inherit; /* Inherit color from parent */
    text-decoration: none;
}

.page-resources__card-title a:hover {
    text-decoration: underline;
}

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

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

/* List styles */
.page-resources__list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-resources__list-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    color: #ffffff;
}

.page-resources__list-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #ffffff;
}

.page-resources__list-description {
    font-size: 1em;
    color: #f0f0f0;
}

/* Content Images */
.page-resources__image-content {
    max-width: 800px;
    height: auto;
    border-radius: 10px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-resources__btn-primary {
    background-color: #017439; /* Main brand color */
    color: #ffffff; /* White text for contrast */
    border: 2px solid #017439;
}

.page-resources__btn-primary:hover {
    background-color: #005f2e; /* Darker green on hover */
    border-color: #005f2e;
}

.page-resources__btn-secondary {
    background-color: #ffffff;
    color: #017439; /* Brand color text on white */
    border: 2px solid #017439;
}

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

.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.page-resources__faq-title {
    font-size: 1.2em;
    margin: 0;
    color: #ffffff;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439; /* Brand color for toggle icon */
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' or '-' effect */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px; /* Initial padding for collapsed state */
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #f0f0f0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large for content */
    padding: 20px;
}

/* CTA Section */
.page-resources__cta-content {
    background-color: #017439;
    padding: 60px 20px;
    border-radius: 15px;
    color: #ffffff;
    margin-top: 60px;
}

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

.page-resources__cta-content .page-resources__section-intro {
    color: #f0f0f0;
}

/* 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__hero-section .page-resources__container {
        padding: 60px 15px;
    }

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

    .page-resources__intro-text {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

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

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

    .page-resources__section-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }

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

    .page-resources__card {
        padding: 20px;
    }

    .page-resources__card-title {
        font-size: 1.3em;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
        width: 100% !important; /* Mobile button full width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-bottom: 10px; /* Space between stacked buttons */
    }

    .page-resources__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        padding: 0 15px; /* Add padding to container */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-resources__list-item {
        padding: 15px;
    }

    .page-resources__faq-question {
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px;
    }

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

    .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;
    }
    /* Specific overrides for sections that might not have direct padding */
    .page-resources__section--guides .page-resources__container,
    .page-resources__section--strategies .page-resources__container,
    .page-resources__section--types .page-resources__container,
    .page-resources__section--news .page-resources__container,
    .page-resources__section--faq .page-resources__container,
    .page-resources__section--cta .page-resources__cta-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }
}