/* style/resources.css */

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

.page-resources {
    font-family: 'Arial', sans-serif;
    color: var(--light-bg-text); /* Default text color for light backgrounds */
    background-color: var(--secondary-color); /* Default background, will be overridden by shared.css body background */
}

/* Ensure the main content pushes down below the fixed header */
.page-resources__hero-section,
.page-resources__video-section {
    padding-top: var(--header-offset, 120px);
}

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

.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 500px;
    color: var(--dark-bg-text);
    overflow: hidden;
    background-color: var(--primary-color); /* Fallback, should be handled by .page-resources__dark-bg */
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--dark-bg-text);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--dark-bg-text);
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-resources__content-section {
    padding: 60px 0;
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-resources__sub-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    line-height: 1.4;
}

.page-resources__section-text {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.page-resources__section-text a:hover {
    color: #004d27; /* Darker shade of primary */
}

.page-resources__image-text-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.page-resources__image-text-grid--reverse {
    flex-direction: row-reverse;
}

.page-resources__image-wrapper {
    flex: 1;
    min-width: 300px;
}

.page-resources__content-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__text-block {
    flex: 1;
}

.page-resources__list,
.page-resources__ordered-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.page-resources__list-item,
.page-resources__ordered-list .page-resources__list-item {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.page-resources__list-item::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

.page-resources__ordered-list .page-resources__list-item::before {
    content: counter(list-item) '.';
    counter-increment: list-item;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

.page-resources__sub-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.page-resources__sub-list .page-resources__list-item {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 5px;
    padding-left: 0;
}

.page-resources__sub-list .page-resources__list-item::before {
    content: none;
}

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

.page-resources__step-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__step-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--dark-bg-text);
}

.page-resources__step-description {
    font-size: 1em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.page-resources__step-description a {
    color: var(--secondary-color);
    text-decoration: underline;
}

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

.page-resources__news-card {
    background-color: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--light-bg-text);
}

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

.page-resources__news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.page-resources__news-card .page-resources__news-title,
.page-resources__news-card .page-resources__news-description,
.page-resources__news-card .page-resources__read-more {
    padding: 0 25px;
}

.page-resources__news-title {
    font-size: 1.4em;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

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

.page-resources__news-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.page-resources__read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 20px;
    padding-left: 25px;
}

.page-resources__read-more:hover {
    text-decoration: underline;
}

.page-resources__cta-section {
    background-color: var(--secondary-color);
    padding: 80px 0;
    text-align: center;
    color: var(--light-bg-text);
}

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

.page-resources__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--primary-color);
}

.page-resources__cta-description {
    font-size: 1.2em;
    line-height: 1.7;
    margin-bottom: 40px;
    color: #555;
}

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

.page-resources__cta-buttons--center {
    margin-top: 30px;
    margin-bottom: 30px;
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.page-resources__btn-primary {
    background-color: var(--register-color); /* Custom color for register/login buttons */
    color: var(--font-color-register-login); /* Custom font color */
    border: 2px solid var(--register-color);
}

.page-resources__btn-primary:hover {
    background-color: #a00606; /* Darker shade */
    border-color: #a00606;
}

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

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

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

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: var(--dark-bg-text);
    transition: background-color 0.3s ease;
}

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

.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(0deg); /* '+' becomes '-' */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    font-size: 1.05em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

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

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

.page-resources__faq-answer a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-resources__faq-answer a:hover {
    color: #e0e0e0;
}

/* Color Contrast Specifics */
.page-resources__dark-bg {
    background-color: var(--primary-color);
    color: var(--dark-bg-text);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__cta-title {
        font-size: 2.2em;
    }
    .page-resources__image-text-grid {
        flex-direction: column;
    }
    .page-resources__image-text-grid--reverse {
        flex-direction: column;
    }
}

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

    .page-resources__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-resources__hero-title {
        font-size: 2.5em;
    }

    .page-resources__hero-description {
        font-size: 1em;
    }

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

    .page-resources__sub-title {
        font-size: 1.5em;
    }

    .page-resources__section-text,
    .page-resources__list-item,
    .page-resources__step-description,
    .page-resources__news-description,
    .page-resources__cta-description {
        font-size: 0.95em;
    }

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

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        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 {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    
    .page-resources__image-wrapper,
    .page-resources__text-block {
        width: 100%;
    }

    /* Mobile image responsiveness */
    .page-resources img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    /* Ensure containers with images also adapt */
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__content-section,
    .page-resources__cta-section,
    .page-resources__faq-section,
    .page-resources__step-card,
    .page-resources__news-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-resources__news-card .page-resources__news-title,
    .page-resources__news-card .page-resources__news-description,
    .page-resources__news-card .page-resources__read-more {
        padding: 0 15px;
    }

    .page-resources__read-more {
        padding-left: 15px;
    }

    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 15px 25px !important;
    }
}