/* style/resources.css */

/* Base Styles */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #0a0a0a; /* Ensure consistency with body background if shared.css doesn't set it directly */
}

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

.page-resources__section {
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.page-resources__section-title {
    font-size: 2.5em;
    color: #017439; /* Brand green for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-resources__section-title--light {
    color: #ffffff; /* White for titles on dark sections */
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 30px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0; /* Slightly off-white for body text on dark background */
}

.page-resources__text-block--light {
    color: #ffffff;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
}

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

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

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

.page-resources__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
}

/* Specific button colors */
.page-resources__btn-register {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}
.page-resources__btn-register:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-resources__btn-login {
    background-color: #C30808;
    color: #FFFF00;
    border-color: #C30808;
}
.page-resources__btn-login:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-resources__btn-secondary--light {
    color: #ffffff;
    border-color: #ffffff;
}
.page-resources__btn-secondary--light:hover {
    background-color: #ffffff;
    color: #017439;
}

.page-resources__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-resources__cta-group--inline {
    margin-top: 20px;
}

.page-resources__inline-btn {
    margin-top: 20px;
    display: table; /* To center it */
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    color: #ffffff;
    text-align: center;
    padding: 120px 0 80px; /* Default padding for desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; /* Ensure it takes up significant viewport height */
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark overlay for text readability */
    z-index: 0;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

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

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

/* Category Grid */
.page-resources__category-block {
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.page-resources__category-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.page-resources__category-title {
    font-size: 2em;
    color: #017439;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

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

.page-resources__card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards on dark background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    color: #f0f0f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-resources__card-title {
    font-size: 1.5em;
    margin: 15px 15px 10px;
    color: #017439;
    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;
    text-decoration: underline;
}

.page-resources__card-description {
    font-size: 0.95em;
    padding: 0 15px 15px;
    flex-grow: 1;
}

.page-resources__card-link {
    display: block;
    padding: 10px 15px;
    background-color: #017439;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.page-resources__card-link:hover {
    background-color: #005f2e;
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: #017439; /* Brand green background for FAQ */
    color: #ffffff;
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on green background */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

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

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

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficient height to show content */
    padding: 15px 20px !important; /* Expanded padding */
}

/* Final CTA Section */
.page-resources__cta-final-section {
    background-color: #0a0a0a; /* Dark background */
    padding-bottom: 80px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__hero-description {
        font-size: 1.1em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__card-title {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 80px 0 50px;
        min-height: 50vh;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__text-block {
        font-size: 1em;
    }
    .page-resources__cta-group {
        flex-direction: column;
        gap: 15px;
    }
    .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;
        padding-right: 15px;
    }
    .page-resources__cta-group,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-resources__cta-group--inline {
        flex-direction: column;
    }

    /* Images responsiveness */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__category-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__image-content {
        margin-left: 0;
        margin-right: 0;
    }
    .page-resources__card-image {
        height: 180px;
    }
    .page-resources__grid-3-columns {
        grid-template-columns: 1fr;
    }
    .page-resources__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 10px 15px !important;
    }
    .page-resources__faq-answer p {
        padding-bottom: 10px;
    }
}