/* style/resources.css */

/* Base styles for the page content */
.page-resources {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text for dark body background */
    background-color: #121212; /* Inherited from body, explicitly set for context */
}

/* Fixed navigation bar spacing for the first content section */
.page-resources__hero-section {
    padding-top: 120px; /* Desktop spacing for fixed header */
    padding-bottom: 60px;
    background: linear-gradient(135deg, #1A202C, #0d0d0d); /* Darker background for hero */
    text-align: center;
}

.page-resources__hero-title {
    font-size: 42px;
    color: #FFD700; /* Gold color for main title */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 18px;
    color: #f0f0f0;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

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

.page-resources__btn-primary {
    display: inline-block;
    background-color: #FFD700;
    color: #1A202C; /* Dark text for gold button */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    transform: translateY(-2px);
}

.page-resources__section {
    padding: 80px 0;
    background-color: #1A202C; /* Auxiliary dark background */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.page-resources__section:nth-of-type(odd) {
    background-color: #0d0d0d; /* Slightly different dark shade for alternation */
}

.page-resources__section-title {
    font-size: 36px;
    color: #FFD700;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-description {
    font-size: 17px;
    color: #cccccc;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

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

.page-resources__card {
    background-color: #2a2a2a; /* Dark card background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-resources__card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

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

.page-resources__card-text {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-resources__btn-link {
    display: inline-block;
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Push to bottom */
}

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

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

.page-resources__news-card {
    background-color: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.page-resources__news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.page-resources__news-title {
    font-size: 20px;
    color: #FFD700;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.4;
}

.page-resources__news-title a {
    color: #FFD700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
    color: #e6c200;
    text-decoration: underline;
}

.page-resources__news-excerpt {
    font-size: 15px;
    color: #f0f0f0;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-resources__news-date {
    font-size: 14px;
    color: #999999;
    margin-top: auto;
    display: block;
}

.page-resources__view-all-button {
    text-align: center;
    margin-top: 50px;
}

.page-resources__btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #FFD700;
    border: 2px solid #FFD700;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A202C;
    transform: translateY(-2px);
}

/* FAQ Styles */
.page-resources__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #2a2a2a; /* Dark card background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #3a3a3a; /* Slightly lighter dark for question */
    border: 1px solid rgba(255, 255, 255, 0.1);
    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-color: #4a4a4a;
    border-color: 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 for FAQ question */
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-resources__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #f0f0f0;
    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: 32px;
    height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: #FFD700;
    transform: rotate(45deg); /* Plus to X effect */
}

.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-color: #2a2a2a; /* Card background for answer */
    color: #f0f0f0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough for any content */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

/* Contact Section */
.page-resources__contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-resources__contact-item {
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__contact-heading {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-resources__contact-text {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 25px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 38px;
    }
    .page-resources__hero-description {
        font-size: 17px;
    }
    .page-resources__section-title {
        font-size: 32px;
    }
    .page-resources__section-description {
        font-size: 16px;
    }
    .page-resources__card-grid,
    .page-resources__news-grid,
    .page-resources__contact-methods {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        padding-top: 100px; /* Mobile spacing for fixed header */
        padding-bottom: 40px;
    }
    .page-resources__hero-title {
        font-size: 30px;
    }
    .page-resources__hero-description {
        font-size: 15px;
    }
    .page-resources__btn-primary {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__section {
        padding: 60px 0;
    }
    .page-resources__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 40px;
    }
    .page-resources__card-grid,
    .page-resources__news-grid,
    .page-resources__contact-methods {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__card-image,
    .page-resources__news-image {
        height: 180px;
    }
    .page-resources__card-content,
    .page-resources__news-content {
        padding: 20px;
    }
    .page-resources__card-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .page-resources__card-text {
        font-size: 15px;
    }
    .page-resources__news-title {
        font-size: 18px;
    }
    .page-resources__news-excerpt {
        font-size: 14px;
    }
    .page-resources__btn-secondary {
        padding: 10px 20px;
        font-size: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-question h3 {
        font-size: 16px;
    }
    .page-resources__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }
    .page-resources__contact-heading {
        font-size: 22px;
    }
    .page-resources__contact-text {
        font-size: 15px;
    }
}

/* Ensure all images are responsive and do not overflow */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Mobile specific image and button responsiveness */
@media (max-width: 768px) {
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    /* All containers with images or buttons */
    .page-resources__container,
    .page-resources__card,
    .page-resources__news-card,
    .page-resources__contact-item,
    .page-resources__view-all-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Add horizontal padding to containers to prevent content from touching edges */
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Override for buttons within these containers */
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding-left: 15px; /* Ensure button padding is maintained */
        padding-right: 15px; /* Ensure button padding is maintained */
    }
    /* Specific overrides for buttons that might be in flex containers */
    .page-resources__contact-item .page-resources__btn-secondary {
        width: auto !important; /* Allow buttons in contact items to be smaller */
        max-width: fit-content !important;
        margin: 0 auto; /* Center them */
    }
}

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