:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --background-light: #f9f9f9;
    --border-color: #e0e0e0;
    --button-login-color: #EA7C07; /* From custom colors */
}

/* Base styles for the page-resources scope */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--secondary-color); /* Body background is white */
}

.page-resources h1,
.page-resources h2,
.page-resources h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources h1 {
    font-size: 2.8em;
    text-align: center;
}

.page-resources h2 {
    font-size: 2.2em;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.page-resources h3 {
    font-size: 1.6em;
}

.page-resources p {
    margin-bottom: 15px;
}

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

.page-resources a:hover {
    color: var(--button-login-color); /* Use a distinct hover color */
}

/* Section and Container styles */
.page-resources__section {
    padding: 60px 0;
    position: relative;
}

.page-resources__section:nth-of-type(even) {
    background-color: var(--background-light);
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px; /* Adjust padding-top later based on shared.css */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
}

.page-resources__hero-section h1,
.page-resources__hero-section p {
    color: var(--text-light); /* Ensure white text on 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;
    width: 100%;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    max-width: 900px; /* Limit image width slightly */
}

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

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

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    max-width: 100%; /* Important for mobile */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-resources__cta-button--primary {
    background: var(--button-login-color); /* Using login color for primary CTA */
    color: var(--text-light);
    border-color: var(--button-login-color);
}

.page-resources__cta-button--primary:hover {
    background: #e06c00; /* Manual darken */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__cta-button--secondary {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.page-resources__cta-button--secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__card {
    background: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.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;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.page-resources__card-title a {
    color: var(--primary-color);
    font-weight: bold;
}

.page-resources__card-title a:hover {
    color: var(--button-login-color);
}

.page-resources__card-content p {
    font-size: 0.95em;
    color: #666;
    flex-grow: 1;
}

/* Content Block (for security section) */
.page-resources__content-block {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.page-resources__content-block h3 {
    color: var(--primary-color);
    font-size: 1.5em;
    margin-top: 20px;
    margin-bottom: 15px;
}

.page-resources__content-block h3:first-child {
    margin-top: 0;
}

/* Contact List */
.page-resources__contact-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.page-resources__contact-list li {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--text-dark);
}

.page-resources__contact-list li strong {
    color: var(--primary-color);
}


/* FAQ Section styles - EXACTLY as provided */
.page-resources__faq-list {
    margin-top: 40px;
}

/* FAQ container style */
.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* FAQ default state - answer 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;
}

/* FAQ expanded state - ⚠️ Use !important and sufficiently large max-height */
.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* ⚠️ Use !important to ensure priority, value large enough to accommodate any content */
    padding: 20px 15px !important;
    opacity: 1;
    background: var(--background-light); /* Lighter background for answer */
    border-radius: 0 0 5px 5px;
    color: var(--text-dark);
}

/* Question style */
.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    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: var(--background-light);
    border-color: #c0c0c0; /* Manual darken */
}

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

/* Question title style */
.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.2em; /* Adjusted for better readability */
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click events */
    color: var(--text-dark); /* Ensure contrast */
}

/* Toggle icon */
.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; /* Prevent icon from blocking click events */
    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); /* Change color when active */
    transform: rotate(45deg); /* Example: rotate to become an 'x' or just change to minus */
}


/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .page-resources h1 {
        font-size: 2em;
    }

    .page-resources h2 {
        font-size: 1.8em;
    }

    .page-resources h3 {
        font-size: 1.4em;
    }

    /* Hero Section Mobile */
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    .page-resources__hero-cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100%;
    }

    .page-resources__cta-button {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* General section padding for mobile */
    .page-resources__section {
        padding: 40px 0;
    }

    .page-resources__container {
        padding: 0 15px; /* Smaller horizontal padding */
    }

    /* Card Grid Mobile */
    .page-resources__card-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 20px;
    }

    .page-resources__card-image {
        height: 180px; /* Slightly smaller height for mobile cards */
    }

    /* Images responsiveness - CRITICAL */
    .page-resources img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__content-block {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Mobile */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-resources__faq-question h3 {
        font-size: 15px;
        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;
    }
}

/* Ensure all content area images are not tiny */
.page-resources img:not(.page-resources__hero-image img) {
    min-width: 200px;
    min-height: 200px;
}

/* No CSS filters for images */
.page-resources img {
    filter: none !important;
}