/* style/contact.css */

/* Base styles for the page content */
.page-contact {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared or default to white */
}

/* Section styling */
.page-contact__section-title {
  font-size: 2.5em;
  color: #26A9E0; /* Brand primary color for titles */
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
}

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

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

/* 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); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, #26A9E0, #FFFFFF); /* Gradient background for visual appeal */
  overflow: hidden; /* To contain the image if it slightly overflows */
}

.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 potential background elements */
}

.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;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Soft shadow for depth */
}

.page-contact__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #FFFFFF; /* White text for contrast on the brand color background */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Slight text shadow for readability */
}

.page-contact__main-heading {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: 800;
  color: #FFFFFF; /* White for strong contrast */
}

.page-contact__hero-description {
  font-size: 1.3em;
  margin-bottom: 30px;
  font-weight: 400;
  color: #f0f0f0; /* Slightly off-white for description */
}

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

.page-contact__cta-button:hover {
  background: #d46f06; /* Darker orange on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* General button styles */
.page-contact__btn-primary {
  display: inline-block;
  padding: 12px 25px;
  background: #26A9E0; /* Primary brand color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1em;
  font-weight: bold;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-contact__btn-primary:hover {
  background: #1e87b3; /* Darker shade on hover */
  transform: translateY(-1px);
}

/* Sections for methods, form, commitment */
.page-contact__methods-section,
.page-contact__form-section,
.page-contact__faq-section,
.page-contact__commitment-section {
  padding: 80px 0;
}

.page-contact__light-bg {
  background-color: #FFFFFF; /* Light background */
  color: #333333; /* Dark text */
}

.page-contact__dark-bg {
  background-color: #26A9E0; /* Darker brand color background */
  color: #FFFFFF; /* White text */
}

.page-contact__dark-bg .page-contact__section-title,
.page-contact__dark-bg .page-contact__section-description {
  color: #FFFFFF; /* Ensure titles and descriptions are white on dark background */
}

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

.page-contact__method-card {
  background: #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, box-shadow 0.3s ease;
  border: 1px solid #e0e0e0;
}

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

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

.page-contact__card-title {
  font-size: 1.5em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-contact__card-text {
  font-size: 1em;
  margin-bottom: 20px;
  color: #555555;
}

.page-contact__email-address,
.page-contact__phone-number {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333333;
}

.page-contact__email-address a,
.page-contact__phone-number a {
  color: #EA7C07; /* Login color for contact links */
  text-decoration: none;
}

.page-contact__email-address a:hover,
.page-contact__phone-number a:hover {
  text-decoration: underline;
}

/* Contact Form */
.page-contact__contact-form {
  max-width: 700px;
  margin: 40px auto 0 auto;
  background: #FFFFFF;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
}

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

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

.page-contact__form-input,
.page-contact__form-textarea {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 1em;
  color: #333333;
  background-color: #f8f8f8;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: #26A9E0;
  box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
  outline: none;
}

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

/* FAQ Section */
.page-contact__faq-list {
  margin-top: 40px;
}

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  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 20px;
  opacity: 0;
  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: #f9f9f9;
  border-radius: 0 0 8px 8px;
  border-top: 1px solid #e0e0e0;
}

/* 问题样式 */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  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: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

/* 切换图标 */
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Brand color for toggle icon */
  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 {
  color: #EA7C07; /* Login color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}

/* Commitment Section */
.page-contact__commitment-section {
  text-align: center;
}

.page-contact__commitment-section .page-contact__section-title,
.page-contact__commitment-section .page-contact__section-description {
  color: #FFFFFF;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__main-heading {
    font-size: 2.8em;
  }
  .page-contact__hero-description {
    font-size: 1.1em;
  }
  .page-contact__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  /* 🚨 Mobile specific padding for hero section */
  .page-contact__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-contact__main-heading {
    font-size: 2.2em;
  }
  .page-contact__hero-description {
    font-size: 1em;
  }
  .page-contact__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    max-width: 100% !important; /* Button responsive */
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-contact__section-title {
    font-size: 1.8em;
  }
  .page-contact__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }

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

  .page-contact__method-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-contact__method-card img {
    max-width: 200px;
    margin-bottom: 15px;
  }

  .page-contact__card-title {
    font-size: 1.3em;
  }

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

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

  .page-contact__form-label {
    font-size: 1em;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    width: calc(100% - 20px) !important; /* Ensure full width on mobile */
    padding: 10px;
  }

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

  /* 🚨 Mobile images must be responsive */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-contact__section,
  .page-contact__card,
  .page-contact__container,
  .page-contact__method-card,
  .page-contact__contact-form {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* General button responsiveness */
  .page-contact__btn-primary,
  .page-contact__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}

/* Ensure no filter is used for images */
.page-contact img {
  filter: none !important;
}

/* Additional button responsiveness for multiple buttons if any */
.page-contact__button-group { /* Example class if multiple buttons are grouped */
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .page-contact__button-group {
    flex-direction: column;
    align-items: center;
  }
  .page-contact__button-group .page-contact__btn-primary,
  .page-contact__button-group .page-contact__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
  }
}