/* style/contact.css */
/* 
  Màu sắc chính: #26A9E0
  Màu sắc phụ: #FFFFFF
  Màu nền body (từ shared.css): var(--bg-color) - Giả định là nền sáng cho các phần nền sáng, và dùng màu thương hiệu cho các phần nền tối.
*/

.page-contact {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Mặc định chữ tối trên nền sáng */
  background-color: var(--bg-color, #f8f8f8); /* Sử dụng biến CSS từ shared, hoặc mặc định */
}

/* ------------------------------------ */
/* --- Cấu trúc chung và màu sắc --- */
/* ------------------------------------ */
.page-contact__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-contact__section-title {
  font-size: 2.5rem;
  color: #26A9E0; /* Màu thương hiệu */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-contact__section-intro {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit; /* Kế thừa màu chữ từ section cha */
}

.page-contact__section-outro {
  font-size: 1rem;
  text-align: center;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit; /* Kế thừa màu chữ từ section cha */
}

/* Nền sáng và chữ tối */
.page-contact__light-bg {
  background-color: #ffffff;
  color: #333333;
  padding: 60px 0;
}

/* Nền tối (màu thương hiệu) và chữ sáng */
.page-contact__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
  padding: 60px 0;
}

/* Nút chính */
.page-contact__btn-primary {
  display: inline-block;
  background-color: #EA7C07; /* Màu cam cho nút đăng nhập/đăng ký */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: 2px solid transparent;
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word; /* Ngắt từ */
}

.page-contact__btn-primary:hover {
  background-color: #d46a00;
  transform: translateY(-2px);
}

/* Nút phụ */
.page-contact__btn-secondary {
  display: inline-block;
  background-color: #ffffff;
  color: #26A9E0;
  padding: 12px 25px;
  border: 2px solid #26A9E0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  text-align: center;
  box-sizing: border-box;
  white-space: normal; /* Cho phép xuống dòng */
  word-wrap: break-word; /* Ngắt từ */
}

.page-contact__btn-secondary:hover {
  background-color: #26A9E0;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Nút mạng xã hội */
.page-contact__social-btn {
  display: inline-block;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 5px;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__social-btn:hover {
  background-color: #1e87c0;
  transform: translateY(-2px);
}

/* ------------------------------------ */
/* --- Hero Section --- */
/* ------------------------------------ */
.page-contact__hero-section {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-offset, 120px); /* Kế thừa khoảng cách từ header */
  min-height: 600px; /* Đảm bảo chiều cao tối thiểu */
}

.page-contact__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-contact__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Làm tối ảnh nền để chữ nổi bật */
  display: block;
}

.page-contact__hero-section .page-contact__container {
  position: relative;
  z-index: 1;
  padding-top: 50px;
  padding-bottom: 50px;
}

