/* style/resources.css */

/* Base styles for the page-resources scope */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #121212);
}

/* Ensure main content has padding-top for fixed header */
.page-resources {
    padding-top: var(--header-offset, 120px);
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    background-color: #017439; /* Brand primary color as dark background */
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Slightly dim the image for text readability */
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
    border-radius: 10px;
}

.page-resources__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFF00; /* Yellow for prominence */
    line-height: 1.2;
}

.page-resources__intro-text {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #ffffff;
}

.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;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

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

/* General Section Styling */
.page-resources__section {
    padding: 80px 0;
}

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

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

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

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: inherit;
}

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

/* Card Styling */
.page-resources__card {
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333;
}

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

.page-resources__card--dark {
    background-color: #005f2c; /* Darker shade of brand color */
    color: #ffffff;
}

.page-resources__card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 20px;
}

.page-resources__card-title {
    font-size: 1.5em;
    margin: 0 20px 15px 20px;
    color: inherit;
}

.page-resources__card-text {
    font-size: 1em;
    margin: 0 20px 20px 20px;
    flex-grow: 1;
    color: inherit;
}

.page-resources__card-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #017439;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Push link to bottom */
}

.page-resources__card--dark .page-resources__card-link {
    background-color: #C30808;
    color: #FFFF00;
}

.page-resources__card-link:hover {
    background-color: #004d26;
}

.page-resources__card--dark .page-resources__card-link:hover {
    background-color: #E00A0A;
}

/* FAQ Section */
.page-resources__faq-list {
    max-width: 900px;
    margin: 50px auto 0 auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f0f0f0;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: #e5e5e5;
}

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

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

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

.page-resources__faq-answer p {
    margin: 0;
    color: #333333;
}

/* CTA Section */
.page-resources__cta-section {
    background-color: #f5f5f5;
    padding: 60px 0;
    text-align: center;
    color: #333333;
}

.page-resources__cta-content {
    max-width: 800px;
}

.page-resources__cta-title {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #017439;
}

.page-resources__cta-description {
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 3em;
    }
    .page-resources__intro-text {
        font-size: 1.2em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__main-title {
        font-size: 2.2em;
    }
    .page-resources__intro-text {
        font-size: 1em;
    }
    .page-resources__hero-content {
        padding: 20px 15px;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
        width: 100%;
    }
    .page-resources__section {
        padding: 50px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-resources__grid-container {
        grid-template-columns: 1fr;
    }
    .page-resources__container {
        padding: 0 15px;
    }
    .page-resources__card {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__cta-title {
        font-size: 1.8em;
    }
    .page-resources__cta-description {
        font-size: 1em;
    }

    /* Mobile image adaptation */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__hero-content,
    .page-resources__cta-section,
    .page-resources__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Ensure no horizontal scroll */
    }

    /* Mobile button adaptation */
    .page-resources__cta-button,
    .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 !important;
        padding-right: 15px !important;
    }
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    .page-resources__cta-buttons {
        flex-direction: column !important;
    }
}

@media (max-width: 480px) {
    .page-resources__main-title {
        font-size: 1.8em;
    }
    .page-resources__intro-text {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
}