.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default white */
}

/* --- Hero Section --- */
.page-contact__hero-section {
    padding-top: 10px; /* Small top padding as per rule */
    padding-bottom: 40px;
    background-color: #f8f8f8;
    text-align: center;
}

.page-contact__hero-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-contact__main-title {
    font-size: clamp(2em, 4vw, 2.8em); /* Using clamp for H1 font size */
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: bold;
    line-height: 1.2;
}

.page-contact__intro-text {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555555;
}

.page-contact__cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Ensure buttons wrap on smaller screens */
}

.page-contact__btn-primary,
.page-contact__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    max-width: 100%; /* Button responsiveness */
    box-sizing: border-box; /* Button responsiveness */
    white-space: normal; /* Button responsiveness */
    word-wrap: break-word; /* Button responsiveness */
    text-align: center;
}

.page-contact__btn-primary {
    background-color: #26A9E0;
    color: #FFFFFF;
    border: 2px solid #26A9E0;
}

.page-contact__btn-primary:hover {
    background-color: #1a8ccb;
    border-color: #1a8ccb;
}

.page-contact__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-contact__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #1a8ccb;
    border-color: #1a8ccb;
}

/* --- Section Titles & Descriptions --- */
.page-contact__section-title {
    font-size: clamp(1.8em, 3.5vw, 2.5em);
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.page-contact__section-description {
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    font-size: 1.05em;
    color: #555555;
    padding: 0 20px;
}

/* --- Contact Methods Section --- */
.page-contact__contact-methods-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

.page-contact__methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-contact__method-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-contact__method-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.page-contact__method-icon {
    width: 100%; /* Ensure images take full width of card */
    height: auto;
    max-height: 250px; /* Max height for consistent card appearance */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Important for responsiveness */
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-contact__method-title {
    font-size: 1.5em;
    color: #26A9E0;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-contact__method-description {
    font-size: 1em;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
}

.page-contact__method-btn {
    background-color: #EA7C07; /* Login color for contact buttons */
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Button responsiveness */
    box-sizing: border-box; /* Button responsiveness */
    white-space: normal; /* Button responsiveness */
    word-wrap: break-word; /* Button responsiveness */
    text-align: center;
}

.page-contact__method-btn:hover {
    background-color: #c96706;
}

/* --- Contact Form Section --- */
.page-contact__contact-form-section {
    padding: 60px 0;
    background-color: #f0f7fa;
}

.page-contact__form-content-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: flex-start;
}

.page-contact__form-text-side {
    flex: 1;
    padding-right: 20px;
}

.page-contact__form-illustration {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    margin-top: 30px;
    display: block; /* Important for responsiveness */
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-contact__form-side {
    flex: 1;
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.page-contact__contact-form {
    display: flex;
    flex-direction: column;
}

.page-contact__form-group {
    margin-bottom: 20px;
}

.page-contact__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333333;
}

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #26A9E0;
    outline: none;
    box-shadow: 0 0 5px rgba(38, 169, 224, 0.3);
}

.page-contact__form-textarea {
    resize: vertical;
}

.page-contact__form-submit-btn {
    background-color: #26A9E0;
    color: #FFFFFF;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Button responsiveness */
    box-sizing: border-box; /* Button responsiveness */
    white-space: normal; /* Button responsiveness */
    word-wrap: break-word; /* Button responsiveness */
    text-align: center;
}

.page-contact__form-submit-btn:hover {
    background-color: #1a8ccb;
}

/* --- FAQ Section --- */
.page-contact__faq-section {
    padding: 60px 0;
    background-color: #FFFFFF;
}

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

.page-contact__faq-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden; /* For smooth transition */
}

.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.15em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #eaf6fc;
    border-bottom: 1px solid #d0e8f5;
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default details marker */
}

.page-contact__faq-question::-webkit-details-marker {
    display: none; /* Hide default details marker */
}

.page-contact__faq-question:hover {
    background-color: #d0e8f5;
}

.page-contact__faq-item[open] .page-contact__faq-question {
    background-color: #26A9E0;
    color: #FFFFFF;
    border-bottom-color: #1a8ccb;
}

.page-contact__faq-item[open] .page-contact__faq-toggle {
    color: #FFFFFF;
}

.page-contact__faq-qtext {
    flex-grow: 1;
}

.page-contact__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #26A9E0;
    transition: transform 0.3s ease;
}

.page-contact__faq-item[open] .page-contact__faq-toggle {
    transform: rotate(45deg); /* Change + to X-like */
}

.page-contact__faq-answer {
    padding: 20px;
    font-size: 1em;
    color: #555555;
    background-color: #fdfdfd;
    border-top: 1px solid #eee;
}

