/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-color: #C30808;
    --login-color: #C30808;
    --register-login-font-color: #FFFF00;
    --text-on-dark-bg: #FFFFFF;
    --text-on-light-bg: #333333;
    --card-bg-dark: rgba(255, 255, 255, 0.1);
    --card-bg-light: #ffffff;
}

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark-bg); /* Body background is dark #1a1a1a */
    background-color: transparent; /* Inherit from body or shared */
}

.page-resources__section {
    padding: 60px 0;
    margin-bottom: 20px;
    background-color: transparent;
}

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

.page-resources__section-title {
    font-size: 36px;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.page-resources__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-resources__content-block {
    margin-bottom: 30px;
}

.page-resources p {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-on-dark-bg);
}

.page-resources__list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-on-dark-bg);
}

.page-resources__list li {
    margin-bottom: 10px;
    font-size: 18px;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary,
.page-resources__btn-text {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

.page-resources__btn-primary {
    background-color: var(--register-color);
    color: var(--register-login-font-color);
    border: 2px solid var(--register-color);
}

.page-resources__btn-primary:hover {
    background-color: #a00606; /* Darken #C30808 */
    border-color: #a00606;
}

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

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

.page-resources__btn-text {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 0;
    font-size: 16px;
    text-decoration: underline;
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 600px;
    padding-top: 0; /* Assumes shared.css sets body padding-top: var(--header-offset) */
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d26 100%);
    overflow: hidden;
    padding-bottom: 60px;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-left: 80px;
    color: var(--secondary-color);
}

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

.page-resources__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.page-resources__hero-cta {
    display: flex;
    gap: 15px;
}

.page-resources__hero-image-wrapper {
    position: relative;
    z-index: 1;
    width: 50%;
    display: flex;
    justify-content: flex-end;
    padding-right: 80px;
}

.page-resources__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

/* Introduction Section */
.page-resources__introduction-section {
    background-color: #1a1a1a; /* Dark background */
    color: var(--text-on-dark-bg);
    padding: 80px 0;
}

.page-resources__introduction-section .page-resources__container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.page-resources__introduction-section .page-resources__content-block {
    flex: 1;
}

.page-resources__introduction-section .page-resources__image-content {
    flex: 0 0 450px;
    max-width: 450px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Main Resources Grid */
.page-resources__main-resources {
    background-color: #0d0d0d; /* Slightly darker */
    padding: 80px 0;
}

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

.page-resources__resource-card {
    background-color: var(--card-bg-dark);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.page-resources__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__card-title a:hover {
    color: var(--secondary-color);
}

.page-resources__card-image {
    max-width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Ensure min size */
    min-height: 200px; /* Ensure min size */
}

.page-resources__card-content p {
    font-size: 16px;
    color: var(--text-on-dark-bg);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Utilization Section */
.page-resources__utilization-section {
    background-color: #1a1a1a;
    padding: 80px 0;
}

.page-resources__utilization-section .page-resources__content-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.page-resources__utilization-section .page-resources__btn-primary {
    margin-top: 30px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.page-resources__faq-section {
    background-color: #0d0d0d;
    padding: 80px 0;
}

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

.page-resources__faq-item {
    background-color: var(--card-bg-dark);
    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;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-question h3 {
    margin: 0;
    font-size: 20px;
    color: var(--secondary-color);
}

.page-resources__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

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

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

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

.page-resources__faq-answer p {
    font-size: 16px;
    color: var(--text-on-dark-bg);
    margin-bottom: 0;
}

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

.page-resources__conclusion-section .page-resources__section-title {
    color: var(--secondary-color);
}

.page-resources__conclusion-section .page-resources__section-title::after {
    background-color: var(--secondary-color);
}

.page-resources__conclusion-section p {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 18px;
    color: var(--secondary-color);
}

/* Global image reset for content area - must not affect logo-item */
.page-resources img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Ensure content area images are at least 200x200 if not specified */
    min-width: 200px;
    min-height: 200px;
}

/* --- Responsive Styles --- */

@media (max-width: 1024px) {
    .page-resources__hero-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-resources__hero-content {
        padding: 0 40px;
        max-width: 100%;
        margin-bottom: 40px;
    }

    .page-resources__hero-image-wrapper {
        width: 80%;
        padding-right: 0;
        justify-content: center;
    }

    .page-resources__introduction-section .page-resources__container {
        flex-direction: column;
        text-align: center;
    }

    .page-resources__introduction-section .page-resources__image-content {
        max-width: 100%;
        margin-top: 30px;
    }

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

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

    .page-resources__resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }

    /* HERO 主图区域 */
    .page-resources__hero-section {
        padding-top: 0 !important; /* Ensure no double padding if shared.css adds it */
        padding-left: 15px;
        padding-right: 15px;
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-bottom: 40px;
    }

    .page-resources__hero-content {
        padding: 0 15px !important;
        max-width: 100% !important;
        margin-bottom: 30px !important;
    }

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

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

    .page-resources__hero-cta {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 12px 20px !important;
    }

    .page-resources__hero-image-wrapper {
        width: 100% !important;
        padding-right: 0 !important;
        justify-content: center !important;
    }

    .page-resources__hero-image {
        max-width: 100% !important;
        height: auto !important;
        min-width: 200px !important; /* Ensure minimum size */
        min-height: 200px !important;
    }

    /* LOGO 轮播区域 (Not present on this page, but if it were, this would apply) */
    /* .page-resources__logo-item { */
    /*     width: 80px !important; */
    /*     height: 80px !important; */
    /*     max-width: 80px !important; */
    /*     min-width: 80px !important; */
    /*     min-height: 80px !important; */
    /*     flex-shrink: 0; */
    /* } */

    /* 游戏展示区域 (Main Resources Grid) */
    .page-resources__main-resources .page-resources__container {
        padding: 0 15px !important;
    }
    .page-resources__resource-grid {
        grid-template-columns: 1fr !important; /* Single column */
        gap: 20px !important;
    }
    .page-resources__resource-card {
        padding: 20px !important;
    }
    .page-resources__card-image {
        height: 180px !important; /* Adjust height for mobile */
        min-width: 200px !important;
        min-height: 180px !important;
    }
    .page-resources__card-title {
        font-size: 20px !important;
    }
    .page-resources__card-content p {
        font-size: 15px !important;
    }

    /* 通用图片与容器 */
    .page-resources img:not(.page-resources__logo-item) {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    .page-resources__container,
    .page-resources__content-block,
    .page-resources__introduction-section .page-resources__image-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 按钮与按钮容器 */
    .page-resources__cta-button,
    .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,
    .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;
      flex-direction: column; /* Ensure vertical stacking for multiple buttons */
    }

    /* 其他内容模块 (Introduction, Utilization, FAQ, Conclusion) */
    .page-resources__section {
        padding: 40px 0 !important;
    }
    .page-resources__section-title {
        font-size: 28px !important;
        margin-bottom: 30px !important;
    }
    .page-resources p,
    .page-resources__list li {
        font-size: 16px !important;
    }
    .page-resources__introduction-section .page-resources__container {
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 15px !important;
    }
    .page-resources__introduction-section .page-resources__image-content {
        flex: none !important;
        max-width: 100% !important;
        margin-top: 20px !important;
    }
    .page-resources__faq-question h3 {
        font-size: 18px !important;
    }
    .page-resources__faq-question,
    .page-resources__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .page-resources__conclusion-section p {
        font-size: 16px !important;
    }
}