/* style/contact.css */

/* --- Base Styles for .page-contact scope --- */
.page-contact {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text on light body background #f4f4f4 */
    background-color: #f4f4f4; /* Inherited from shared, but good to be explicit for context */
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

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

.page-contact__section-title {
    font-size: 36px;
    color: #003366; /* Primary brand color */
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-contact__section-title--light {
    color: #ffffff;
}

.page-contact__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    color: #555555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-contact__section-description--light {
    color: #f0f0f0;
}

/* --- Hero Section --- */
.page-contact__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #003366, #1a4a7a); /* Darker blue gradient for depth */
    color: #ffffff;
}

.page-contact__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-contact__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-contact__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.page-contact__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-contact__hero-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 800;
    color: #FFD700; /* Auxiliary color for prominence */
}

.page-contact__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-contact__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #FFD700; /* Auxiliary color for CTA */
    color: #003366; /* Dark text on light button */
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-contact__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Contact Methods Section --- */
.page-contact__methods-section {
    padding: 80px 0;
    background-color: #f9f9f9; /* Light background for contrast */
}

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

.page-contact__method-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    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(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-contact__method-title {
    font-size: 24px;
    color: #003366;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-contact__method-image {
    width: 100%;
    max-width: 250px; /* Constrain image width within card */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-contact__method-text {
    font-size: 16px;
    color: #666666;
    margin-bottom: 25px;
    flex-grow: 1; /* Allows text to take available space */
}

.page-contact__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #003366; /* Primary color for button */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%; /* For responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary:hover {
    background: #004488; /* Slightly lighter blue on hover */
    transform: translateY(-2px);
}

/* --- Contact Form Section --- */
.page-contact__form-section {
    padding: 80px 0;
    background: #003366; /* Dark background */
    color: #ffffff;
}

.page-contact__form-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.page-contact__form-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.page-contact__contact-form {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    max-width: 600px;
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333333;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2);
    outline: none;
}

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

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

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

/* FAQ容器样式 */
.page-contact__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: #ffffff; /* White background for FAQ items */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-contact__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 20px; /* Use 20px to match question padding */
    opacity: 0;
    color: #555555;
    font-size: 16px;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-contact__faq-item.active .page-contact__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important and a large value */
    padding: 20px !important; /* Adjust padding to match */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* 问题样式 */
.page-contact__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    color: #003366; /* Question text color */
}

.page-contact__faq-item.active .page-contact__faq-question {
    border-color: #003366; /* Border color when active */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.page-contact__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-contact__faq-question:active {
    background: #eeeeee;
}

/* 问题标题样式 */
.page-contact__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px; /* Slightly larger for readability */
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* 防止h3标签阻止点击事件 */
    color: #003366; /* Ensure question title is primary color */
}

/* 切换图标 */
.page-contact__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* 防止图标阻止点击事件 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
    color: #FFD700; /* Auxiliary color when active */
    transform: rotate(45deg); /* Rotate to form an 'X' or just change to '-' */
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .page-contact__hero-title {
        font-size: 38px;
    }
    .page-contact__section-title {
        font-size: 30px;
    }
    .page-contact__form-wrapper {
        flex-direction: column;
    }
    .page-contact__form-image {
        max-width: 100%;
    }
    .page-contact__contact-form {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .page-contact {
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-contact__container {
        padding: 0 15px;
    }
    .page-contact__hero-section {
        padding: 40px 15px;
    }
    .page-contact__hero-title {
        font-size: 32px;
    }
    .page-contact__hero-description {
        font-size: 18px;
    }
    .page-contact__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: auto;
        margin-right: auto;
    }

    .page-contact__methods-section,
    .page-contact__form-section,
    .page-contact__faq-section {
        padding: 60px 0;
    }

    .page-contact__section-title {
        font-size: 26px;
    }
    .page-contact__section-description {
        font-size: 16px;
    }

    .page-contact__methods-grid {
        grid-template-columns: 1fr;
    }
    .page-contact__method-card {
        padding: 25px;
    }
    .page-contact__method-title {
        font-size: 20px;
    }
    .page-contact__method-image {
        max-width: 200px;
    }
    .page-contact__method-text {
        font-size: 15px;
    }
    .page-contact__btn-primary {
        padding: 10px 20px;
        font-size: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Form specific adjustments */
    .page-contact__contact-form {
        padding: 30px 20px;
    }
    .page-contact__form-label {
        font-size: 15px;
    }
    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px 12px;
        font-size: 15px;
    }

    /* FAQ specific adjustments */
    .page-contact__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-contact__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-contact__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-contact__faq-answer {
        padding: 0 15px;
    }
    .page-contact__faq-item.active .page-contact__faq-answer {
        padding: 15px !important;
    }

    /* Ensure all images are responsive and don't overflow */
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-contact__section,
    .page-contact__card,
    .page-contact__container,
    .page-contact__form-wrapper,
    .page-contact__methods-grid {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-contact__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
}