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

/* General Section Styling */
.page-resources__section {
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.page-resources__section-title {
    font-size: 36px;
    font-weight: bold;
    color: #017439; /* Brand color for titles on light backgrounds */
    text-align: center;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.page-resources__section-intro {
    font-size: 18px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0; /* Slightly off-white for better readability on dark */
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    overflow: hidden;
    text-align: center;
    padding-top: 0; /* Assuming shared.css handles body padding-top */
    padding-bottom: 80px;
    background: #1a1a2e; /* Fallback for image */
}

.page-resources__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 1;
}

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

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
}

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

.page-resources__hero-description {
    font-size: 20px;
    color: #f0f0f0;
    max-width: 700px;
    margin: 0 auto 40px auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* CTA Buttons */
.page-resources__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.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: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

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

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

.page-resources__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

/* Card Styling */
.page-resources__grid {
    display: grid;
    gap: 30px;
}

.page-resources__grid--3-cols {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.page-resources__grid--2-cols {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.page-resources__card {
    background: rgba(255, 255, 255, 0.08); /* Light transparent background on dark body */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #ffffff;
}

.page-resources__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.page-resources__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-resources__card-title {
    font-size: 22px;
    font-weight: bold;
    color: #017439; /* Brand color for card titles */
    margin: 20px 20px 10px 20px;
}

.page-resources__card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: #00a040; /* Slightly lighter green on hover */
}

.page-resources__card-text {
    font-size: 16px;
    color: #f0f0f0;
    padding: 0 20px 20px 20px;
    flex-grow: 1;
}

.page-resources__card--news .page-resources__card-text {
    font-size: 15px;
}


/* Dark Background Sections */
.page-resources__dark-bg {
    background: #1a1a2e;
    color: #ffffff;
}

.page-resources__dark-bg .page-resources__section-title {
    color: #017439; /* Brand color on dark background for titles */
}

.page-resources__dark-bg .page-resources__card {
    background: rgba(255, 255, 255, 0.08);
}

.page-resources__dark-bg .page-resources__card-title {
    color: #017439;
}

.page-resources__dark-bg .page-resources__card-text {
    color: #f0f0f0;
}

/* Content Block (for rules and gameplay section) */
.page-resources__content-block {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    color: #ffffff;
}

.page-resources__content-subtitle {
    font-size: 28px;
    font-weight: bold;
    color: #017439;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-resources__content-subtitle:first-of-type {
    margin-top: 0;
}

.page-resources__text-block {
    font-size: 16px;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-resources__content-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
    display: block; /* Ensure it behaves as a block element */
}

.page-resources__list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.page-resources__list-item {
    font-size: 16px;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: #f0f0f0;
}

.page-resources__list-item::before {
    content: '✓';
    color: #017439;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* CTA Block (inside platform guide) */
.page-resources__cta-block {
    background: rgba(1, 116, 57, 0.15); /* Transparent brand color */
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-top: 50px;
}

.page-resources__cta-block .page-resources__cta-text {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 30px;
}

.page-resources__cta-block .page-resources__btn-primary {
    background: #C30808; /* Register button color */
    color: #FFFF00; /* Register font color */
    border-color: #C30808;
}

.page-resources__cta-block .page-resources__btn-primary:hover {
    background: #9d0606;
    border-color: #9d0606;
}

/* Final CTA Section */
.page-resources__cta-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    overflow: hidden;
    text-align: center;
    padding: 80px 0;
}

.page-resources__cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay */
    z-index: 1;
}

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

.page-resources__cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

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

.page-resources__cta-description {
    font-size: 20px;
    color: #f0f0f0;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background: #1a1a2e; /* Ensure dark background for this section */
    color: #ffffff;
}

.page-resources__faq-section .page-resources__section-title {
    color: #017439;
}

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

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15); /* Slightly lighter for question area */
    transition: background 0.3s ease;
}

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

.page-resources__faq-heading {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #017439;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(45deg);
    color: #FFFF00; /* Yellow for active toggle */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}

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

.page-resources__faq-answer p {
    margin: 0;
    font-size: 16px;
}

/* General image and content area responsive rules for mobile */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

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

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

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

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

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

    .page-resources__faq-heading {
        font-size: 17px;
    }

    .page-resources__faq-answer p {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    /* HERO 主图区域 */
    .page-resources__hero-section {
        min-height: 450px;
        padding-bottom: 60px;
        padding-top: 0; /* Ensures no double padding if shared.css handles body */
    }

    .page-resources__hero-title {
        font-size: 32px !important;
        margin-bottom: 15px !important;
    }

    .page-resources__hero-description {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }

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

    .page-resources__section-title {
        font-size: 26px !important;
        margin-bottom: 15px !important;
    }

    .page-resources__section-intro {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }

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

    /* 游戏展示区域 (Grid) */
    .page-resources__grid--3-cols,
    .page-resources__grid--2-cols {
        grid-template-columns: 1fr !important; /* Single column layout */
    }

    .page-resources__card-image {
        height: 200px !important; /* Adjust height for mobile */
    }

    .page-resources__card-title {
        font-size: 18px !important;
        margin: 15px 15px 8px 15px !important;
    }

    .page-resources__card-text {
        font-size: 14px !important;
        padding: 0 15px 15px 15px !important;
    }

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

    .page-resources__content-subtitle {
        font-size: 22px !important;
    }

    .page-resources__text-block {
        font-size: 15px !important;
    }

    .page-resources__list-item {
        font-size: 15px !important;
    }

    /* 按钮与按钮容器 */
    .page-resources__cta-buttons {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
        padding: 0 15px !important; /* Add padding to container */
    }

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

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

    /* LOGO 轮播区域 - Not present in this page */

    .page-resources__cta-block {
        padding: 30px 20px !important;
    }

    .page-resources__cta-block .page-resources__cta-text {
        font-size: 18px !important;
    }

    /* Final CTA Section */
    .page-resources__cta-section {
        min-height: 350px !important;
        padding: 60px 0 !important;
    }

    .page-resources__cta-title {
        font-size: 28px !important;
    }

    .page-resources__cta-description {
        font-size: 16px !important;
    }

    /* FAQ Section */
    .page-resources__faq-section {
        padding: 50px 0 !important;
    }

    .page-resources__faq-item {
        margin-bottom: 10px !important;
    }

    .page-resources__faq-question {
        padding: 15px 20px !important;
    }

    .page-resources__faq-heading {
        font-size: 16px !important;
    }

    .page-resources__faq-toggle {
        font-size: 20px !important;
    }

    .page-resources__faq-answer {
        padding: 0 20px !important;
    }

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

    .page-resources__faq-answer p {
        font-size: 15px !important;
    }
}