/* style/contact.css */

/* General Page Styles */
.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Dark text on light background */
  background-color: #ffffff; /* Default body background */
}

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

.page-contact__section-title {
  font-size: 32px;
  color: #26A9E0; /* Primary color for titles */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* 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;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Light blue to white gradient */
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-contact__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Ensure content is above any background elements */
}

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

.page-contact__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #ffffff; /* White text on hero section */
  text-shadow: 0 1px 3px rgba(0,0,0,0.3); /* For readability */
}

.page-contact__hero-title {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffffff;
}

.page-contact__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #ffffff;
}

.page-contact__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: #EA7C07; /* Login orange color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-contact__cta-button:hover {
  background: #d66b05; /* Slightly darker orange */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Contact Info Section */
.page-contact__info-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

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

.page-contact__info-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards are same height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-contact__info-card-title {
  font-size: 22px;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-contact__info-card-text {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Push detail to bottom */
}

.page-contact__info-detail {
  font-size: 17px;
  font-weight: bold;
  color: #333333;
  margin-top: 15px;
}

.page-contact__info-link {
  color: #EA7C07; /* Login orange for actionable links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-contact__info-link:hover {
  color: #26A9E0; /* Primary color on hover */
  text-decoration: underline;
}

.page-contact__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #26A9E0;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-contact__btn-primary:hover {
  background: #1e87c0;
}

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

.page-contact__contact-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

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

.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: #26A9E0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
}

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

.page-contact__form-submit-btn {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: #26A9E0;
  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 4px 10px rgba(0, 0, 0, 0.1);
}

.page-contact__form-submit-btn:hover {
  background: #1e87c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

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

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

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* 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;
  opacity: 0;
  background: #ffffff;
  color: #555555;
}

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

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

.page-contact__faq-question:hover {
  background: #1e87c0;
  border-color: #1e87c0;
}

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

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

/* 切换图标 */
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  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: 32px;
  height: 32px;
}

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

/* CTA Banner Section */
.page-contact__cta-banner {
  background: linear-gradient(90deg, #26A9E0, #EA7C07); /* Gradient from primary to login orange */
  padding: 80px 0;
  text-align: center;
  color: #ffffff;
}

.page-contact__cta-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-contact__cta-title {
  font-size: 38px;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-contact__cta-description {
  font-size: 20px;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-contact__btn-login,
.page-contact__btn-register {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin: 0 10px;
  transition: all 0.3s ease;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-login {
  background: #ffffff;
  color: #EA7C07; /* Login orange */
}

.page-contact__btn-login:hover {
  background: #f0f0f0;
  color: #d66b05;
  transform: translateY(-2px);
}

.page-contact__btn-register {
  background: transparent;
  color: #ffffff;
}

.page-contact__btn-register:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__hero-title {
    font-size: 40px;
  }
  .page-contact__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-contact__section-title {
    font-size: 28px;
  }
  .page-contact__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Hero Section Mobile */
  .page-contact__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-contact__hero-image {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-contact__hero-title {
    font-size: 32px;
  }
  .page-contact__hero-description {
    font-size: 16px;
  }
  .page-contact__cta-button {
    padding: 12px 30px;
    font-size: 18px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Contact Info Section Mobile */
  .page-contact__info-section {
    padding: 50px 0;
  }
  .page-contact__info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-contact__info-card {
    padding: 25px;
  }

  /* Contact Form Section Mobile */
  .page-contact__form-section {
    padding: 50px 0;
  }
  .page-contact__contact-form {
    padding: 25px;
  }
  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px 12px;
    font-size: 15px;
  }
  .page-contact__form-submit-btn {
    padding: 12px 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;
  }

  /* FAQ Section Mobile */
  .page-contact__faq-section {
    padding: 50px 0;
  }
  .page-contact__faq-question {
    padding: 15px;
  }
  .page-contact__faq-question h3 {
    font-size: 16px;
  }
  .page-contact__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  .page-contact__faq-item.active .page-contact__faq-answer {
    padding: 15px !important;
  }

  /* CTA Banner Mobile */
  .page-contact__cta-banner {
    padding: 50px 15px;
  }
  .page-contact__cta-title {
    font-size: 28px;
  }
  .page-contact__cta-description {
    font-size: 16px;
  }
  .page-contact__btn-login,
  .page-contact__btn-register {
    display: block;
    margin: 10px auto;
    width: 100%;
    max-width: 300px; /* Limit width for block buttons */
    padding: 12px 20px;
    font-size: 18px;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-contact__btn-login {
    margin-bottom: 15px;
  }

  /* Generic image/container responsive rules */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-contact__section,
  .page-contact__card,
  .page-contact__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  .page-contact__hero-title {
    font-size: 28px;
  }
  .page-contact__cta-title {
    font-size: 24px;
  }
  .page-contact__faq-question h3 {
    font-size: 15px;
  }
}