/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --register-btn-bg: #C30808;
    --login-btn-bg: #C30808;
    --btn-text-color: #FFFF00;
    --border-light: #e0e0e0;
}

.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--secondary-color);
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px);
    padding-bottom: 60px;
    background: var(--primary-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-resources__hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
    position: relative;
}

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

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-resources__hero-btn {
    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;
}

.page-resources__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    opacity: 0.1;
    overflow: hidden;
}

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-width: 200px;
    min-height: 200px;
}

/* Overview Section */
.page-resources__overview-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    text-align: center;
}

.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: bold;
}

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

.page-resources__video-wrapper {
    max-width: 800px;
    margin: 40px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    min-width: 200px;
    min-height: 200px;
}

/* Article Section */
.page-resources__article-section {
    padding: 80px 0;
    background-color: #f9f9f9;
    color: var(--text-dark);
}

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

.page-resources__card {
    background-color: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
}

.page-resources__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-resources__card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.page-resources__card-title a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #005f2e; /* Darker green on hover */
}

.page-resources__card-description {
    font-size: 0.95em;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.page-resources__bullet-list {
    list-style: disc inside;
    margin-bottom: 20px;
    padding-left: 0;
    color: var(--text-dark);
}

.page-resources__bullet-list li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-resources__faq-section .page-resources__section-title {
    color: var(--text-light);
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    color: var(--text-light);
}

.page-resources__faq-item[open] > .page-resources__faq-question {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-question::-webkit-details-marker {
    display: none;
}

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

.page-resources__faq-item[open] .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-light);
}

/* CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-resources__cta-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    margin-top: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
    min-width: 200px;
    min-height: 200px;
}

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

/* Button Styles */
.page-resources__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
}

.page-resources__btn-primary:hover {
    background-color: #005f2e; /* Darker green */
    transform: translateY(-2px);
}

.page-resources__btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

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

.page-resources__btn-register {
    background-color: var(--register-btn-bg);
    color: var(--btn-text-color);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
}

.page-resources__btn-register:hover {
    background-color: #a00606; /* Darker red */
    transform: translateY(-2px);
}

.page-resources__btn-login {
    background-color: var(--login-btn-bg);
    color: var(--btn-text-color);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
}

.page-resources__btn-login:hover {
    background-color: #a00606; /* Darker red */
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__card-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }

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

    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }

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

    .page-resources__hero-btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    .page-resources__overview-section,
    .page-resources__article-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 50px 0;
    }

    .page-resources__section-title {
        font-size: 1.8em;
    }

    .page-resources__section-description {
        font-size: 0.95em;
    }

    .page-resources__articles-grid {
        grid-template-columns: 1fr;
    }

    .page-resources__card {
        margin: 0 15px;
    }

    .page-resources__card-image {
        height: 180px;
        min-width: 200px !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources__video-wrapper {
        margin: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-bottom: 56.25% !important; /* Ensure aspect ratio */
        height: 0 !important;
    }

    .page-resources__video {
        min-width: 200px !important;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-resources__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

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

    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-register,
    .page-resources__btn-login,
    .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-buttons,
    .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__container,
    .page-resources__hero-content,
    .page-resources__section-description,
    .page-resources__faq-list,
    .page-resources__cta-image {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    .page-resources__cta-image {
        min-width: 200px !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Ensure all images within .page-resources are responsive and not smaller than 200px */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
}

/* Color Contrast Fixes (if needed, applied dynamically) */
.page-resources__dark-bg {
    background: var(--primary-color);
    color: var(--text-light);
}

.page-resources__light-bg {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.page-resources__card {
    background: var(--secondary-color);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

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

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

.page-resources__btn-register {
    background: var(--register-btn-bg);
    color: var(--btn-text-color);
}

.page-resources__btn-login {
    background: var(--login-btn-bg);
    color: var(--btn-text-color);
}