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

:root {
    --primary-color: #017439; /* Main brand color */
    --secondary-color: #FFFFFF; /* Auxiliary brand color */
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register: #C30808;
    --button-login: #C30808;
    --button-text-yellow: #FFFF00;
}

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    background-color: var(--secondary-color); /* Matches body background from shared */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Increased height for visual impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    box-sizing: border-box;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    color: var(--text-light);
    max-width: 900px;
    padding: 20px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light); /* Ensure light text on dark background */
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-resources__hero-cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* For mobile */
}

/* General Section Styling */
.page-resources__section {
    padding: 60px 0;
}

.page-resources__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-resources__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.page-resources__content-block--white-text {
    color: var(--text-light);
}

.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
    color: inherit; /* Inherit color from section background */
}

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

/* Grid Layout for Content Sections */
.page-resources__grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.page-resources__grid-container--reverse {
    grid-template-columns: 1fr 1fr;
    direction: rtl; /* Reverse order for content and image */
}

.page-resources__grid-container--reverse > .page-resources__content-block {
    direction: ltr; /* Restore text direction */
}

.page-resources__grid-container--reverse > .page-resources__image-wrapper {
    direction: ltr; /* Restore image direction */
}


.page-resources__content-block {
    padding: 20px;
}

.page-resources__image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.page-resources__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* List Styling */
.page-resources__list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.page-resources__list-item {
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent background for contrast on dark sections */
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__dark-bg .page-resources__list-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-resources__light-bg .page-resources__list-item {
    background-color: #f9f9f9;
    border-color: #e0e0e0;
}

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

.page-resources__list-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    color: inherit;
}

.page-resources__list-item p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 0;
    color: inherit;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    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;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure button doesn't exceed container */
}

.page-resources__btn-primary {
    background-color: var(--button-register); /* Custom color for register/login */
    color: var(--button-text-yellow); /* Custom text color for register/login */
    border: 2px solid var(--button-register);
}

.page-resources__btn-primary:hover {
    background-color: #a80707; /* Darker shade of #C30808 */
    border-color: #a80707;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: var(--text-light); /* Light text on dark backgrounds */
    border: 2px solid var(--text-light);
}

.page-resources__light-bg .page-resources__btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.page-resources__light-bg .page-resources__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-resources__btn-inline {
    margin-top: 20px;
    display: table; /* To center it */
    margin-left: auto;
    margin-right: auto;
}

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

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-title {
    margin: 0;
    color: inherit;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    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 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: var(--text-light);
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 15px 25px 25px 25px;
}

.page-resources__faq-answer p {
    margin: 0;
    color: inherit;
}

/* Video Section */
.page-resources__video-section {
    padding: 60px 0;
    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: 40px auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background-color: #000; /* Black background for video area */
}

.page-resources__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    cursor: pointer; /* Indicate clickable */
    max-width: 100%; /* Ensure video does not exceed container */
    display: block;
}

.page-resources__btn-video-cta {
    margin-top: 30px;
    background-color: var(--button-register); /* Register button color */
    color: var(--button-text-yellow); /* Register button text color */
    border: 2px solid var(--button-register);
}

.page-resources__btn-video-cta:hover {
    background-color: #a80707;
    border-color: #a80707;
}

/* Contact Section */
.page-resources__contact-section {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__grid-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .page-resources__grid-container--reverse {
        grid-template-columns: 1fr;
        direction: ltr; /* Reset direction for single column */
    }
    .page-resources__grid-container--reverse > .page-resources__content-block,
    .page-resources__grid-container--reverse > .page-resources__image-wrapper {
        direction: ltr; /* Reset direction */
    }
    .page-resources__content-block {
        padding: 0;
    }
    .page-resources__image-wrapper {
        padding: 0;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        height: 450px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__hero-cta-group {
        flex-direction: column;
        gap: 10px;
    }
    .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-left: 15px;
        padding-right: 15px;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__section-description {
        font-size: 1em;
    }
    .page-resources__container,
    .page-resources__section,
    .page-resources__faq-item,
    .page-resources__video-section,
    .page-resources__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-resources__image,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__list-item {
        padding: 15px;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 10px 20px 20px 20px;
    }
    .page-resources__video-wrapper {
        margin-left: 0;
        margin-right: 0;
        padding-bottom: 56.25% !important; /* Ensure aspect ratio */
    }
}

/* Ensure content area images are not too small */
.page-resources__content-block img {
    min-width: 200px;
    min-height: 200px;
}
@media (max-width: 768px) {
    .page-resources__content-block img {
        min-width: unset; /* Allow smaller display on mobile if max-width: 100% scales it down */
        min-height: unset;
    }
}
/* Ensure no CSS filter on images */
.page-resources img {
    filter: none !important;
}