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

/* General page styling */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #ffffff; /* Default light body background */
}

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

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

.page-resources__dark-bg {
    background-color: #017439;
    color: #ffffff;
}

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

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

.page-resources__section-description {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: inherit; /* Inherit color from section background */
}

.page-resources__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: inherit;
    text-align: left;
}

.page-resources p {
    margin-bottom: 1em;
    color: inherit;
    text-align: left;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding-top: var(--header-offset, 120px); /* Fixed header spacing */
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

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

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
    border-radius: 10px;
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-resources__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-resources__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-resources__btn-secondary:hover {
    background-color: #017439;
    color: #ffffff;
    border-color: #ffffff;
}

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

.page-resources__card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    color: #333333;
}

.page-resources__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #017439;
}

.page-resources__card p {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1;
    color: #555555;
}

.page-resources__card-link {
    display: inline-flex;
    align-items: center;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources__card-link:hover {
    color: #005f2e;
}

.page-resources__arrow {
    margin-left: 8px;
    font-size: 1.2em;
    line-height: 1;
}

/* Media Content Sections (Guides, Strategies) */
.page-resources__media-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.page-resources__media-content--reverse {
    flex-direction: row-reverse;
}

.page-resources__media-content img {
    flex: 1;
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    min-width: 200px; /* Ensure minimum size */
}

.page-resources__text-content {
    flex: 1;
    max-width: 50%;
}

.page-resources__image-left {
    margin-right: 20px;
}

.page-resources__image-right {
    margin-left: 20px;
}

.page-resources__image-center,
.page-resources__image-bottom {
    display: block;
    margin: 40px auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    min-width: 200px; /* Ensure minimum size */
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__faq-item {
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #333333;
    text-align: left;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    font-size: 1.2em;
    margin: 0;
    color: #017439;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #017439;
    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, padding 0.3s ease;
    background-color: #ffffff;
}

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

.page-resources__faq-answer p {
    margin: 0 0 10px 0;
    color: #555555;
}

.page-resources__faq-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.page-resources__faq-link:hover {
    color: #005f2e;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3em;
    }
    .page-resources__hero-description {
        font-size: 1.1em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__sub-title {
        font-size: 1.6em;
    }
    .page-resources__media-content {
        flex-direction: column;
    }
    .page-resources__media-content img,
    .page-resources__text-content {
        max-width: 100%;
    }
    .page-resources__image-left,
    .page-resources__image-right {
        margin: 0 auto 20px auto;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure spacing on mobile */
        min-height: 400px;
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-resources__sub-title {
        font-size: 1.4em;
    }
    .page-resources__grid {
        grid-template-columns: 1fr;
    }
    .page-resources__card {
        padding: 20px;
    }
    .page-resources__media-content {
        gap: 20px;
    }
    .page-resources__media-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-resources__image-center,
    .page-resources__image-bottom {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Ensure all images and containers prevent horizontal scroll */
    .page-resources img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__media-content,
    .page-resources__text-content,
    .page-resources__faq-list,
    .page-resources__faq-item,
    .page-resources__cta-buttons {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      overflow-x: hidden !important; /* Prevent content overflow */
    }
    /* Adjust padding for sections that might have full-width background but content constrained */
    .page-resources__hero-section,
    .page-resources__overview,
    .page-resources__guides,
    .page-resources__strategies,
    .page-resources__news-updates,
    .page-resources__policies,
    .page-resources__faq,
    .page-resources__contact {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-resources__hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}