/* General styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light background (body is white) */
    background-color: #FFFFFF; /* Explicitly set to match body if not already handled by shared */
}

/* Hero Section */
.page-contact__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding as per rules, assuming body handles --header-offset */
    margin-bottom: 40px;
    text-align: center;
    overflow: hidden; /* Ensure image doesn't overflow */
}

.page-contact__hero-image {
    width: 100%;
    max-height: 675px; /* Limit height for hero image */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-contact__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 675px; /* Ensure image doesn't stretch beyond reasonable height */
}

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

.page-contact__main-title {
    font-size: clamp(2.2rem, 4vw, 3rem); /* Clamp for H1 as per rules */
    font-weight: 700;
    line-height: 1.2;
    color: #017439; /* Brand color for main title */
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.page-contact__description {
    font-size: 1.1rem;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* General Section Styles */
.page-contact__section {
    padding: 40px 0;
    margin-bottom: 20px;
}

.page-contact__section-title {
    font-size: 2rem;
    color: #017439;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

.page-contact__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Why Contact Section */
.page-contact__why-contact p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333333;
}

/* Contact Methods Section */
.page-contact__methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-contact__method-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-contact__method-title {
    font-size: 1.5rem;
    color: #017439;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-contact__method-card p {
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-contact__phone-placeholder {
    font-weight: bold;
    color: #C30808; /* Using red for emphasis */
}

/* Buttons */
.page-contact__btn-primary {
    display: inline-block;
    background-color: #C30808; /* Red for action buttons */
    color: #FFFF00; /* Yellow text for contrast */
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    max-width: 100%; /* Ensure button adapts */
    box-sizing: border-box;
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
    border: none;
    cursor: pointer;
}

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

/* Contact Form */
.page-contact__contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.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: 1rem;
    box-sizing: border-box;
    color: #333333;
    background-color: #f9f9f9;
}

.page-contact__form-textarea {
    resize: vertical;
    min-height: 100px;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #017439;
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 116, 57, 0.2);
}

.page-contact__form-submit-btn {
    align-self: flex-start;
    margin-top: 10px;
}

/* Social Media List */
.page-contact__social-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.page-contact__social-list li {
    margin-bottom: 10px;
}

.page-contact__social-link {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-contact__social-link:hover {
    color: #005f2f;
    text-decoration: underline;
}

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

.page-contact__faq-list {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.page-contact__faq-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.page-contact__faq-item[open] {
    background-color: #f0fdf5; /* Lighter green background when open */
    border-color: #017439;
}

.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #017439;
    cursor: pointer;
    list-style: none; /* Hide default marker */
}

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

.page-contact__faq-toggle {
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 10px;
    color: #017439;
}

.page-contact__faq-item[open] .page-contact__faq-toggle {
    content: "-"; /* Changes to minus when open */
}

.page-contact__faq-answer {
    padding-top: 15px;
    font-size: 0.95rem;
    color: #555555;
    border-top: 1px dashed #e9e9e9;
    margin-top: 15px;
}

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

.page-contact__faq-link {
    color: #C30808; /* Using red for links within FAQ answers */
    text-decoration: none;
    font-weight: bold;
}

.page-contact__faq-link:hover {
    text-decoration: underline;
}

/* Commitment Section */
.page-contact__commitment p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333333;
}

/* Image specific styles */
.page-contact img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-contact__hero-image img {
        max-height: 500px;
    }
    .page-contact__main-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
    .page-contact__section-title {
        font-size: 1.8rem;
    }
    .page-contact__container {
        padding: 0 15px;
    }
}

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

    /* HERO 主图区域 */
    .page-contact__hero-section {
        padding-top: 10px; /* Small top padding for mobile */
        margin-bottom: 30px;
    }
    .page-contact__hero-image {
        max-height: 400px; /* Adjust height for smaller screens */
    }
    .page-contact__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-contact__hero-content {
        padding: 0 15px;
    }
    .page-contact__main-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem); /* Further clamp for mobile */
        margin-bottom: 10px;
    }
    .page-contact__description {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    /* 通用图片与容器 */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-contact__section,
    .page-contact__container,
    .page-contact__method-card,
    .page-contact__contact-form,
    .page-contact__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-contact__section-title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .page-contact__methods-grid {
        grid-template-columns: 1fr; /* Single column for methods on mobile */
        gap: 20px;
    }

    .page-contact__method-card {
        padding: 25px;
    }
    .page-contact__method-title {
        font-size: 1.3rem;
    }
    .page-contact__method-card p {
        font-size: 0.9rem;
    }

    /* 按钮与按钮容器 */
    .page-contact__btn-primary,
    .page-contact a[class*="button"],
    .page-contact 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: 12px 15px; /* Adjust padding for mobile buttons */
        font-size: 0.95rem;
    }

    .page-contact__cta-buttons,
    .page-contact__button-group,
    .page-contact__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 properties apply */
        flex-direction: column; /* Stack buttons vertically on mobile */
    }

    /* FAQ Section */
    .page-contact__faq-section {
        padding: 40px 0;
    }
    .page-contact__faq-item {
        padding: 15px 20px;
    }
    .page-contact__faq-question {
        font-size: 1rem;
    }
    .page-contact__faq-answer {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-contact__hero-image {
        max-height: 300px;
    }
    .page-contact__main-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    .page-contact__description {
        font-size: 0.9rem;
    }
    .page-contact__section-title {
        font-size: 1.3rem;
    }
    .page-contact__method-title {
        font-size: 1.2rem;
    }
    .page-contact__faq-question {
        font-size: 0.95rem;
    }
}