/* style/resources.css */

/* Custom properties for colors */
:root {
    --primary-color: #0A2463; /* Deep Blue */
    --secondary-color: #E0B34C; /* Golden Yellow */
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
}

.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

/* 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;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); /* Gradient background for visual appeal */
    color: var(--text-light);
    overflow: hidden; /* Ensure image doesn't overflow */
}

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

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

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

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

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-resources__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    max-width: 100%; /* Ensure button responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__cta-button:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* General Section Styling */
.page-resources__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-resources__section-title--light {
    color: var(--text-light);
}

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--text-dark);
}

.page-resources__section-description--light {
    color: rgba(255, 255, 255, 0.9);
}

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

.page-resources__intro-section {
    padding: 80px 0;
    background: var(--bg-light);
}

/* Category Section */
.page-resources__category-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-light);
}

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

.page-resources__category-card {
    background: var(--text-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-resources__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.page-resources__category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    max-width: 100%; /* Image responsiveness */
    height: auto;
}

.page-resources__card-title {
    font-size: 1.5em;
    padding: 20px 25px 10px;
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
}

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

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

.page-resources__card-description {
    padding: 0 25px 15px;
    font-size: 1em;
    flex-grow: 1; /* Allow description to take available space */
}

.page-resources__card-link {
    display: inline-block;
    padding: 10px 25px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__card-link:hover {
    color: var(--primary-color);
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.page-resources__faq-list {
    max-width: 900px;
    margin: 50px auto 0;
}

.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-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--text-light);
    border: 1px solid var(--border-color);
    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: #f0f0f0;
    border-color: #d0d0d0;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-color);
    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: var(--primary-color);
    transform: rotate(45deg); /* Rotate for 'x' effect, or keep '-' */
}

.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 25px;
    opacity: 0;
    background: #fcfcfc;
    color: var(--text-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to show all content */
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px dashed var(--border-color);
    border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
    margin: 0;
    padding: 0;
    font-size: 1em;
}

.page-resources__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-resources__faq-answer a:hover {
    color: var(--secondary-color);
}

/* Call to Action Section */
.page-resources__cta-section {
    padding: 80px 0;
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

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

.page-resources__cta-button--primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
}

.page-resources__cta-button--primary:hover {
    background: var(--text-light);
    color: var(--primary-color);
}

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

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


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

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

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

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

    .page-resources__category-card img {
        
    }
}

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

    .page-resources__hero-section {
        padding: 40px 15px;
    }

    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-resources__cta-button {
        padding: 15px 30px;
        font-size: 1em;
        width: 100% !important; /* Full width for mobile buttons */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-top: 15px;
    }

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

    .page-resources__intro-section,
    .page-resources__category-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        padding: 50px 0;
    }

    .page-resources__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-resources__categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__category-card img {
        
    }

    .page-resources__card-title {
        font-size: 1.3em;
        padding: 15px 20px 8px;
    }

    .page-resources__card-description {
        padding: 0 20px 10px;
        font-size: 0.95em;
    }

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

    .page-resources__faq-question h3 {
        font-size: 1em;
        width: calc(100% - 40px);
    }

    .page-resources__faq-toggle {
        font-size: 1.5em;
        width: 28px;
        height: 28px;
        margin-left: 10px;
    }

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

    .page-resources__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure all images are responsive */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }

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

    .page-resources__cta-button {
        font-size: 0.9em;
        padding: 12px 25px;
    }

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