/* style/resources.css */

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

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

.page-resources__container--center {
    text-align: center;
}

.page-resources__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

.page-resources__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #26A9E0; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-resources__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #555555;
}

.page-resources__dark-bg {
    background-color: #26A9E0; /* Primary brand color background */
    color: #ffffff; /* White text for dark background */
}

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

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

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

/* --- Hero Section --- */
.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); /* Fixed header offset */
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
    overflow: hidden;
}

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

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 1000px; /* Constrain hero image width */
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.page-resources__main-title {
    font-size: 48px;
    font-weight: 800;
    color: #26A9E0; /* Primary brand color */
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.page-resources__intro-text {
    font-size: 20px;
    color: #555555;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-primary {
    background: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
    box-shadow: 0 4px 15px rgba(38, 169, 224, 0.3);
}

.page-resources__btn-primary:hover {
    background: #1e87b7;
    border-color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 169, 224, 0.4);
}

.page-resources__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-resources__btn-secondary:hover {
    background: #f0f8ff;
    color: #1e87b7;
    border-color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Category Grid Section --- */
.page-resources__section--categories {
    padding: 80px 0;
}

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

.page-resources__card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #333333; /* Ensure dark text on light card background */
}

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

.page-resources__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.page-resources__card-title {
    font-size: 22px;
    font-weight: 700;
    margin: 20px 20px 10px 20px;
    line-height: 1.3;
    color: #26A9E0; /* Primary brand color for card titles */
}

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

.page-resources__card-title a:hover {
    color: #1e87b7;
    text-decoration: underline;
}

.page-resources__card-text {
    font-size: 16px;
    color: #555555;
    padding: 0 20px;
    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;
}

.page-resources__card-button {
    margin: 0 20px 20px 20px;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 6px;
    align-self: flex-start; /* Align button to start within flex column */
}

/* --- FAQ Section --- */
.page-resources__section--faq {
    padding-bottom: 80px;
}

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

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.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 20px;
    opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain any content */
    padding: 20px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

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

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    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: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
    font-size: 28px;
    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; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #26A9E0;
    transform: rotate(45deg); /* Plus sign rotates to form an X */
}

.page-resources__faq-image {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 600px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Ensure min size */
    min-height: 200px; /* Ensure min size */
}

/* --- CTA Section at Bottom --- */
.page-resources__section--cta {
    padding: 80px 0;
    text-align: center;
}

.page-resources__section--cta .page-resources__section-title {
    color: #ffffff;
    margin-bottom: 25px;
}

.page-resources__section--cta .page-resources__section-description {
    color: #f0f0f0;
    font-size: 18px;
    margin-bottom: 40px;
}

.page-resources__section--cta .page-resources__section-description a {
    color: #ffffff;
    text-decoration: underline;
}
.page-resources__section--cta .page-resources__section-description a:hover {
    color: #e0f2f7;
}

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

    .page-resources__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-resources__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-resources__intro-text {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .page-resources__cta-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 15px;
    }

    .page-resources__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__container {
        padding: 0 15px;
    }

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

    .page-resources__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
        padding: 0 5px;
    }

    .page-resources__category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

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

    .page-resources__card-title {
        font-size: 20px;
        margin: 15px 15px 8px 15px;
    }

    .page-resources__card-text {
        font-size: 15px;
        padding: 0 15px;
    }

    .page-resources__card-button {
        margin: 0 15px 15px 15px;
        padding: 10px 20px;
        font-size: 15px;
        width: calc(100% - 30px); /* Adjust for padding */
    }

    .page-resources__faq-list {
        margin-top: 30px;
    }

    .page-resources__faq-question {
        padding: 15px 20px;
    }

    .page-resources__faq-question h3 {
        font-size: 16px;
    }

    .page-resources__faq-toggle {
        font-size: 24px;
        width: 26px;
        height: 26px;
    }

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

    .page-resources__faq-image {
        max-width: 100%;
        margin-top: 30px;
    }

    /* Images responsiveness for content area */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box;
    }
    
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding left/right handled by container and hero-section */
    }
}

/* Ensure all links within content are readable */
.page-resources p a,
.page-resources li a,
.page-resources__section-description a {
    color: #26A9E0;
    text-decoration: none;
}

.page-resources p a:hover,
.page-resources li a:hover,
.page-resources__section-description a:hover {
    text-decoration: underline;
    color: #1e87b7;
}

/* Content area image size enforcement */
.page-resources img:not(.page-resources__hero-image img) {
    min-width: 200px;
    min-height: 200px;
}