/* style/resources.css */

/* Base styles for the page-resources scope */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #FFFFFF */
    background-color: #ffffff;
}

.page-resources h1,
.page-resources h2,
.page-resources h3 {
    color: #26A9E0; /* Brand primary color for headings */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-resources h1 {
    font-size: 3em;
    text-align: center;
    color: #000000; /* Darker for main title for contrast */
}

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

.page-resources h3 {
    font-size: 1.6em;
    color: #26A9E0;
}

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

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

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

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

/* Section styling */
.page-resources__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

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

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

.page-resources__dark-bg h2,
.page-resources__dark-bg p {
    color: #ffffff;
}

/* 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); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Subtle 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;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

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

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

.page-resources__hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #26A9E0; /* Heading color */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.page-resources__hero-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: #555555;
}

/* CTA Button */
.page-resources__cta-button,
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box; /* Ensure padding is included in width */
    max-width: 100%; /* Ensure button doesn't overflow on mobile */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
}

.page-resources__cta-button {
    background: #26A9E0; /* Primary color */
    color: #ffffff;
    border: 2px solid #26A9E0;
    margin: 0 10px 15px 10px;
}

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

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

.page-resources__btn-primary:hover {
    background: #1e87b7;
    border-color: #1e87b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

.page-resources__button-group,
.page-resources__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-resources__article-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-resources__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.page-resources__article-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    max-width: 100%;
}

.page-resources__article-card h3 {
    font-size: 1.3em;
    margin: 20px 20px 10px 20px;
    color: #26A9E0;
}

.page-resources__article-card h3 a {
    color: #26A9E0;
    text-decoration: none;
}

.page-resources__article-card h3 a:hover {
    text-decoration: underline;
}

.page-resources__article-card p {
    font-size: 0.95em;
    color: #555555;
    padding: 0 20px;
    flex-grow: 1; /* Allow paragraph to take available space */
}

.page-resources__read-more-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px;
    background: #f0f0f0;
    color: #26A9E0;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-resources__read-more-link:hover {
    background: #e0e0e0;
    text-decoration: none;
}

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

.page-resources__category-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.page-resources__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.page-resources__category-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #26A9E0;
}

.page-resources__category-card h3 a {
    color: #26A9E0;
    text-decoration: none;
}

.page-resources__category-card h3 a:hover {
    text-decoration: underline;
}

.page-resources__category-card p {
    font-size: 0.9em;
    color: #666666;
}

/* Comprehensive Guide */
.page-resources__comprehensive-guide h3 {
    font-size: 1.8em;
    color: #26A9E0;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.page-resources__comprehensive-guide ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-resources__comprehensive-guide ul li {
    margin-bottom: 8px;
    color: #555555;
}

.page-resources__comprehensive-guide strong {
    color: #26A9E0;
}

/* FAQ Section - Provided styles */
.page-resources__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: 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;
    padding: 0 15px;
    opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Use !important to ensure priority, large value to accommodate content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    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: #f5f5f5;
    border-color: #d0d0d0;
}

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

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #333333; /* Dark color for question text */
}

.page-resources__faq-item.active .page-resources__faq-question h3 {
    color: #26A9E0; /* Brand color when active */
}

.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 event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #26A9E0; /* Brand color when active */
    transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* CTA Banner */
.page-resources__cta-banner {
    text-align: center;
    padding: 80px 20px;
}

.page-resources__cta-banner h2 {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 20px;
}

.page-resources__cta-banner p {
    font-size: 1.2em;
    color: #e0f2f7;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-content h1 {
        font-size: 3em;
    }
    .page-resources h2 {
        font-size: 2em;
    }
    .page-resources__article-card img {
        height: 200px;
    }
}

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

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

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

    .page-resources__cta-button,
    .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;
        margin: 10px 0 !important; /* Adjust margins for stacked buttons */
    }

    .page-resources__button-group,
    .page-resources__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

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

    .page-resources h1 {
        font-size: 2.5em;
    }

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

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

    /* Images responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block;
    }
    
    .page-resources__article-card img {
        height: auto; /* Allow height to adjust naturally */
    }

    .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;
    }

    .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;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-content h1 {
        font-size: 1.8em;
    }
    .page-resources h2 {
        font-size: 1.5em;
    }
    .page-resources__cta-button,
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        font-size: 16px;
        padding: 12px 25px;
    }
    .page-resources__articles-grid,
    .page-resources__categories-grid {
        grid-template-columns: 1fr;
    }
}