/* style/resources.css */

:root {
    --primary-color: #0056b3;
    --secondary-color: #ffc107;
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --background-light: #f8f9fa;
    --background-dark: #004085;
    --border-color: #e0e0e0;
}

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

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

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

.page-resources__section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.page-resources__section-description {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-color-dark);
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: 2px solid var(--primary-color);
}

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

.page-resources__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.page-resources__btn-center {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 300px;
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    padding-top: 0; /* Assuming shared.css handles body padding-top */
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
    background-color: var(--background-dark);
    overflow: hidden;
}

.page-resources__hero-container {
    position: relative;
    width: 100%;
    height: 600px; /* Fixed height for hero on desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6); /* Slightly darken image for text readability */
}

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

.page-resources__hero-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--secondary-color);
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 22px;
    margin-bottom: 30px;
    line-height: 1.5;
    color: var(--text-color-light);
}

.page-resources__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Introduction Section */
.page-resources__introduction-section {
    background-color: var(--background-light);
}

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

.page-resources__feature-card {
    background-color: var(--text-color-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-resources__feature-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-resources__feature-text {
    font-size: 16px;
    color: var(--text-color-dark);
    margin-bottom: 20px;
}

.page-resources__feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-resources__feature-link:hover {
    color: var(--secondary-color);
}

/* Game Guide Section & News Updates Section */
.page-resources__game-guide-section,
.page-resources__news-updates-section {
    background-color: var(--text-color-light);
}

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

.page-resources__content-card,
.page-resources__promotion-card,
.page-resources__news-card {
    background-color: var(--text-color-light);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__content-card:hover,
.page-resources__promotion-card:hover,
.page-resources__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.page-resources__content-image,
.page-resources__promotion-image,
.page-resources__news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-resources__content-card-title,
.page-resources__promotion-title,
.page-resources__news-title {
    font-size: 22px;
    color: var(--primary-color);
    padding: 20px 20px 10px 20px;
    margin: 0;
}

.page-resources__content-card-text,
.page-resources__promotion-text,
.page-resources__news-excerpt {
    font-size: 16px;
    color: var(--text-color-dark);
    padding: 0 20px 20px 20px;
    margin: 0;
}

.page-resources__content-card .page-resources__btn-primary,
.page-resources__promotion-card .page-resources__btn-primary,
.page-resources__news-card .page-resources__news-link {
    margin: 0 20px 20px 20px;
    display: block;
    width: calc(100% - 40px);
}

.page-resources__news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-resources__news-link:hover {
    color: var(--secondary-color);
}

/* Promotions Analysis Section (Dark Background) */
.page-resources__promotions-analysis-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__promotions-analysis-section .page-resources__section-title,
.page-resources__promotions-analysis-section .page-resources__section-description {
    color: var(--text-color-light);
}

.page-resources__promotions-analysis-section .page-resources__promotion-title {
    color: var(--secondary-color);
}

.page-resources__promotions-analysis-section .page-resources__promotion-text {
    color: var(--text-color-light);
}

.page-resources__promotions-analysis-section .page-resources__btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.page-resources__promotions-analysis-section .page-resources__btn-primary:hover {
    background-color: #e0ac00;
    border-color: #e0ac00;
}

/* Security Guide Section */
.page-resources__security-guide-section {
    background-color: var(--background-light);
}

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

.page-resources__security-item {
    background-color: var(--text-color-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

.page-resources__security-item-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-resources__security-item-text {
    font-size: 16px;
    color: var(--text-color-dark);
}

/* News Updates Section (Light Background) */
.page-resources__news-updates-section {
    background-color: var(--text-color-light);
}

/* CTA Section */
.page-resources__cta-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    text-align: center;
    padding: 80px 0;
}

.page-resources__cta-container {
    max-width: 900px;
}

.page-resources__cta-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.page-resources__cta-description {
    font-size: 20px;
    margin-bottom: 40px;
    color: var(--text-color-light);
}

.page-resources__cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: var(--background-light);
}

.page-resources__faq-list {
    margin-top: 40px;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.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 15px;
    opacity: 0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 2000px !important; /* Use !important to ensure priority, large value for content */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-resources__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-resources__faq-question:active {
    background: #eeeeee;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: var(--text-color-dark);
}

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

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

/* General Image Responsiveness */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Media Queries for Responsiveness */

@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 42px;
    }

    .page-resources__hero-description {
        font-size: 20px;
    }

    .page-resources__section-title {
        font-size: 32px;
    }

    .page-resources__section-description {
        font-size: 17px;
    }

    .page-resources__cta-title {
        font-size: 36px;
    }

    .page-resources__cta-description {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-resources__hero-section {
        padding-top: 0 !important; /* Assuming shared.css handles body padding-top */
        padding-bottom: 0 !important;
        margin-top: 0 !important;
    }

    .page-resources__hero-container {
        height: 400px; /* Adjust height for mobile */
    }

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

    .page-resources__hero-title {
        font-size: 32px;
    }

    .page-resources__hero-description {
        font-size: 16px;
    }

    .page-resources__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 15px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* 通用图片与容器 */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-resources__container,
    .page-resources__section {
        padding-left: 15px;
        padding-right: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    .page-resources__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    /* Introduction Section */
    .page-resources__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__feature-card {
        padding: 25px;
    }

    .page-resources__feature-title {
        font-size: 20px;
    }

    /* Game Guide Section & Promotions Analysis Section & News Updates Section */
    .page-resources__content-grid,
    .page-resources__promotions-grid,
    .page-resources__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__content-image,
    .page-resources__promotion-image,
    .page-resources__news-image {
        height: 180px;
    }

    .page-resources__content-card-title,
    .page-resources__promotion-title,
    .page-resources__news-title {
        font-size: 20px;
        padding: 15px 15px 8px 15px;
    }

    .page-resources__content-card-text,
    .page-resources__promotion-text,
    .page-resources__news-excerpt {
        font-size: 15px;
        padding: 0 15px 15px 15px;
    }

    .page-resources__content-card .page-resources__btn-primary,
    .page-resources__promotion-card .page-resources__btn-primary,
    .page-resources__news-card .page-resources__news-link {
        margin: 0 15px 15px 15px;
        width: calc(100% - 30px);
    }

    /* Security Guide Section */
    .page-resources__security-points {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__security-item {
        padding: 25px;
    }

    .page-resources__security-item-title {
        font-size: 20px;
    }

    .page-resources__security-item-text {
        font-size: 15px;
    }

    /* CTA Section */
    .page-resources__cta-section {
        padding: 50px 0;
    }

    .page-resources__cta-title {
        font-size: 30px;
    }

    .page-resources__cta-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-resources__cta-actions {
        flex-direction: column;
        gap: 15px;
    }

    /* FAQ Section */
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }

    .page-resources__faq-question h3 {
        font-size: 16px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }

    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }

    .page-resources__faq-answer {
        padding: 0 15px;
    }

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