/* Base styles for the contact page */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #F5F7FA */
    background-color: #F5F7FA;
}

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

.page-contact__section-title {
    font-size: 32px;
    font-weight: 700;
    color: #E53935; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.3;
}

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

/* Button styles */
.page-contact__btn-primary,
.page-contact__btn-secondary,
.page-contact__cta-button,
.page-contact__submit-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 100%; /* Ensure responsiveness */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary,
.page-contact__cta-button,
.page-contact__submit-button {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.page-contact__btn-primary:hover,
.page-contact__cta-button:hover,
.page-contact__submit-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.4);
}

.page-contact__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-contact__btn-secondary:hover {
    background: #E53935;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.2);
}

/* Hero Section */
.page-contact__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, assuming body handles --header-offset */
    margin-bottom: 50px;
    overflow: hidden; /* Prevent image overflow */
}

.page-contact__hero-image-wrapper {
    width: 100%;
    height: 600px; /* Fixed height for desktop */
    overflow: hidden;
    position: relative;
}

.page-contact__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, may crop sides */
    display: block;
}

.page-contact__hero-content {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff; /* White background for text area */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: -100px auto 0; /* Pull content up over the image, but not *on* it */
    position: relative;
    z-index: 10;
}

.page-contact__main-title {
    font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size for H1 */
    color: #E53935;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.page-contact__description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #333333;
}

/* Channels Section */
.page-contact__channels-section {
    padding: 60px 0;
    background-color: #F5F7FA; /* Light background for this section */
}

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

.page-contact__channel-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E0E0E0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.page-contact__channel-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block; /* Ensure it's treated as a block element */
}

.page-contact__channel-title {
    font-size: 22px;
    color: #E53935;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-contact__channel-text {
    font-size: 16px;
    color: #333333;
    margin-bottom: 25px;
    flex-grow: 1; /* Allow text to grow */
}

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

details.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-contact__faq-item summary.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-contact__faq-item summary.page-contact__faq-question::-webkit-details-marker {
  display: none;
}
details.page-contact__faq-item summary.page-contact__faq-question:hover {
  background: #f5f5f5;
}
.page-contact__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-contact__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-contact__faq-item .page-contact__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333;
}
.page-contact__faq-answer p {
    margin: 0;
    padding: 0;
    font-size: 15px;
}


/* Form Section */
.page-contact__form-section {
    padding: 60px 0;
    background: #E53935; /* Brand color for dark background */
    color: #ffffff; /* White text for dark background */
}

.page-contact__form-section .page-contact__section-title,
.page-contact__form-section .page-contact__section-description {
    color: #ffffff;
}

.page-contact__contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for form background */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
    border-color: #FF5A4F;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 90, 79, 0.3);
}

.page-contact__submit-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

/* Commitment Section */
.page-contact__commitment-section {
    padding: 60px 0;
    background-color: #F5F7FA;
}

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

.page-contact__commitment-item {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: center;
    border: 1px solid #E0E0E0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-contact__commitment-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
}

.page-contact__commitment-title {
    font-size: 22px;
    color: #E53935;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-contact__commitment-item p {
    font-size: 16px;
    color: #333333;
    flex-grow: 1;
}

.page-contact__closing-text {
    text-align: center;
    font-size: 18px;
    margin-top: 50px;
    font-weight: 600;
    color: #333333;
}

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

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

/* Tablet and Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-contact__container {
        padding: 0 15px;
    }

    .page-contact__hero-section {
        margin-bottom: 30px;
    }

    .page-contact__hero-image-wrapper {
        height: 500px;
    }

    .page-contact__hero-content {
        margin-top: -80px;
        padding: 30px 15px;
        max-width: 700px;
    }

    .page-contact__main-title {
        font-size: clamp(2em, 5vw, 3em);
    }

    .page-contact__description {
        font-size: 1em;
    }

    .page-contact__section-title {
        font-size: 28px;
    }

    .page-contact__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-contact__channels-section,
    .page-contact__faq-section,
    .page-contact__form-section,
    .page-contact__commitment-section {
        padding: 40px 0;
    }

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

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

    .page-contact__channel-title {
        font-size: 20px;
    }

    .page-contact__channel-text {
        font-size: 15px;
    }

    .page-contact__commitment-points {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .page-contact__commitment-item {
        padding: 25px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* General content area padding and image responsiveness */
    .page-contact__container,
    .page-contact__hero-content,
    .page-contact__channel-card,
    .page-contact__contact-form,
    .page-contact__commitment-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .page-contact img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* HERO 主图区域 */
    .page-contact__hero-section {
        padding-top: 10px;
        margin-bottom: 20px;
    }

    .page-contact__hero-image-wrapper {
        height: 250px;
    }

    .page-contact__hero-image {
        object-fit: contain !important;
        aspect-ratio: unset !important;
    }

    .page-contact__hero-content {
        margin-top: -40px;
        padding: 20px 15px;
        border-radius: 8px;
    }

    .page-contact__main-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 15px;
    }

    .page-contact__description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }

    /* 按钮与按钮容器 */
    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .page-contact__cta-button,
    .page-contact__submit-button,
    .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-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .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 !important;
        padding-right: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px;
        display: flex;
        flex-direction: column; /* Stack buttons vertically */
    }

    .page-contact__section-title {
        font-size: 24px;
        margin-bottom: 15px;
        padding: 0 10px;
    }

    .page-contact__section-description {
        font-size: 15px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    /* 产品展示图区域 (General grid handling) */
    .page-contact__channel-grid,
    .page-contact__commitment-points {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-contact__channel-card,
    .page-contact__commitment-item {
        padding: 20px;
    }
    
    .page-contact__channel-icon,
    .page-contact__commitment-icon {
        width: 80px;
        height: 80px;
    }

    .page-contact__channel-title,
    .page-contact__commitment-title {
        font-size: 18px;
    }

    .page-contact__channel-text,
    .page-contact__commitment-item p {
        font-size: 14px;
    }

    /* FAQ */
    details.page-contact__faq-item summary.page-contact__faq-question { padding: 15px; }
    .page-contact__faq-qtext { font-size: 15px; }
    details.page-contact__faq-item .page-contact__faq-answer { padding: 0 15px 15px; }

    /* Form Section */
    .page-contact__contact-form {
        padding: 25px;
    }

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

    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px;
        width: calc(100% - 20px);
    }

    .page-contact__submit-button {
        font-size: 16px;
        padding: 12px;
    }
}