/* style/about.css */

/* Variables and base styles - assuming shared.css provides --primary-color, --secondary-color, etc. */
:root {
    --primary-color: #017439; /* Green */
    --secondary-color: #FFFFFF; /* White */
    --accent-color-register: #C30808; /* Red for register/login */
    --accent-color-login-font: #FFFF00; /* Yellow text for register */
    --text-color-dark: #333333;
    --text-color-light: #ffffff;
    --border-color: #e0e0e0;
    --box-shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-dark: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light backgrounds */
    background-color: var(--secondary-color); /* Default background is white */
}

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

.page-about__section {
    padding: 60px 0;
    text-align: center;
}

.page-about__section-title {
    font-size: 2.8em;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-about__sub-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-about__description-center {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* --- Hero Section --- */
.page-about__hero-section {
    position: relative;
    padding-top: 0; /* Assuming shared.css handles body padding-top */
    padding-bottom: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 600px;
    background-color: var(--primary-color); /* Dark background for hero */
    color: var(--text-color-light); /* Light text for hero */
    text-align: left;
}

.page-about__hero-section.page-about__dark-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
    margin-right: 40px;
}

.page-about__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color-light);
    font-weight: bold;
}

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

.page-about__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-about__hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-about__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Overlay to make text readable */
    display: block;
}

/* --- Buttons --- */
.page-about__btn-primary,
.page-about__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%; /* For responsiveness */
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-about__btn-primary {
    background-color: var(--accent-color-register); /* Red for register */
    color: var(--accent-color-login-font); /* Yellow text for register */
    border: 2px solid var(--accent-color-register);
}

.page-about__btn-primary:hover {
    background-color: #a30606; /* Darker red */
    border-color: #a30606;
}

.page-about__btn-secondary {
    background-color: transparent;
    color: var(--text-color-light);
    border: 2px solid var(--text-color-light);
}

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

.page-about__btn-small {
    padding: 10px 20px;
    font-size: 0.95em;
    margin-top: 20px;
}

/* --- General Content Sections --- */
.page-about__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
}

.page-about__dark-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-about__dark-section .page-about__section-title,
.page-about__dark-section .page-about__sub-title {
    color: var(--text-color-light);
}

.page-about__content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
}

.page-about__content-grid--reverse {
    grid-template-columns: 1fr 1fr; /* Reset for desktop */
}

.page-about__image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    display: block; /* Ensures no extra space below image */
}

/* --- Why Choose Us Section --- */
.page-about__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-about__feature-card {
    background-color: var(--secondary-color); /* White background for cards in dark section */
    color: var(--text-color-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%; /* Ensure cards are same height */
}

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

.page-about__feature-card .page-about__feature-title {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.page-about__feature-image {
    width: 100%;
    height: 200px; /* Fixed height for consistent card image display */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.page-about__feature-description {
    font-size: 1em;
    color: var(--text-color-dark);
    flex-grow: 1; /* Allows description to take up available space */
}

/* --- Join Us Section --- */
.page-about__join-us {
    padding: 80px 0;
}

.page-about__join-us .page-about__section-title {
    color: var(--text-color-light);
}

.page-about__join-us .page-about__description-center {
    color: var(--text-color-light);
}

.page-about__join-us .page-about__cta-buttons {
    justify-content: center;
}

/* --- FAQ Section --- */
.page-about__faq-section {
    text-align: left;
}

.page-about__faq-list {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.page-about__faq-item {
    border-bottom: 1px solid var(--border-color);
}

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.page-about__faq-question:hover {
    color: #005a2e; /* Darker green on hover */
}

.page-about__faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: inherit; /* Inherit color from parent */
}

.page-about__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.page-about__faq-item.active .page-about__faq-toggle {
    transform: rotate(45deg); /* Plus to Minus effect */
}

.page-about__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 1em;
    color: var(--text-color-dark);
    text-align: justify;
}

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

/* --- Responsive Design --- */

@media (max-width: 1024px) {
    .page-about__container {
        padding: 20px 30px;
    }

    .page-about__hero-content {
        max-width: 500px;
        margin-right: 20px;
    }

    .page-about__hero-title {
        font-size: 3em;
    }

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

    .page-about__sub-title {
        font-size: 1.6em;
    }

    .page-about__content-grid {
        gap: 30px;
    }

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

    .page-about__feature-title {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    /* General content area padding and overflow prevention */
    .page-about__section,
    .page-about__container,
    .page-about__text-block {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* HERO 主图区域 */
    .page-about__hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 60px !important; /* Adjusted for mobile header offset */
        padding-bottom: 60px !important;
        min-height: auto;
    }

    .page-about__hero-content {
        margin-right: 0;
        max-width: 100%;
        padding: 0;
    }

    .page-about__hero-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-about__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-about__hero-image-container {
        position: relative;
        height: 250px;
        margin-top: 30px;
    }

    /* 产品展示图区域 (General grid rules apply for content-grid) */
    .page-about__content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-about__content-grid--reverse {
        grid-template-columns: 1fr;
    }

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

    .page-about__image-block {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* 按钮与按钮容器 */
    .page-about__btn-primary,
    .page-about__btn-secondary,
    .page-about a[class*="button"],
    .page-about 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-about__hero-buttons,
    .page-about__cta-buttons {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* 其他内容模块 (e.g., feature cards, FAQ) */
    .page-about__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-about__sub-title {
        font-size: 1.4em;
    }

    .page-about__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-about__feature-card {
        padding: 20px;
        height: auto;
    }

    .page-about__feature-title {
        font-size: 1.2em;
    }

    .page-about__feature-image {
        height: 180px;
    }

    .page-about__faq-question {
        font-size: 1.1em;
        padding: 15px 0;
    }

    .page-about__faq-question h3 {
        font-size: 1.1em;
    }

    .page-about__faq-toggle {
        width: 25px;
        height: 25px;
        font-size: 1.2em;
    }

    .page-about__faq-answer {
        font-size: 0.95em;
    }
}