.page-resources {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light background */
    line-height: 1.6;
    background-color: var(--secondary-color); /* Matches body background: #FFFFFF */
}

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

.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #017439, #FFFFFF); /* Subtle gradient from primary to white */
    color: #ffffff; /* White text for gradient background */
}

.page-resources__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

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

.page-resources__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Custom red for CTA */
    color: #FFFF00; /* Custom yellow for text */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-resources__cta-button:hover {
    background: #a80707; /* Darker red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__section-title {
    font-size: 2.2em;
    color: var(--primary-color); /* Green primary color */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-resources__paragraph {
    font-size: 1.05em;
    margin-bottom: 25px;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #444444;
}

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

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

.page-resources__dark-section {
    background-color: var(--primary-color); /* Primary green background */
    color: #ffffff; /* White text for dark background */
}

.page-resources__dark-section .page-resources__section-title {
    color: #ffffff;
}

.page-resources__dark-section .page-resources__section-title::after {
    background-color: #ffffff;
}

.page-resources__dark-section .page-resources__paragraph {
    color: #f0f0f0;
}

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

.page-resources__feature-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__feature-item img {
    max-width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 20px;
}

.page-resources__feature-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-resources__feature-text {
    font-size: 1em;
    color: #555555;
}

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

.page-resources__article-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__article-card img {
    width: 100%;
    height: 220px; /* Consistent image height for cards */
    object-fit: cover;
    display: block;
}

.page-resources__card-content {
    padding: 20px;
}

.page-resources__card-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

.page-resources__card-title a:hover {
    color: #005a2d; /* Slightly darker green on hover */
}

.page-resources__card-text {
    font-size: 0.95em;
    color: #666666;
    margin-bottom: 15px;
}

.page-resources__read-more-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-resources__read-more-button:hover {
    background: #005a2d;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 60px 0;
}

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

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    color: #555555;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Ensure content expands */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f0f0f0;
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-resources__faq-question:active {
    background: #eeeeee;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: #333333;
}

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg); /* Change to X or just rotate for - */
}

.page-resources__cta-section {
    text-align: center;
    margin-top: 60px;
    padding: 40px 20px;
    background-color: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.page-resources__cta-text {
    font-size: 1.5em;
    margin-bottom: 30px;
    font-weight: bold;
}

.page-resources__btn-register {
    background: #C30808; /* Red for Register */
    color: #FFFF00; /* Yellow text */
    margin-right: 15px;
}

.page-resources__btn-login {
    background: #C30808; /* Red for Login */
    color: #FFFF00; /* Yellow text */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 2.2em;
    }
    .page-resources__description {
        font-size: 1.1em;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__feature-item img,
    .page-resources__article-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__hero-image {
        margin-bottom: 20px;
    }
    .page-resources__hero-image img {
        border-radius: 4px;
    }
    .page-resources__main-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-resources__description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        margin-top: 20px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* General image responsiveness for mobile */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important; /* Ensure padding doesn't cause overflow */
    }

    /* Containers containing images or content to prevent overflow */
    .page-resources__container,
    .page-resources__feature-item,
    .page-resources__article-card,
    .page-resources__faq-item,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__feature-grid,
    .page-resources__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__feature-item {
        padding: 20px;
    }
    .page-resources__feature-item img,
    .page-resources__article-card img {
        
    }
    .page-resources__section-title {
        font-size: 1.6em;
        margin-bottom: 25px;
    }
    .page-resources__paragraph {
        font-size: 0.95em;
    }

    /* FAQ Mobile */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }

    .page-resources__cta-text {
        font-size: 1.2em;
    }
    .page-resources__btn-register,
    .page-resources__btn-login {
        margin-right: 0;
        margin-bottom: 15px;
        display: block; /* Stack buttons vertically */
    }
    .page-resources__btn-login {
        margin-bottom: 0;
    }
    .page-resources__cta-section {
      padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__main-title {
        font-size: 1.5em;
    }
    .page-resources__description {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.4em;
    }
    .page-resources__feature-item img,
    .page-resources__article-card img {
        
    }
}