/* style/resources.css */

.page-resources {
    color: #ffffff; /* Default text color for dark body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: transparent; /* Main content background is transparent to show body background */
}

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Increased height for better visual impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 0; /* Assumed shared.css handles body padding-top */
}

.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.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

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

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

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

/* General Section Styling */
.page-resources__section {
    padding: 80px 0;
    background-color: #1a1a2e; /* Dark background for sections */
}

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

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

.page-resources__section-description {
    font-size: 1.1em;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Why Choose Us Section */
.page-resources__why-choose-us {
    background-color: #1a1a2e; /* Ensure dark background */
}

.page-resources__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-resources__feature-item {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter dark background for cards */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__feature-item:hover {
    transform: translateY(-10px);
}

.page-resources__feature-image {
    width: 100%; /* Ensure images fill their containers */
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Min image size requirement */
    min-height: 200px; /* Min image size requirement */
}

.page-resources__feature-title {
    font-size: 1.8em;
    color: #017439; /* Brand color for feature titles */
    margin-bottom: 15px;
}

.page-resources__feature-text {
    color: #f0f0f0;
}

/* Game Guides Section */
.page-resources__game-guides {
    background-color: #0d0d1e; /* Even darker background for contrast */
}

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

.page-resources__guide-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__guide-card:hover {
    transform: translateY(-10px);
}

.page-resources__guide-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    min-width: 200px; /* Min image size requirement */
    min-height: 200px; /* Min image size requirement */
}

.page-resources__guide-content {
    padding: 25px;
}

.page-resources__guide-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.page-resources__guide-title a {
    color: #017439; /* Brand color for linked titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__guide-title a:hover {
    color: #ffffff;
}

.page-resources__guide-text {
    color: #f0f0f0;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.page-resources__btn-text {
    color: #ffffff;
    background-color: #017439;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.page-resources__btn-text:hover {
    background-color: #029d4d;
}

/* News & Updates Section */
.page-resources__news-updates {
    background-color: #1a1a2e;
}

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

.page-resources__news-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__news-card:hover {
    transform: translateY(-10px);
}

.page-resources__news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-resources__news-content {
    padding: 25px;
}

.page-resources__news-title {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.page-resources__news-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__news-title a:hover {
    color: #ffffff;
}

.page-resources__news-text {
    color: #f0f0f0;
    margin-bottom: 20px;
    font-size: 0.95em;
}

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

.page-resources__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    background-color: #017439; /* Brand color for question background */
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

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

.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); /* Rotate for minus sign effect */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.03); /* Slightly transparent white for answer background */
    color: #f0f0f0;
}

.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;
    color: #f0f0f0;
}

/* Call to Action Bottom */
.page-resources__cta-bottom {
    background-color: #017439; /* Brand color background */
    text-align: center;
    padding: 60px 0;
}

.page-resources__cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-resources__cta-title {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 20px;
}

.page-resources__cta-description {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 40px;
}

/* Buttons */
.page-resources__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Specific color for register/login */
    color: #FFFF00; /* Specific font color for register/login */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-primary:hover {
    background-color: #d82e2e;
    transform: translateY(-2px);
}

.page-resources__btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-resources__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
    transform: translateY(-2px);
}

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

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

    .page-resources__section-title {
        font-size: 2em;
    }

    .page-resources__hero-section {
        height: 500px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-resources__hero-section {
        height: 450px;
        padding-top: 0 !important; /* If shared already handles body padding, this should be 0 */
    }

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

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

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

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

    .page-resources__container {
        padding: 0 15px;
    }

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

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

    /* 产品展示图区域 / Feature Grid */
    .page-resources__feature-grid,
    .page-resources__guide-grid,
    .page-resources__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources__feature-item,
    .page-resources__guide-card,
    .page-resources__news-card {
        padding: 20px;
    }

    .page-resources__feature-image,
    .page-resources__guide-image,
    .page-resources__news-image {
        height: 200px; /* Adjust height for mobile */
        min-width: 200px;
        min-height: 200px;
    }

    .page-resources__feature-title,
    .page-resources__guide-title,
    .page-resources__news-title {
        font-size: 1.3em;
    }
    
    .page-resources__guide-title a,
    .page-resources__news-title a {
        color: #017439; /* Ensure link color is visible */
    }

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

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

    /* 按钮与按钮容器 */
    .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__hero-cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex; /* Ensure flex behavior */
        flex-direction: column; /* Stack buttons vertically */
    }

    /* FAQ Section */
    .page-resources__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }

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

    /* CTA Bottom */
    .page-resources__cta-title {
        font-size: 1.8em;
    }

    .page-resources__cta-description {
        font-size: 1em;
    }
}