/* style/resources.css */

/* General styles for the page content */
.page-resources {
    color: #ffffff; /* Light text for dark body background */
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Body background is handled by shared.css */
}

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

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

.page-resources__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-resources__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0; /* Slightly off-white for description */
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    max-width: 100%; /* Ensure buttons don't overflow */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-resources__btn-primary {
    background-color: #26A9E0;
    color: #ffffff;
    border: 2px solid #26A9E0;
}

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-resources__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Hero Section */
.page-resources__hero-section {
    padding-top: 0; /* Assuming shared.css handles body padding-top */
    padding-bottom: 80px;
    background-color: #0a0a0a; /* Explicit dark background for hero */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

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

.page-resources__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle background image */
}

.page-resources__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 20px;
}

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

.page-resources__hero-description {
    font-size: 1.3em;
    color: #f0f0f0;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Guide Section */
.page-resources__guides-section {
    background-color: #1a1a1a; /* Darker background for contrast */
}

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

.page-resources__guide-item {
    background-color: #121212;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

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

.page-resources__guide-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
    object-fit: cover;
}

.page-resources__guide-title {
    font-size: 1.8em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-resources__guide-text {
    font-size: 1em;
    color: #cccccc;
    margin-bottom: 25px;
    flex-grow: 1;
}

.page-resources__button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    width: 100%;
}

/* Tips Section (Dark Background) */
.page-resources__tips-section {
    background-color: #26A9E0; /* Brand primary color as background */
    color: #ffffff; /* White text for brand color background */
}

.page-resources__tips-section .page-resources__section-title {
    color: #ffffff; /* White title on brand color background */
}

.page-resources__tips-section .page-resources__section-description {
    color: #f0f0f0;
}

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

.page-resources__tip-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on brand color */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.page-resources__tip-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
    object-fit: cover;
}

.page-resources__tip-title {
    font-size: 1.8em;
    color: #ffffff;
    margin-bottom: 15px;
}

.page-resources__tip-text {
    font-size: 1em;
    color: #f0f0f0;
    flex-grow: 1;
}

/* News Section */
.page-resources__news-section {
    background-color: #0a0a0a;
}

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

.page-resources__news-item.page-resources__card {
    background-color: #121212;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.page-resources__news-title {
    font-size: 1.8em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-resources__news-text {
    font-size: 1em;
    color: #cccccc;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Security Section (Dark Background) */
.page-resources__security-section {
    background-color: #1a1a1a;
}

.page-resources__security-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-resources__security-image {
    flex: 1;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    min-width: 200px; /* Enforce min image size */
    min-height: 200px; /* Enforce min image size */
    object-fit: cover;
}

.page-resources__security-text-block {
    flex: 2;
}

.page-resources__security-title {
    font-size: 2em;
    color: #26A9E0;
    margin-bottom: 15px;
    margin-top: 30px; /* Adjust spacing for second title */
}

.page-resources__security-title:first-of-type {
    margin-top: 0;
}

.page-resources__security-text {
    font-size: 1em;
    color: #cccccc;
    margin-bottom: 20px;
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: #0a0a0a;
}

.page-resources__faq-list {
    max-width: 800px;
    margin: 40px auto 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 1.2em;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-resources__faq-question:hover {
    color: #26A9E0;
}

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

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg); /* Change to '-' visually */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #cccccc;
}

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

.page-resources__faq-answer p {
    margin-bottom: 10px;
}

/* CTA Section (Dark Background) */
.page-resources__cta-section {
    background-color: #1a1a1a;
    text-align: center;
    padding: 80px 0;
}

.page-resources__cta-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap */
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Mobile Responsiveness --- */
@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;
    }

    .page-resources__security-content {
        flex-direction: column;
        text-align: center;
    }

    .page-resources__security-image {
        max-width: 80%;
    }

    .page-resources__security-text-block {
        flex: none;
        width: 100%;
    }
}


@media (max-width: 768px) {
    /* 1. HERO 主图区域 */
    .page-resources__hero-section {
        padding-top: 0 !important; /* Ensure no double padding if shared handles body */
        padding-bottom: 60px !important;
    }

    .page-resources__hero-content {
        padding: 0 15px !important;
    }

    .page-resources__hero-title {
        font-size: 2.2em !important;
    }

    .page-resources__hero-description {
        font-size: 1em !important;
    }

    /* 2. 产品展示图区域 (Guide Grid) */
    .page-resources__guide-grid {
        grid-template-columns: 1fr !important; /* Single column */
        gap: 20px !important;
    }
    .page-resources__guide-item {
        padding: 20px !important;
    }

    /* 3. 通用图片与容器 */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min image size on mobile */
        min-height: 200px !important; /* Enforce min image size on mobile */
    }

    .page-resources__container,
    .page-resources__section,
    .page-resources__card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-resources__guide-item,
    .page-resources__tip-item,
    .page-resources__news-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. 按钮与按钮容器 */
    .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 !important;
        padding-right: 15px !important;
    }

    .page-resources__button-group,
    .page-resources__cta-buttons {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important; /* Container padding handled by section/container */
        padding-right: 0 !important;
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 10px !important;
    }

    /* 5. 其他内容模块 */
    .page-resources__section {
        padding: 40px 0 !important;
    }

    .page-resources__section-title {
        font-size: 1.8em !important;
    }

    .page-resources__section-description {
        font-size: 0.95em !important;
        margin-bottom: 30px !important;
    }

    .page-resources__tips-grid,
    .page-resources__news-grid {
        grid-template-columns: 1fr !important; /* Single column */
        gap: 20px !important;
    }

    .page-resources__security-content {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .page-resources__security-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-resources__security-title {
        font-size: 1.5em !important;
        margin-top: 20px !important;
    }

    .page-resources__faq-question {
        font-size: 1em !important;
        padding: 15px 0 !important;
    }

    .page-resources__faq-answer {
        padding: 10px 15px !important;
    }
}