/* style/contact.css */

/* 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 */
  background-color: var(--secondary-color); /* #FFFFFF */
  padding-top: 60px; /* General top padding, assuming shared handles header offset on body */
}

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

.page-contact__section-title {
  font-size: 2.5em;
  color: var(--primary-color); /* #26A9E0 */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

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

/* Intro Section */
.page-contact__intro-section {
  padding: 80px 0 60px;
  background-color: #f8f8f8;
  text-align: center;
}

.page-contact__main-title {
  font-size: 3em;
  color: var(--primary-color); /* #26A9E0 */
  margin-bottom: 20px;
  font-weight: bold;
}

.page-contact__intro-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #444444;
}

.page-contact__banner-image {
  width: 100%;
  height: auto;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.page-contact__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* #26A9E0 */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(38, 169, 224, 0.3);
}

.page-contact__cta-button:hover {
  background: #1e87c2; /* Slightly darker primary color */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(38, 169, 224, 0.4);
}

/* Contact Info Section */
.page-contact__info-section {
  padding: 80px 0;
  background-color: var(--secondary-color); /* #FFFFFF */
}

.page-contact__contact-methods {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.page-contact__method-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}

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

.page-contact__method-card img {
  width: 100%;
  height: auto;
   /* Adjust image size within card */
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-contact__method-title {
  font-size: 1.5em;
  color: var(--primary-color); /* #26A9E0 */
  margin-bottom: 15px;
}

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

.page-contact__method-link {
  display: inline-block;
  color: var(--primary-color); /* #26A9E0 */
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05em;
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.page-contact__method-link:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* Contact Form Section */
.page-contact__form-section {
  padding: 80px 0;
  background-color: var(--primary-color); /* #26A9E0 */
  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: 700px;
  margin: 0 auto;
  background: #ffffff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.page-contact__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333333; /* Dark text for form labels */
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 1em;
  color: #333333;
  box-sizing: border-box;
}

.page-contact__form-input::placeholder,
.page-contact__form-textarea::placeholder {
  color: #999999;
}

.page-contact__form-textarea {
  resize: vertical;
}

.page-contact__submit-button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: #EA7C07; /* Login color */
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(234, 124, 7, 0.3);
}

.page-contact__submit-button:hover {
  background: #d66f06; /* Slightly darker */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 124, 7, 0.4);
}

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

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

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  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 25px; /* Adjust padding for consistency */
  opacity: 0;
  color: #555555;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px 25px !important; /* Adjust padding for consistency */
  opacity: 1;
  background: #f9f9f9;
  border-top: 1px solid #eeeeee;
}

/* Vấn đề kiểu dáng */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px; /* Adjust padding for consistency */
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px; /* Match item border-radius */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-contact__faq-item.active .page-contact__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: #d0d0d0;
}

.page-contact__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

/* Vấn đề tiêu đề kiểu dáng */
.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; /* Ngăn thẻ h3 chặn sự kiện nhấp chuột */
}

/* Chuyển đổi biểu tượng */
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* #26A9E0 */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện nhấp chuột */
  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); /* Sử dụng xoay để chuyển đổi '+' thành 'x' */
  color: #EA7C07; /* Thay đổi màu khi hoạt động */
}

/* Location Section */
.page-contact__location-section {
  padding: 80px 0;
  background-color: var(--primary-color); /* #26A9E0 */
  color: #ffffff;
  text-align: center;
}

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

.page-contact__location-details {
  max-width: 800px;
  margin: 0 auto;
}

.page-contact__location-details p {
  font-size: 1.1em;
  margin-bottom: 15px;
}

.page-contact__map-image {
  width: 100%;
  height: auto;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-top: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-contact__main-title {
    font-size: 2.5em;
  }
  .page-contact__section-title {
    font-size: 2em;
  }
  .page-contact__method-card {
    min-width: 250px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .page-contact {
    padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    font-size: 16px;
    line-height: 1.6;
  }
  .page-contact__container {
    padding: 0 15px;
  }
  .page-contact__main-title {
    font-size: 2em;
  }
  .page-contact__intro-description {
    font-size: 1em;
  }
  .page-contact__section-title {
    font-size: 1.8em;
  }
  .page-contact__section-description {
    font-size: 1em;
  }

  .page-contact__intro-section,
  .page-contact__info-section,
  .page-contact__form-section,
  .page-contact__faq-section,
  .page-contact__location-section {
    padding: 50px 0;
  }

  .page-contact__contact-methods {
    flex-direction: column;
    align-items: center;
  }
  .page-contact__method-card {
    max-width: 100%;
    width: 100%;
    padding: 25px;
  }

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

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

  /* Image responsiveness */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-contact__section,
  .page-contact__card,
  .page-contact__container,
  .page-contact__intro-section,
  .page-contact__info-section,
  .page-contact__form-section,
  .page-contact__faq-section,
  .page-contact__location-section,
  .page-contact__contact-methods,
  .page-contact__method-card,
  .page-contact__contact-form,
  .page-contact__faq-list,
  .page-contact__faq-item,
  .page-contact__location-details {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  /* Remove padding from container within sections if sections already have it */
  .page-contact__intro-section > .page-contact__container,
  .page-contact__info-section > .page-contact__container,
  .page-contact__form-section > .page-contact__container,
  .page-contact__faq-section > .page-contact__container,
  .page-contact__location-section > .page-contact__container {
    padding-left: 0;
    padding-right: 0;
  }

  /* Button responsiveness */
  .page-contact__cta-button,
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact a[class*="button"],
  .page-contact a[class*="btn"],
  .page-contact__submit-button,
  .page-contact__method-link {
    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;
  }
  
  .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;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-contact__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}

/* Color Contrast Safeguards - applied based on body background (#FFFFFF) */
/* .page-contact has color: #333333 already */
/* .page-contact__dark-bg has background: var(--primary-color) and color: #ffffff */
/* .page-contact__light-bg has background: var(--secondary-color) and color: #333333 */

/* Specific button colors from prompt */
.page-contact__btn-primary {
  background: var(--primary-color); /* #26A9E0 */
  color: #ffffff;
}
.page-contact__btn-primary:hover {
  background: #1e87c2;
}

.page-contact__submit-button {
  background: #EA7C07;
  color: #ffffff;
}
.page-contact__submit-button:hover {
  background: #d66f06;
}

/* Ensure no CSS filters on images */
.page-contact img {
  filter: none;
}