/* style/resources.css */

/* Variables (if not defined in shared.css) */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register: #C30808;
    --button-login: #C30808;
    --button-font-color: #FFFF00;
}

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

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

.page-resources__section-title {
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

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

/* 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, var(--primary-color) 0%, #3a9d66 100%); /* Green gradient */
    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;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

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

.page-resources__hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1.2;
    color: var(--button-font-color); /* Use custom font color for main title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-resources__hero-content p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
}

.page-resources__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--button-register); /* Custom register button color */
    color: var(--button-font-color); /* Custom font color for buttons */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-resources__cta-button:hover {
    background: #e02f2f; /* Slightly darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Intro Section */
.page-resources__intro-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

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

.page-resources__feature-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

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

.page-resources__feature-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.page-resources__feature-item h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-resources__feature-item p {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.page-resources__text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__text-link:hover {
    color: #005f2c;
    text-decoration: underline;
}

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

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

.page-resources__category-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__category-card h3 {
    font-size: 24px;
    color: var(--button-font-color); /* Custom font color for titles on dark background */
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.page-resources__category-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-resources__category-card li {
    margin-bottom: 10px;
}

.page-resources__category-card a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 16px;
}

.page-resources__category-card a:hover {
    color: var(--button-font-color); /* Highlight on hover */
    text-decoration: underline;
}

/* Why Choose Section */
.page-resources__why-choose-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

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

.page-resources__benefit-item {
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    border: 1px solid #e0e0e0;
}

.page-resources__benefit-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.page-resources__benefit-item h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-resources__benefit-item p {
    font-size: 16px;
    color: var(--text-dark);
}

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

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    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 h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none;
}

.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Rotate to become an 'X' or '-' */
    color: var(--button-register);
}

.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: #f9f9f9;
    color: var(--text-dark);
    border-radius: 0 0 10px 10px;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important;
    padding: 20px 25px !important;
    opacity: 1;
    border: 1px solid #e0e0e0;
    border-top: none;
}

/* Final CTA Section */
.page-resources__cta-section {
    padding: 100px 0;
    text-align: center;
    background-color: var(--secondary-color);
}

.page-resources__cta-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-resources__cta-button--large {
    padding: 20px 60px;
    font-size: 22px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-content h1 {
        font-size: 40px;
    }
    .page-resources__section-title {
        font-size: 32px;
    }
    .page-resources__section-description {
        font-size: 16px;
    }
    .page-resources__feature-item h3,
    .page-resources__category-card h3,
    .page-resources__benefit-item h3 {
        font-size: 20px;
    }
    .page-resources__feature-item p,
    .page-resources__category-card a,
    .page-resources__benefit-item p {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__hero-image img {
        border-radius: 8px;
    }
    .page-resources__hero-content h1 {
        font-size: 32px;
        margin-bottom: 10px;
    }
    .page-resources__hero-content p {
        font-size: 16px;
        margin-bottom: 25px;
    }
    .page-resources__cta-button {
        padding: 15px 35px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__container {
        padding: 15px;
    }
    .page-resources__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-resources__feature-grid, .page-resources__category-grid, .page-resources__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    .page-resources__feature-item,
    .page-resources__category-card,
    .page-resources__benefit-item {
        padding: 20px;
    }
    .page-resources__feature-item img,
    .page-resources__benefit-item img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-question h3 {
        font-size: 16px;
    }
    .page-resources__faq-toggle {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }
    /* Mobile image and container overflow prevention */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__hero-section,
    .page-resources__intro-section,
    .page-resources__category-section,
    .page-resources__why-choose-section,
    .page-resources__faq-section,
    .page-resources__cta-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-content h1 {
        font-size: 28px;
    }
    .page-resources__hero-content p {
        font-size: 15px;
    }
    .page-resources__cta-button--large {
        padding: 15px 40px;
        font-size: 18px;
    }
    .page-resources__section-title {
        font-size: 24px;
    }
    .page-resources__faq-question h3 {
        font-size: 15px;
    }
}