.page-resources {
    color: #ffffff; /* Light text for dark body background #121212 */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #000; /* Fallback */
}

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

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

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

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

.page-resources__hero-description {
    font-size: 1.2em;
    color: #f0f0f0;
    margin-bottom: 30px;
}

.page-resources__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box; /* Ensure padding and border are included in width */
}

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

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #017439; /* Primary brand color */
}

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

.page-resources__btn-link {
    background-color: transparent;
    color: #017439; /* Primary brand color */
    border: none;
    padding: 5px 0;
    font-size: 1em;
    font-weight: normal;
    text-decoration: underline;
}

.page-resources__btn-link:hover {
    color: #005f2e;
}

/* Section Styling */
.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff; /* Default for dark sections */
}

.page-resources__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #f0f0f0; /* Default for dark sections */
    text-align: justify;
}

.page-resources__dark-section {
    background-color: #1a1a1a; /* Slightly lighter than body for contrast, but still dark */
    padding: 60px 0;
    color: #ffffff;
}

.page-resources__light-bg {
    background-color: #ffffff; /* Custom background color */
    padding: 60px 0;
}

.page-resources__dark-text {
    color: #333333; /* Dark text for light background */
}

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

.page-resources__card {
    background-color: #f8f8f8; /* Light background for cards on light section */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #333333;
    transition: transform 0.3s ease;
}

.page-resources__card:hover {
    transform: translateY(-5px);
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-resources__card-title {
    font-size: 1.5em;
    margin: 20px 20px 10px 20px;
    color: #017439; /* Primary brand color for card titles */
}

.page-resources__card-title a {
    color: #017439;
    text-decoration: none;
}

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

.page-resources__card-text {
    padding: 0 20px 20px 20px;
    flex-grow: 1; /* Allow text to grow */
}

.page-resources__card .page-resources__btn-link {
    align-self: flex-start;
    margin: 0 20px 20px 20px;
    padding: 0;
}

/* Lists */
.page-resources__benefits-list,
.page-resources__access-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.page-resources__benefits-list li,
.page-resources__access-list li {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark background */
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__list-item-title {
    font-size: 1.4em;
    color: #017439; /* Primary brand color for list item titles */
    margin-bottom: 10px;
}

.page-resources__access-list li p {
    color: #f0f0f0;
}

.page-resources__access-list li a {
    color: #FFFF00; /* Custom font color for links in dark sections */
    text-decoration: underline;
}

.page-resources__access-list li a:hover {
    color: #ffcc00;
}

/* Video Section */
.page-resources__video-section {
    padding-top: 60px; /* Adjust if header offset is already applied to main */
    padding-bottom: 60px;
    text-align: center;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block; /* Ensure it behaves as a block element */
    cursor: pointer;
}

.page-resources__video-link {
    display: block; /* Make the entire video area clickable */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Ensure link is above video controls if needed, but video controls should be functional */
}

.page-resources__video-caption {
    font-style: italic;
    margin-top: 15px;
    color: #f0f0f0;
}

/* FAQ Section */
.page-resources__faq-section {
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
}

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

.page-resources__faq-item {
    background-color: #f8f8f8; /* Light background for FAQ items on light section */
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    color: #333333;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: #eee;
    font-weight: bold;
    color: #333333;
    border-bottom: 1px solid #ddd;
}

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

.page-resources__faq-title {
    margin: 0;
    font-size: 1.2em;
    color: #333333;
    text-align: left;
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
    color: #017439; /* Primary brand color for toggle */
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    text-align: left;
}

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

/* CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    text-align: center;
}

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

/* Global Image Styling */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-resources__container {
        padding: 15px;
    }

    .page-resources__hero-section {
        height: 450px;
    }
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100%;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-resources__dark-section,
    .page-resources__light-bg {
        padding: 40px 0;
    }

    /* Mobile image responsiveness */
    .page-resources img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper,
    .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;
      overflow: hidden !important; /* Prevent horizontal scroll */
    }

    /* Video responsiveness */
    .page-resources video,
    .page-resources__video {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .page-resources__video-wrapper {
      padding-bottom: 56.25% !important; /* Maintain aspect ratio */
      height: 0 !important;
      overflow: hidden !important;
      max-width: 100% !important;
      width: 100% !important;
    }
    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure video section also gets offset */
    }

    .page-resources__faq-question {
        padding: 15px;
    }
    .page-resources__faq-title {
        font-size: 1em;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 15px 15px 15px;
    }
}