/* style/resources.css */

/* --- General Styles --- */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #f0f0f0; /* Light text for dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-resources__section {
    padding: 80px 0;
    text-align: center;
}

.page-resources__section-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #FFD700; /* Primary brand color for titles */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-resources__text-block {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #e0e0e0; /* Slightly off-white for body text */
}

.page-resources__card {
    background: rgba(255, 255, 255, 0.08); /* Semi-transparent white for cards on dark background */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    color: #f0f0f0; /* Light text on card */
    border: 1px solid rgba(255, 215, 0, 0.2); /* Subtle gold border */
}

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

.page-resources__card h3 {
    color: #FFD700;
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-resources__card p {
    font-size: 16px;
    color: #e0e0e0;
}

/* --- Color Contrast Classes --- */
.page-resources__dark-bg {
    background-color: #1A1A1A; /* Auxiliary brand color */
    color: #ffffff; /* Light text on dark background */
}

.page-resources__light-bg {
    background-color: #0d0d0d; /* Slightly lighter dark background for contrast */
    color: #f0f0f0; /* Light text on dark background */
}

/* --- Buttons --- */
.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Primary brand color */
    color: #1A1A1A; /* Dark text on gold button */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.page-resources__cta-button--secondary {
    background: #DC143C; /* Deep red accent color */
    color: #ffffff; /* Light text on red button */
}

.page-resources__cta-button--secondary:hover {
    background: #b01030; /* Slightly darker red on hover */
}

.page-resources__btn-primary {
    background: #FFD700;
    color: #1A1A1A;
    border: none;
}
.page-resources__btn-primary:hover {
    background: #e6c200;
}

.page-resources__btn-secondary {
    background: #DC143C;
    color: #ffffff;
    border: none;
}
.page-resources__btn-secondary:hover {
    background: #b01030;
}


/* --- 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, #1A1A1A, #000000); /* Dark 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;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

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

.page-resources__main-title {
    font-size: 48px;
    color: #FFD700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.page-resources__intro-description {
    font-size: 20px;
    color: #e0e0e0;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

/* --- Why Resources Section --- */
.page-resources__section--why-resources {
    background-color: #0d0d0d;
    padding-bottom: 60px;
}

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

.page-resources__feature-item {
    padding: 25px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.page-resources__feature-item h3 {
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 10px;
}

.page-resources__feature-item p {
    font-size: 15px;
    color: #cccccc;
}

/* --- Categories Section --- */
.page-resources__section--categories {
    background-color: #1A1A1A;
}

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

.page-resources__category-card {
    display: block;
    text-decoration: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.page-resources__category-card img {
    width: 100%;
    height: 250px; /* Fixed height for category images */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-resources__category-card h3 {
    font-size: 20px;
    color: #FFD700;
    margin: 20px 15px 10px 15px;
}

.page-resources__category-card p {
    font-size: 15px;
    color: #e0e0e0;
    padding: 0 15px 20px 15px;
}

/* --- Latest Articles Section --- */
.page-resources__section--latest-articles {
    background-color: #0d0d0d;
    padding-bottom: 60px;
}

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

.page-resources__article-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__article-card img {
    width: 100%;
    height: 220px; /* Fixed height for article images */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-resources__article-content {
    padding: 20px;
}

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

.page-resources__article-link {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__article-link:hover {
    color: #e6c200;
    text-decoration: underline;
}

.page-resources__article-excerpt {
    font-size: 15px;
    color: #cccccc;
    margin-bottom: 15px;
}

.page-resources__article-date {
    font-size: 13px;
    color: #888;
}

/* --- FAQ Section --- */
.page-resources__section--faq {
    background-color: #1A1A1A;
}

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

.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, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* 🚨 Using !important and large value */
    padding: 20px 15px !important;
    opacity: 1;
    background: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.1); /* Slightly lighter background for question */
    border: 1px solid rgba(255, 215, 0, 0.2);
    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: rgba(255, 255, 255, 0.15);
    border-color: #FFD700;
}

.page-resources__faq-question:active {
    background: rgba(255, 255, 255, 0.2);
}

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

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #FFD700; /* Gold color for toggle icon */
    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: #ffffff; /* White color when active */
    transform: rotate(45deg); /* Rotate for 'x' effect, or keep '-' */
}

.page-resources__faq-answer p {
    color: #cccccc;
    font-size: 16px;
    margin: 0;
}

.page-resources__faq-answer a {
    color: #FFD700;
    text-decoration: underline;
}

.page-resources__faq-answer a:hover {
    color: #e6c200;
}

/* --- CTA Section --- */
.page-resources__section--cta {
    background-color: #0d0d0d;
    padding-bottom: 80px;
}

.page-resources__cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1A1A1A; /* Dark background for CTA box */
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-resources__cta-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15; /* Subtle background image */
    z-index: 0;
    border-radius: 15px;
    min-width: 200px; /* Min size requirement */
    min-height: 200px; /* Min size requirement */
}

.page-resources__cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-resources__cta-content .page-resources__section-title {
    color: #FFD700;
    margin-bottom: 25px;
}

.page-resources__cta-content .page-resources__text-block {
    color: #e0e0e0;
    margin-bottom: 30px;
}

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


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 40px;
    }
    .page-resources__section-title {
        font-size: 30px;
    }
    .page-resources__intro-description,
    .page-resources__text-block {
        font-size: 16px;
    }
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }
    .page-resources__category-card img,
    .page-resources__article-card img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Re-set padding-top for mobile */
        padding-bottom: 30px;
    }
    .page-resources__main-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .page-resources__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-resources__intro-description,
    .page-resources__text-block,
    .page-resources__card p,
    .page-resources__article-excerpt,
    .page-resources__faq-answer p {
        font-size: 15px;
        max-width: 100%;
        margin-bottom: 20px;
    }
    .page-resources__container {
        padding: 0 15px; /* Add horizontal padding to containers */
    }

    /* Images responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure min size on mobile */
        min-height: 200px !important; /* Ensure min size on mobile */
    }
    .page-resources__hero-image img {
        min-height: 250px !important; /* Larger min-height for hero on mobile */
    }
    .page-resources__category-card img,
    .page-resources__article-card img {
        height: auto !important; /* Let height adjust to aspect ratio */
        min-height: 200px !important;
    }
    .page-resources__cta-container img {
        min-
    }

    /* All containers must adapt */
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-container,
    .page-resources__features-grid,
    .page-resources__category-grid,
    .page-resources__articles-grid,
    .page-resources__faq-list,
    .page-resources__cta-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__cta-container {
        padding: 30px 15px;
    }
    .page-resources__features-grid,
    .page-resources__category-grid,
    .page-resources__articles-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 20px;
    }

    /* Buttons responsiveness */
    .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: 12px 15px; /* Adjust padding for mobile buttons */
        margin: 5px 0 !important; /* Stack buttons vertically */
    }

    /* Button group for stacking */
    .page-resources__button-group {
        flex-direction: column; /* Stack buttons */
        gap: 10px;
        padding-left: 0;
        padding-right: 0;
    }

    /* FAQ specific mobile styles */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-resources__faq-question h3 {
        font-size: 16px;
        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__main-title {
        font-size: 28px;
    }
    .page-resources__section-title {
        font-size: 22px;
    }
    .page-resources__cta-button {
        font-size: 15px;
    }
}