.page-contact__hero-title {
  font-size: 3.5rem;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-contact__hero-description {
  font-size: 1.3rem;
  color: #f0f0f0;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

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

.page-contact__method-title {
  font-size: 1.8rem;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-contact__method-description {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-contact__email-link,
.page-contact__phone-link {
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

.page-contact__email-link:hover,
.page-contact__phone-link:hover {
  text-decoration: underline;
}

.page-contact__social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.page-contact__image-wrapper {
  margin: 50px auto;
  text-align: center;
}

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

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

.page-contact__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Nền hơi trong suốt */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.15); /* Nền câu hỏi đậm hơn */
  transition: background-color 0.3s ease;
}

.page-contact__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.page-contact__faq-question-title {
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0;
  font-weight: bold;
}

.page-contact__faq-toggle {
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  transform: rotate(45deg); /* Biến dấu + thành X hoặc - */
}

.page-contact__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #f0f0f0;
  font-size: 1rem;
}

.page-contact__faq-item.active .page-contact__faq-answer {
  max-height: 1000px !important; /* Đủ lớn để chứa mọi nội dung */
  padding: 15px 25px 25px;
}

.page-contact__faq-answer p {
  margin-bottom: 10px;
  color: inherit;
}

/* ------------------------------------ */
/* --- Why Contact Us Section --- */
/* ------------------------------------ */
.page-contact__why-contact-section {
  padding: 80px 0;
}

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

.page-contact__commitment-card {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

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

.page-contact__commitment-title {
  font-size: 1.6rem;
  color: #26A9E0;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-contact__commitment-description {
  font-size: 1rem;
  color: #555555;
}

/* ------------------------------------ */
/* --- Location Section --- */
/* ------------------------------------ */
.page-contact__location-section {
  padding: 80px 0;
}

.page-contact__location-details {
  text-align: center;
  margin: 50px auto;
  max-width: 800px;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.page-contact__location-details strong {
  color: #ffffff;
}

.page-contact__map-wrapper {
  margin: 50px auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-contact__map-iframe {
  width: 100%;
  height: 450px;
  border: 0;
  display: block;
}

/* ------------------------------------ */
/* --- CTA Section --- */
/* ------------------------------------ */
.page-contact__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-contact__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
  margin-bottom: 50px;
  flex-wrap: wrap; /* Cho phép xuống dòng trên mobile */
}

/* ------------------------------------ */
/* --- Responsive Images --- */
/* ------------------------------------ */
.page-contact img {
  max-width: 100%;
  height: auto;
  display: block;
  /* Đảm bảo không có filter làm thay đổi màu ảnh */
  filter: none;
}

.page-contact__hero-image {
  filter: brightness(0.5); /* Chỉ hero image được làm tối */
}

/* ------------------------------------ */
/* --- Responsive Design --- */
/* ------------------------------------ */
@media (max-width: 1024px) {
  .page-contact__hero-title {
    font-size: 3rem;
  }
  .page-contact__hero-description {
    font-size: 1.2rem;
  }
  .page-contact__section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .page-contact__container {
    padding: 0 15px !important;
  }

  /* Fixed header offset for mobile */
  .page-contact__hero-section {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-contact__hero-title {
    font-size: 2.2rem;
  }
  .page-contact__hero-description {
    font-size: 1rem;
  }
  .page-contact__section-title {
    font-size: 1.8rem;
  }
  .page-contact__section-intro,
  .page-contact__section-outro,
  .page-contact__location-details p {
    font-size: 0.95rem;
  }

  .page-contact__methods-grid,
  .page-contact__commitments-grid {
    grid-template-columns: 1fr;
  }

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

  .page-contact__method-title {
    font-size: 1.5rem;
  }

  .page-contact__faq-question-title {
    font-size: 1.1rem;
  }

  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact__social-btn,
  .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 !important;
    padding-right: 15px !important;
  }
  
  .page-contact__cta-buttons,
  .page-contact__social-links {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Ensure content sections don't cause horizontal scroll */
  .page-contact__info-section,
  .page-contact__faq-section,
  .page-contact__why-contact-section,
  .page-contact__location-section,
  .page-contact__cta-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-contact__info-section .page-contact__container,
  .page-contact__faq-section .page-contact__container,
  .page-contact__why-contact-section .page-contact__container,
  .page-contact__location-section .page-contact__container,
  .page-contact__cta-section .page-contact__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-contact__map-iframe {
    height: 300px;
  }
}

/* ------------------------------------ */
/* --- Color Contrast Fixes --- */
/* ------------------------------------ */
/* Đảm bảo các link trong nền tối có màu sáng */
.page-contact__dark-bg a {
  color: #f0f0f0;
  text-decoration: underline;
}

.page-contact__dark-bg a:hover {
  color: #ffffff;
}

/* Đảm bảo các link trong nền sáng có màu thương hiệu */
.page-contact__light-bg a {
  color: #26A9E0;
  text-decoration: none;
}

.page-contact__light-bg a:hover {
  text-decoration: underline;
}

/* Cụ thể hơn cho các link trong FAQ answer */
.page-contact__faq-answer a {
  color: #f0f0f0; /* Chữ sáng trên nền tối */
  text-decoration: underline;
}
.page-contact__faq-answer a:hover {
  color: #ffffff;
}

/* Đảm bảo màu chữ trên các card nền sáng */
.page-contact__method-card,
.page-contact__commitment-card {
  color: #333333;
}
.page-contact__method-card .page-contact__method-title,
.page-contact__commitment-card .page-contact__commitment-title {
  color: #26A9E0;
}