.page-contact__faq-answer p {
    margin-bottom: 0;
}

.page-contact__faq-cta {
    text-align: center;
    margin-top: 40px;
}

/* --- Final CTA Section --- */
.page-contact__final-cta-section {
    padding: 60px 0;
    background-color: #26A9E0;
    color: #FFFFFF;
    text-align: center;
}

.page-contact__final-cta-section .page-contact__section-title,
.page-contact__final-cta-section .page-contact__section-description {
    color: #FFFFFF;
}

.page-contact__final-cta-section .page-contact__btn-primary {
    background-color: #EA7C07; /* Login color for primary CTA */
    border-color: #EA7C07;
}

.page-contact__final-cta-section .page-contact__btn-primary:hover {
    background-color: #c96706;
    border-color: #c96706;
}

.page-contact__final-cta-section .page-contact__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0;
    border-color: #FFFFFF;
}

.page-contact__final-cta-section .page-contact__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #1a8ccb;
    border-color: #e0f2f7;
}

/* --- General Image Styles --- */
.page-contact img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    min-width: 200px; /* Global minimum size */
    min-height: 200px; /* Global minimum size */
}

/* --- Responsive Styles (Mobile: max-width: 768px) --- */
@media (max-width: 768px) {
    .page-contact {
        font-size: 16px;
        line-height: 1.6;
    }

    /* 1. 顶区标题 + 双 CTA */
    .page-contact__hero-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 30px;
    }

    .page-contact__hero-content-wrapper {
        padding: 0 15px;
    }

    .page-contact__main-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .page-contact__intro-text {
        font-size: 1em;
        margin-bottom: 20px;
    }

    .page-contact__cta-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact__method-btn,
    .page-contact__form-submit-btn,
    .page-contact__faq-cta .page-contact__btn-primary,
    .page-contact__final-cta-section .page-contact__btn-primary,
    .page-contact__final-cta-section .page-contact__btn-secondary {
        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;
    }

    /* Section titles and descriptions */
    .page-contact__section-title {
        font-size: 1.6em;
        margin-bottom: 15px;
        padding: 0 15px;
    }

    .page-contact__section-description {
        font-size: 0.95em;
        margin-bottom: 25px;
        padding: 0 15px;
    }

    /* 2. 单栏长文容器 (general sections) */
    .page-contact__contact-methods-section,
    .page-contact__contact-form-section,
    .page-contact__faq-section,
    .page-contact__final-cta-section {
        padding: 40px 0;
    }

    .page-contact__methods-grid {
        grid-template-columns: 1fr; /* Single column layout */
        padding: 0 15px;
        gap: 20px;
    }

    .page-contact__method-card {
        padding: 20px;
    }

    /* Contact Form Section (stack content vertically) */
    .page-contact__form-content-wrapper {
        flex-direction: column;
        gap: 30px;
        padding: 0 15px;
    }

    .page-contact__form-text-side {
        padding-right: 0;
    }

    .page-contact__form-illustration {
        margin-top: 20px;
    }

    .page-contact__form-side {
        padding: 20px;
    }

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

    /* All containers that might hold images or other content */
    .page-contact__hero-content-wrapper,
    .page-contact__methods-grid,
    .page-contact__method-card,
    .page-contact__form-content-wrapper,
    .page-contact__form-text-side,
    .page-contact__form-side,
    .page-contact__contact-form,
    .page-contact__faq-list,
    .page-contact__faq-item,
    .page-contact__faq-question,
    .page-contact__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Default padding for content within sections */
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Override padding for specific items that already have it in desktop, to allow children full width */
    .page-contact__methods-grid,
    .page-contact__form-content-wrapper,
    .page-contact__faq-list {
        padding-left: 0;
        padding-right: 0;
    }
    /* Specific padding for form side if it was removed by above */
    .page-contact__form-side {
        padding-left: 20px; /* Restore internal padding for form card */
        padding-right: 20px;
    }
    .page-contact__faq-question, .page-contact__faq-answer {
        padding-left: 20px;
        padding-right: 20px;
    }


    /* 4. 按钮与按钮容器 (already covered by common button styles, but re-emphasize) */
    /* The common button styles for mobile are already applied globally to all buttons */
    /* .page-contact__cta-group (flex-direction: column) handles button stacking */

    /* 5. 注册教程与 FAQ 区块 (FAQ covered) */
    .page-contact__faq-list {
        padding: 0 15px;
    }
    .page-contact__faq-question {
        font-size: 1em;
        padding: 15px;
    }
    .page-contact__faq-answer {
        font-size: 0.95em;
        padding: 15px;
    }
}