/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: #FFFFFF; /* Explicitly set for clarity, though shared.css might define body */
}

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

/* Section styling */
.page-resources__section {
    padding: 60px 0;
    text-align: center;
}

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

.page-resources__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #017439; /* Brand green for sub-titles */
    font-weight: bold;
    text-align: left; /* Align sub-titles to left */
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left; /* Align text blocks to left */
}

.page-resources__list {
    list-style: disc;
    padding-left: 40px;
    margin-bottom: 20px;
    text-align: left; /* Align list to left */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__list-item {
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Color schemes */
.page-resources__dark-bg {
    background-color: #017439; /* Brand primary color */
    color: #ffffff; /* White text for dark background */
}

.page-resources__dark-bg .page-resources__section-title,
.page-resources__dark-bg .page-resources__sub-title {
    color: #ffffff; /* White titles on dark background */
}

.page-resources__light-bg {
    background-color: #ffffff; /* White background */
    color: #333333; /* Dark text for light background */
}

/* Hero Section */
.page-resources__hero-section {
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
    padding-top: 40px;
    padding-bottom: 40px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.4em;
    margin-bottom: 40px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); /* Darken image for text readability */
}

/* 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; /* Ensure padding doesn't push width */
}

.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: #a00606;
    border-color: #a00606;
    color: #ffffff;
}

.page-resources__btn-secondary {
    background-color: #FFFFFF;
    color: #017439; /* Brand green for secondary button text */
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #00502a;
    border-color: #00502a;
}

.page-resources__btn-text-link {
    display: inline-block;
    color: #017439; /* Brand green for text links */
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.page-resources__btn-text-link:hover {
    color: #00502a;
    text-decoration: underline;
}

.page-resources__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}


/* Content Grid Section */
.page-resources__content-grid {
    background-color: #f8f8f8;
}

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

.page-resources__card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push link to bottom */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__card-title {
    font-size: 1.5em;
    color: #017439; /* Brand green for card titles */
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources__card-text {
    font-size: 1em;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1; /* Allow text to take up available space */
}

/* FAQ Section */
.page-resources__faq-section {
    padding-bottom: 80px;
}

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

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

.page-resources__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #017439; /* Brand green for FAQ questions */
    position: relative;
}

/* Hide default marker for WebKit browsers */
.page-resources__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-resources__faq-question {
    flex-grow: 1;
    padding-right: 15px; /* Space for toggle icon */
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
    transform: rotate(45deg); /* Rotate '+' to 'x' or similar */
}

.page-resources__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
    line-height: 1.7;
    border-top: 1px solid #eee;
    margin-top: -1px; /* Overlap border */
}

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

/* CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    background-color: #017439; /* Brand green */
    color: #ffffff;
}

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

.page-resources__cta-section .page-resources__text-block {
    color: #f0f0f0;
}

/* Responsive design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__hero-description {
        font-size: 1.2em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__sub-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        min-height: 400px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .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__button-group {
        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__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__sub-title {
        font-size: 1.4em;
    }
    .page-resources__text-block,
    .page-resources__list-item,
    .page-resources__card-text,
    .page-resources__faq-answer p {
        font-size: 0.95em;
    }
    .page-resources__container {
        padding: 0 15px;
    }
    .page-resources__grid-wrapper {
        grid-template-columns: 1fr;
    }
    .page-resources__card {
        padding: 20px;
    }
    .page-resources__card-image {
        height: 180px;
    }

    /* Mobile image and video responsive rules */
    .page-resources img,
    .page-resources video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .page-resources__hero-image-wrapper,
    .page-resources__card,
    .page-resources__grid-item,
    .page-resources__faq-section,
    .page-resources__cta-section,
    .page-resources__section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden !important; /* Ensure no overflow */
    }
    /* Specific override for .page-resources__section, as it already has 0 padding left/right by default for its container */
    .page-resources__section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-resources__section .page-resources__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__faq-item summary {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .page-resources__faq-answer {
        padding: 0 20px 15px;
    }
}