/* style/contact.css */
.page-contact {
  color: #ffffff; /* Default text color for dark background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-dark); /* Assuming --bg-dark is a dark color from shared.css */
}

/* Fixed Header Offset - Apply to the first main content section if shared doesn't handle body padding */
.page-contact__hero-banner {
  padding-top: var(--header-offset, 120px); /* Default 120px if variable not set */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #CC0000 0%, #CC0000 60%, #FFD700 100%); /* Red to Gold gradient */
  padding-bottom: 60px;
}

.page-contact__hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  z-index: 1;
  position: relative;
}

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

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

.page-contact__hero-image-wrapper {
  width: 100%;
  max-width: 1000px;
  margin-top: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-contact__hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

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

.page-contact__section-title {
  font-size: 36px;
  font-weight: bold;
  color: #FFD700; /* Gold color for titles */
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

.page-contact__methods-section {
  padding: 80px 0;
  background-color: var(--bg-dark-lighten-10); /* Slightly lighter dark background */
}

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

.page-contact__method-card {
  background: rgba(255, 255, 255, 0.08); /* Semi-transparent white for cards */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-contact__method-icon {
  width: 100%;
  max-width: 200px; /* Ensure images are not too small */
  height: auto;
  margin: 0 auto 20px;
  border-radius: 8px;
  overflow: hidden;
}

.page-contact__method-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.page-contact__method-title {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-contact__method-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 25px;
}

.page-contact__btn-primary {
  display: inline-block;
  background: #FFD700; /* Gold button */
  color: #CC0000; /* Red text for gold button */
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-contact__btn-secondary {
  display: inline-block;
  background: #CC0000; /* Red button */
  color: #ffffff; /* White text for red button */
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #FFD700; /* Gold border */
  cursor: pointer;
}

.page-contact__btn-secondary:hover {
  background: #a30000;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-contact__faq-section {
  padding: 80px 0;
  background-color: var(--bg-dark);
}

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

/* FAQ容器样式 */
.page-contact__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly visible background */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 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;
  opacity: 0;
  color: #f0f0f0;
  font-size: 16px;
}

/* 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: 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.1); /* Lighter background for answer */
  border-radius: 0 0 8px 8px;
}

/* 问题样式 */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.08);
  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: rgba(255, 255, 255, 0.12);
}

.page-contact__faq-question:active {
  background: rgba(255, 255, 255, 0.15);
}

/* 问题标题样式 */
.page-contact__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #FFD700; /* Gold color for questions */
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
}

/* 切换图标 */
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #FFD700;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 20px;
  pointer-events: none; /* Ngăn biểu tượng chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng dấu trừ */
}

.page-contact__feedback-section {
  padding: 80px 0;
  background-color: var(--bg-dark-lighten-10);
}

.page-contact__contact-form {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.page-contact__form-label {
  display: block;
  font-size: 18px;
  color: #FFD700;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-contact__form-input,
.page-contact__form-textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.3); /* Nền input tối hơn */
  color: #ffffff;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.page-contact__form-input:focus,
.page-contact__form-textarea:focus {
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  outline: none;
}

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

/* --- Responsive Design --- */

/* All images responsive by default */
.page-contact img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* All buttons responsive by default */
.page-contact__btn-primary,
.page-contact__btn-secondary,
.page-contact a[class*="btn"] {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

/* Button containers responsive by default */
.page-contact__button-group,
.page-contact__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .page-contact__hero-title {
    font-size: 40px;
  }

  .page-contact__hero-description {
    font-size: 18px;
  }

  .page-contact__section-title {
    font-size: 32px;
  }

  .page-contact__section-description {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .page-contact__methods-grid {
    gap: 25px;
  }

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

  .page-contact__method-title {
    font-size: 22px;
  }

  .page-contact__method-text {
    font-size: 15px;
  }

  .page-contact__faq-question h3 {
    font-size: 17px;
  }

  .page-contact__faq-toggle {
    font-size: 26px;
  }

  .page-contact__faq-answer {
    font-size: 15px;
  }

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

  .page-contact__form-label {
    font-size: 17px;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  /* Fixed Header Offset for mobile */
  .page-contact__hero-banner {
    padding-top: var(--header-offset, 80px) !important; /* Adjust default for mobile if needed */
    padding-bottom: 40px;
  }

  .page-contact__hero-content {
    padding: 30px 15px;
  }

  .page-contact__hero-title {
    font-size: 32px;
  }

  .page-contact__hero-description {
    font-size: 16px;
  }

  .page-contact__hero-image-wrapper {
    margin-top: 30px;
  }

  .page-contact__container {
    padding: 30px 15px;
  }

  .page-contact__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-contact__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

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

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

  .page-contact__method-title {
    font-size: 20px;
  }

  .page-contact__method-text {
    font-size: 14px;
  }

  .page-contact__faq-list {
    padding: 0 15px;
  }

  .page-contact__faq-question {
    padding: 15px 20px;
  }

  .page-contact__faq-question h3 {
    font-size: 16px;
  }

  .page-contact__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
    margin-left: 15px;
  }

  .page-contact__faq-answer {
    padding: 0 20px;
    font-size: 14px;
  }

  .page-contact__faq-item.active .page-contact__faq-answer {
    padding: 20px !important;
  }

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

  .page-contact__form-label {
    font-size: 16px;
  }

  .page-contact__form-input,
  .page-contact__form-textarea {
    font-size: 14px;
    padding: 12px;
  }

  /* Mobile responsive for images - MUST BE PRESENT */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* Ensure containers adapt to mobile width */
  .page-contact__container,
  .page-contact__hero-banner,
  .page-contact__methods-section,
  .page-contact__faq-section,
  .page-contact__feedback-section,
  .page-contact__method-card,
  .page-contact__contact-form {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile responsive for buttons - MUST BE PRESENT */
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .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;
    padding-right: 15px;
  }
  
  .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__hero-content .page-contact__btn-primary {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* Specific adjustments for method cards to ensure image size */
  .page-contact__method-icon {
    max-width: 150px;
    margin-bottom: 15px;
  }
  .page-contact__method-icon img {
    width: 100%;
    height: auto;
  }
}