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

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

.page-contact__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #017439; /* Brand color for titles */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

/* Hero Section */
.page-contact__hero-section {
  position: relative;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: #f8f8f8; /* Light background for hero section */
  display: flex;
  flex-direction: column; /* Image then text */
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-contact__hero-image {
  width: 100%;
  max-height: 500px; /* Limit height for hero image */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-contact__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  max-height: 500px; /* Ensure image doesn't overflow its container */
}

.page-contact__hero-content {
  max-width: 900px;
  padding: 0 15px;
}

.page-contact__main-title {
  font-weight: bold;
  color: #017439; /* Brand color for H1 */
  margin-bottom: 20px;
  line-height: 1.2;
  text-align: center;
  max-width: 100%; /* Ensure H1 doesn't overflow */
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size for H1 */
}

.page-contact__description {
  font-size: 1.2em;
  color: #555555;
  margin-bottom: 30px;
  text-align: center;
}

.page-contact__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  max-width: 600px; /* Limit max width for button group */
  margin: 0 auto;
}

/* Buttons */
.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, border-color 0.3s ease;
  text-align: center;
  max-width: 100%; /* Essential for mobile responsiveness */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-contact__btn-primary {
  background-color: #017439; /* Brand primary color */
  color: #FFFFFF; /* White text for contrast */
  border: 2px solid #017439;
}

.page-contact__btn-primary:hover {
  background-color: #005f2f; /* Darker green on hover */
  border-color: #005f2f;
}

.page-contact__btn-secondary {
  background-color: #FFFFFF;
  color: #017439; /* Brand primary color text */
  border: 2px solid #017439;
}

.page-contact__btn-secondary:hover {
  background-color: #e6f7ed; /* Light green on hover */
  color: #017439;
}

/* Custom button colors from prompt */
.page-contact__btn-register {
  background-color: #C30808; /* Red for register */
  color: #FFFF00; /* Yellow text for contrast */
  border: 2px solid #C30808;
}

.page-contact__btn-register:hover {
  background-color: #9c0606;
  border-color: #9c0606;
}

.page-contact__btn-login {
  background-color: #C30808; /* Red for login */
  color: #FFFF00; /* Yellow text for contrast */
  border: 2px solid #C30808;
}

.page-contact__btn-login:hover {
  background-color: #9c0606;
  border-color: #9c0606;
}


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

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

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

.page-contact__method-card:hover {
  transform: translateY(-5px);
}

.page-contact__method-card img {
  width: 100%;
  max-width: 200px; /* Smaller max-width for card images */
  height: auto;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
  min-height: 200px; /* Minimum size for card images */
  min-width: 200px; /* Minimum size for card images */
}

.page-contact__card-title {
  font-size: 1.8em;
  font-weight: bold;
  color: #017439;
  margin-bottom: 15px;
}

.page-contact__card-text {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow text to grow and push button to bottom */
}

.page-contact__phone-number {
  font-size: 1.2em;
  font-weight: bold;
  color: #C30808; /* Use red for phone number for emphasis */
  margin-bottom: 20px;
}

.page-contact__social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap; /* Allow social icons to wrap */
}

.page-contact__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #017439;
  color: #FFFFFF;
  font-size: 0.9em; /* Smaller font for icon text */
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.page-contact__social-icon:hover {
  background-color: #005f2f;
}

/* Contact Form Section */
.page-contact__contact-form-section {
  padding: 60px 0;
  background-color: #017439; /* Dark brand color background */
  color: #FFFFFF; /* White text for contrast */
}

.page-contact__contact-form-section .page-contact__section-title,
.page-contact__contact-form-section .page-contact__section-description {
  color: #FFFFFF; /* Ensure titles and descriptions are white */
}

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

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

.page-contact__form-label {
  display: block;
  font-size: 1.1em;
  margin-bottom: 8px;
  font-weight: bold;
  color: #FFFFFF; /* White label text */
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.05);
  color: #FFFFFF; /* White text input */
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

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

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: #FFFFFF;
  outline: none;
}

.page-contact__contact-form .page-contact__btn-primary {
  width: auto; /* Allow button to size naturally */
  padding: 12px 30px;
  background-color: #C30808; /* Use red for submit button */
  color: #FFFF00; /* Yellow text for contrast */
  border-color: #C30808;
}

.page-contact__contact-form .page-contact__btn-primary:hover {
  background-color: #9c0606;
  border-color: #9c0606;
}

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

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

.page-contact__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: #017439; /* Brand color for question */
  cursor: pointer;
  list-style: none; /* Hide default details marker */
}

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

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

.page-contact__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-contact__faq-item[open] .page-contact__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-contact__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #555555;
}

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

.page-contact__faq-answer a {
  color: #017439;
  text-decoration: underline;
}

/* Call to Action Section */
.page-contact__call-to-action {
  padding: 60px 0;
  text-align: center;
  background-color: #017439; /* Dark brand color background */
  color: #FFFFFF; /* White text for contrast */
}

.page-contact__call-to-action .page-contact__section-title,
.page-contact__call-to-action .page-contact__section-description {
  color: #FFFFFF; /* Ensure titles and descriptions are white */
}

.page-contact__call-to-action .page-contact__cta-buttons {
  margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-contact__hero-image img {
    max-height: 400px;
  }
  .page-contact__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-contact__section-title {
    font-size: 2em;
  }
  .page-contact__method-card img {
    
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-contact__hero-section {
    padding-top: 10px; /* Small top padding for mobile */
    padding-bottom: 40px;
  }
  .page-contact__hero-image {
    max-height: 300px;
    margin-bottom: 20px;
  }
  .page-contact__hero-image img {
    max-height: 300px;
  }
  .page-contact__hero-content {
    padding: 0 10px;
  }
  .page-contact__main-title {
    font-size: clamp(1.6em, 6vw, 2.5em);
    margin-bottom: 15px;
  }
  .page-contact__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  /* 按钮与按钮容器 */
  .page-contact__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    max-width: 100% !important; /* Ensure container takes full width */
    width: 100% !important;
    padding-left: 15px; /* Add padding to container */
    padding-right: 15px;
  }
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact__btn-register,
  .page-contact__btn-login,
  .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; /* Ensure button text has padding */
    padding-right: 15px;
  }

  /* 长文区 (generic applies to p, li) */
  .page-contact p,
  .page-contact li {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-contact__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-contact__section-description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-contact__method-grid {
    grid-template-columns: 1fr; /* Stack cards vertically */
  }
  .page-contact__method-card {
    padding: 20px;
  }
  .page-contact__card-title {
    font-size: 1.5em;
  }
  .page-contact__contact-form {
    padding: 25px 15px;
  }
  .page-contact__form-label {
    font-size: 1em;
  }
  .page-contact__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-contact__faq-answer {
    padding: 0 20px 15px;
  }
  .page-contact__call-to-action {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .page-contact__hero-image {
    max-height: 250px;
  }
  .page-contact__hero-image img {
    max-height: 250px;
  }
  .page-contact__main-title {
    font-size: clamp(1.4em, 7vw, 2.2em);
  }
  .page-contact__section-title {
    font-size: 1.6em;
  }
  .page-contact__method-card img {
    
  }
}