/* style/contact.css */

/* --- General Page Styling --- */
.page-contact {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background #f4f4f4 */
    background-color: #f4f4f4; /* Match body background from shared.css */
    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;
}

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

.page-contact__section:nth-of-type(even) {
    background-color: #e9e9e9; /* Slightly darker background for alternating sections */
}

.page-contact__section-title {
    font-size: 36px;
    color: #CC0000; /* Brand red */
    margin-bottom: 20px;
    font-weight: bold;
}

.page-contact__section-description {
    font-size: 18px;
    color: #555555;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* --- Hero Section --- */
.page-contact__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    background-color: #CC0000; /* Fallback for image loading */
}

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

.page-contact__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.8; /* Slightly dim image for text readability */
}

.page-contact__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 800px;
    color: #ffffff; /* White text on dark hero image */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-contact__main-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #FFD700; /* Gold for main title */
}

.page-contact__intro-text {
    font-size: 22px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.page-contact__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: #FFD700; /* Gold button */
    color: #CC0000; /* Red text on gold button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-contact__cta-button:hover {
    background: #e6c200; /* Darker gold on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.page-contact__card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333333;
}

.page-contact__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-contact__card-title {
    font-size: 24px;
    color: #CC0000;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-contact__card-image {
    width: 200px; /* Enforce minimum size */
    height: 200px; /* Enforce minimum size */
    object-fit: contain; /* Ensure full image is visible */
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.page-contact__card-text {
    font-size: 16px;
    margin-bottom: 25px;
    flex-grow: 1; /* Allow text to take available space */
}

.page-contact__email-address,
.page-contact__phone-number {
    font-size: 18px;
    font-weight: 600;
    color: #CC0000;
    margin-bottom: 20px;
}

.page-contact__btn-primary,
.page-contact__btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    max-width: 100%; /* Ensure button fits card */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__btn-primary {
    background: #CC0000;
    color: #ffffff;
    border-color: #CC0000;
}

.page-contact__btn-primary:hover {
    background: #a30000;
    border-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-secondary {
    background: #ffffff;
    color: #CC0000;
    border-color: #CC0000;
}

.page-contact__btn-secondary:hover {
    background: #f0f0f0;
    color: #a30000;
    border-color: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- Contact Form Section --- */
.page-contact__form-section {
    background-color: #f9f9f9;
    padding-bottom: 80px;
}

.page-contact__contact-form {
    max-width: 700px;
    margin: 40px auto 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: left;
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    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: #FFD700; /* Gold focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

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

.page-contact__form-submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: #CC0000; /* Red button */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%; /* Ensure button fits form */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-contact__form-submit-btn:hover {
    background: #a30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- FAQ Section --- */
.page-contact__faq-section {
    padding-bottom: 80px;
}

.page-contact__faq-list {
    max-width: 800px;
    margin: 40px auto 0 auto;
    text-align: left;
}

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  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 15px;
  opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 2000px !important; /* 🚨 使用!important确保优先级，值足够大以容纳任何内容 */
  padding: 20px 25px !important; /* Adjusted padding for better visual */
  opacity: 1;
  background: #fdfdfd;
  border-radius: 0 0 5px 5px;
  border-top: 1px solid #e0e0e0;
}

/* 问题样式 */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px; /* Adjusted padding for better visual */
  background: #fff;
  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;
}

.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: #333333;
}

/* 切换图标 */
.page-contact__faq-toggle {
  font-size: 28px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: #CC0000; /* Brand red for toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px; /* Increased margin */
  pointer-events: none; /* 防止图标阻止点击事件 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Larger touch target */
  height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: #FFD700; /* Gold when active */
  transform: rotate(45deg); /* Rotate for minus sign effect */
}


/* --- Social Media Section --- */
.page-contact__social-media {
    background-color: #e9e9e9;
    padding-top: 80px;
}

.page-contact__social-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.page-contact__social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333333;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 200px; /* Fixed width to contain image */
    box-sizing: border-box;
}

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

.page-contact__social-image {
    width: 100%; /* Image fills its container */
    height: auto;
    max-width: 200px; /* Ensure image is not smaller than 200px */
    max-height: 200px; /* Ensure image is not smaller than 200px */
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.page-contact__social-name {
    font-size: 18px;
    font-weight: bold;
    color: #CC0000;
}


/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-contact__hero-content {
        width: 95%;
    }
    .page-contact__main-title {
        font-size: 40px;
    }
    .page-contact__intro-text {
        font-size: 20px;
    }
    .page-contact__section-title {
        font-size: 32px;
    }
    .page-contact__section-description {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .page-contact {
        font-size: 16px;
        line-height: 1.6;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-contact__container {
        padding: 0 15px;
    }

    .page-contact__section {
        padding: 40px 0;
    }

    .page-contact__hero-section {
        padding: 0;
    }

    .page-contact__hero-content {
        width: 90%;
        max-width: 90%;
        padding: 20px;
    }

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

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

    .page-contact__cta-button {
        padding: 15px 35px;
        font-size: 18px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

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

    .page-contact__grid {
        grid-template-columns: 1fr; /* Stack cards vertically */
        gap: 20px;
    }

    .page-contact__card {
        padding: 25px 15px;
        align-items: center;
    }

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

    .page-contact__card-image,
    .page-contact__social-image,
    .page-contact__hero-image {
        min-width: 200px !important;
        min-height: 200px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    .page-contact__form-section {
        padding-bottom: 60px;
    }

    .page-contact__contact-form {
        padding: 30px;
        margin: 30px auto 0 auto;
    }

    .page-contact__form-label {
        font-size: 15px;
    }

    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 12px;
        font-size: 15px;
    }

    .page-contact__form-submit-btn {
        padding: 15px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-contact__faq-list {
        margin: 30px auto 0 auto;
    }

    .page-contact__faq-question {
        padding: 15px 20px;
    }

    .page-contact__faq-question h3 {
        font-size: 16px;
    }

    .page-contact__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
        margin-left: 15px;
    }

    .page-contact__faq-item.active .page-contact__faq-answer {
        padding: 15px 20px !important;
    }

    .page-contact__social-grid {
        flex-direction: column; /* Stack social cards vertically */
        align-items: center;
        gap: 20px;
    }

    .page-contact__social-card {
        width: 100%;
        max-width: 250px; /* Limit width for stacked cards */
        padding: 15px;
        box-sizing: border-box !important;
    }

    /* All images in content area must be responsive and not cause 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__contact-form,
    .page-contact__faq-list,
    .page-contact__social-grid,
    .page-contact__social-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Button specific mobile styles */
    .page-contact__btn-primary,
    .page-contact__btn-secondary,
    .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;
        padding-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-contact__main-title {
        font-size: 28px;
    }
    .page-contact__intro-text {
        font-size: 16px;
    }
    .page-contact__cta-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    .page-contact__section-title {
        font-size: 24px;
    }
    .page-contact__form-input,
    .page-contact__form-textarea {
        padding: 10px;
    }
}