/* style/resources.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* General Styles for .page-resources */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #f0f0f0; /* Light text for dark body background */
    background-color: var(--primary-color, #1A202C); /* Ensure dark background */
}

.page-resources__dark-bg {
    background-color: var(--primary-color, #1A202C);
    color: #ffffff;
}

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

.page-resources__section-title {
    font-size: 2.5em;
    color: #FFD700; /* Gold for titles */
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.page-resources__section-title--light {
    color: #ffffff; /* White for dark backgrounds */
}

.page-resources__paragraph {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.page-resources__paragraph--light {
    color: #f0f0f0;
}

.page-resources__highlight {
    color: #FFD700; /* Highlight keywords with gold */
    font-weight: bold;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow: hidden;
    box-sizing: border-box;
}

.page-resources__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
    filter: none; /* No filter to change image color */
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
    border-radius: 10px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    color: #FFD700;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 30px;
}

.page-resources__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-link {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure buttons are responsive */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-resources__btn-primary {
    background-color: #FFD700; /* Gold background */
    color: #1A202C; /* Dark text */
    border: 2px solid #FFD700;
}

.page-resources__btn-primary:hover {
    background-color: #e6c200;
    border-color: #e6c200;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #FFD700; /* Gold text */
    border: 2px solid #FFD700;
}

.page-resources__btn-secondary:hover {
    background-color: #FFD700;
    color: #1A202C;
}

.page-resources__btn-link {
    background-color: transparent;
    color: #FFD700;
    border: 1px solid #FFD700;
    padding: 10px 20px;
    font-size: 0.9em;
}

.page-resources__btn-link:hover {
    background-color: #FFD700;
    color: #1A202C;
}

/* Content Area */
.page-resources__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
}

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

/* Card Styles */
.page-resources__card {
    background-color: #f8f8f8; /* Light background for cards */
    color: #333333; /* Dark text for light card background */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.page-resources__card:hover {
    transform: translateY(-5px);
}

.page-resources__card-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency, adjust as needed */
    object-fit: cover;
    filter: none; /* No filter to change image color */
    min-width: 200px; /* Minimum size requirement */
    min-height: 200px; /* Minimum size requirement */
}

.page-resources__card-title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 20px 20px 10px 20px;
    color: #1A202C; /* Dark text for card titles */
}

.page-resources__card-title a {
    color: #1A202C; /* Dark text for card title links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #FFD700; /* Gold on hover */
}

.page-resources__card-text {
    font-size: 1em;
    padding: 0 20px 20px 20px;
    flex-grow: 1;
}

/* Video Section */
.page-resources__video-section {
    position: relative;
    width: 100%;
    padding: 60px 20px;
    background-color: var(--primary-color, #1A202C);
    color: #ffffff;
    text-align: center;
    box-sizing: border-box;
}

.page-resources__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 1000px; /* Max width for video */
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    filter: none; /* No filter to change video color */
}

/* FAQ Section */
.page-resources__faq-list {
    max-width: 900px;
    margin: 40px auto 0 auto;
    box-sizing: border-box;
}

.page-resources__faq-item {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-sizing: border-box;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: #1A202C; /* Dark text for question */
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: #f0f0f0;
}

.page-resources__faq-question h3 {
    margin: 0;
    color: #1A202C;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg);
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px; /* Adjust padding for collapsed state */
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #f8f8f8;
    color: #333333; /* Dark text for answer */
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px !important; /* Adjust padding for expanded state */
}

.page-resources__faq-answer p {
    margin-bottom: 0;
    text-align: left;
}

.page-resources__faq-answer a {
    color: #1A202C; /* Dark link for FAQ answer */
    text-decoration: underline;
}

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

/* CTA Section */
.page-resources__cta-section {
    padding: 80px 20px;
    text-align: center;
    background-color: var(--primary-color, #1A202C);
    color: #ffffff;
    box-sizing: border-box;
}

.page-resources__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

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

@media (max-width: 768px) {
    .page-resources__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources__btn-link {
        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;
    }
    .page-resources__cta-buttons,
    .page-resources__hero-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-resources__grid {
        grid-template-columns: 1fr;
    }

    .page-resources__content-area,
    .page-resources__video-section,
    .page-resources__cta-section {
        padding: 40px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Mobile image and video responsiveness */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no filter changes */
    }
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        filter: none !important; /* Ensure no filter changes */
    }
    .page-resources__video-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 0 !important; /* Reset padding for video wrapper */
        padding-right: 0 !important; /* Reset padding for video wrapper */
    }

    /* Ensure content containers also handle padding */
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__faq-list,
    .page-resources__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important; /* Adjust as needed, but ensure no overflow */
        padding-right: 0 !important; /* Adjust as needed, but ensure no overflow */
    }
    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

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