/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #ffffff); /* Use shared background variable */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background-color: #26A9E0; /* Fallback for image loading */
}

.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: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 2;
}

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

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #ffffff;
}

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

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

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

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

/* Dark Background Section */
.page-resources__dark-bg {
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
}

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

.page-resources__dark-bg .page-resources__section-description {
    color: #f0f0f0;
}

/* Light Background Section */
.page-resources__light-bg {
    background-color: #f9f9f9; /* Light grey background */
    color: #333333;
}

/* Card Grid */
.page-resources__card-grid {
    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;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    color: #333333; /* Dark text for light card */
}

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

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

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

.page-resources__card-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #1a7fb8; /* Darker shade on hover */
    text-decoration: underline;
}

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

.page-resources__card-text a {
    color: #26A9E0;
    text-decoration: none;
}

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

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't increase total width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-resources__btn-primary {
    background-color: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
}

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

.page-resources__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
    background-color: #e0f2f7; /* Lighter blue background */
    color: #26A9E0;
    border-color: #26A9E0;
}

.page-resources__button-group {
    display: flex;
    gap: 15px;
    margin-top: auto; /* Push buttons to the bottom of the card */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    width: 100%;
}

.page-resources__button-group .page-resources__btn-secondary {
    flex: 1; /* Make buttons take equal width */
    min-width: 120px; /* Minimum width for buttons */
}

.page-resources__btn--center {
    margin: 30px auto 0;
    display: block;
    max-width: 300px;
}

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

.page-resources__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.page-resources__faq-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    list-style: none; /* For <summary> tag */
}

.page-resources__faq-item[open] > .page-resources__faq-question {
    background-color: #e0f2f7; /* Lighter brand color */
    color: #26A9E0;
}

.page-resources__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for <summary> */
}
.page-resources__faq-question::marker {
    display: none; /* Hide default marker for <summary> */
}

.page-resources__faq-qtext {
    flex-grow: 1;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    margin-left: 15px;
    color: #26A9E0;
}

.page-resources__faq-item[open] .page-resources__faq-toggle {
    color: #26A9E0;
}

.page-resources__faq-answer {
    padding: 20px 25px;
    font-size: 1.1em;
    color: #555555;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

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

.page-resources__faq-answer a {
    color: #26A9E0;
    text-decoration: none;
}

.page-resources__faq-answer a:hover {
    text-decoration: underline;
}

/* CTA Section */
.page-resources__cta-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand primary color */
    color: #ffffff;
    text-align: center;
}

.page-resources__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-resources__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #f0f0f0;
}

.page-resources__cta-description a {
    color: #ffffff;
    text-decoration: underline;
}

.page-resources__cta-description a:hover {
    color: #e0f2f7;
}

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

/* Link styles within content */
.page-resources__section-description a,
.page-resources__card-text a {
    color: #26A9E0;
    text-decoration: none;
}

.page-resources__section-description a:hover,
.page-resources__card-text a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }

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

    .page-resources__card-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

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

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

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

    .page-resources__section {
        padding: 40px 0;
    }

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

    .page-resources__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-resources__card-grid {
        grid-template-columns: 1fr; /* Single column layout on mobile */
        padding: 0 15px; /* Add padding to prevent overflow */
        gap: 20px;
    }

    .page-resources__card {
        padding: 20px;
    }

    .page-resources__card-image {
        height: 180px;
    }

    .page-resources__card-title {
        font-size: 1.3em;
    }

    .page-resources__card-text {
        font-size: 0.95em;
    }

    /* Mobile button adaptation */
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .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__button-group,
    .page-resources__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-resources__btn--center {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Mobile image adaptation */
    .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 {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ section mobile */
    .page-resources__faq-list {
        margin-top: 30px;
        padding: 0 15px;
    }

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

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

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

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

@media (max-width: 480px) {
    .page-resources__hero-section {
        min-height: 300px;
    }
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__cta-title {
        font-size: 1.6em;
    }
}