:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f8f9fa; /* A slightly off-white for sections */
  --border-color: #e0e0e0;
  --button-hover-bg: #1a8cc2; /* Darker shade of primary for hover */
  --login-color: #EA7C07; /* Specific color for login */
}

/* Base styles for the contact page content */
.page-contact {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light background */
  background-color: var(--background-light); /* Assuming a light body background from shared.css */
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

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

.page-contact__section-title--light {
  color: var(--text-light);
}

.page-contact__description {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.page-contact__description--light {
  color: var(--text-light);
}

/* Buttons */
.page-contact__btn-primary,
.page-contact__btn-secondary,
.page-contact__cta-button,
.page-contact__submit-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  border: none; /* Reset button default border */
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-primary,
.page-contact__cta-button,
.page-contact__submit-button {
  background: var(--primary-color);
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.page-contact__btn-primary:hover,
.page-contact__cta-button:hover,
.page-contact__submit-button:hover {
  background: var(--button-hover-bg);
  border-color: var(--button-hover-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-contact__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-contact__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 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;
  background: linear-gradient(135deg, var(--primary-color) 0%, #3a47d5 100%); /* Example gradient, can adjust */
  color: var(--text-light);
  overflow: hidden; /* Ensure image 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;
  width: 100%;
}

.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;
}

.page-contact__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-contact__hero-content h1 {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-contact__hero-content p {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-contact__card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-contact__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.page-contact__card img {
  width: 100%;
  max-width: 300px; /* Constrain card image width */
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  object-fit: cover;
}

.page-contact__card h3 {
  font-size: 1.8em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.page-contact__card p {
  font-size: 1em;
  margin-bottom: 25px;
  flex-grow: 1; /* Make paragraphs grow to push button to bottom */
}

/* Form Section */
.page-contact__form-section {
  padding: 80px 0;
  background: var(--primary-color);
  color: var(--text-light);
}

.page-contact__contact-form {
  max-width: 700px;
  margin: 40px auto 0;
  background: var(--secondary-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  color: var(--text-dark); /* Form text color */
}

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

.page-contact__form-group label {
  display: block;
  font-size: 1.1em;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-contact__form-group input[type="text"],
.page-contact__form-group input[type="email"],
.page-contact__form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-contact__form-group input[type="text"]:focus,
.page-contact__form-group input[type="email"]:focus,
.page-contact__form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
  outline: none;
}

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

.page-contact__submit-button {
  width: 100%;
  padding: 18px;
  font-size: 1.2em;
}

/* FAQ Section */
.page-contact__faq-section {
  padding: 80px 0;
  background-color: var(--background-light);
}

.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.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;
  opacity: 0;
  background: var(--secondary-color);
  color: var(--text-dark);
}

/* 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;
  border-radius: 0 0 8px 8px;
}

/* Vấn đề kiểu dáng */
.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  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;
}

/* Vấn đề tiêu đề kiểu dáng */
.page-contact__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.page-contact__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-contact__faq-item.active .page-contact__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Xoay cho hiệu ứng 'x' */
}


/* CTA Banner Section */
.page-contact__cta-banner {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(90deg, #26A9E0, #1a8cc2); /* Deeper blue gradient */
  color: var(--text-light);
}

.page-contact__cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-contact__cta-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ hơn */
  justify-content: center;
  width: 100%; /* Đảm bảo container chiếm toàn bộ chiều rộng để xuống dòng */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Thiết kế đáp ứng */
@media (max-width: 1024px) {
  .page-contact__hero-content h1 {
    font-size: 2.8em;
  }
  .page-contact__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-contact {
    font-size: 16px;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px) !important; /* Đệm trên cụ thể cho thiết bị di động */
  }

  .page-contact__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-contact__hero-section {
    padding: 40px 15px;
  }

  .page-contact__hero-content h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-contact__hero-content p {
    font-size: 1em;
    margin-bottom: 20px;
  }
  
  .page-contact__hero-image img {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

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

  .page-contact__description {
    font-size: 1em;
    margin-bottom: 30px;
  }

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

  .page-contact__contact-methods {
    grid-template-columns: 1fr; /* Xếp chồng các thẻ dọc */
    gap: 20px;
  }

  .page-contact__card {
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .page-contact__card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-contact__card h3 {
    font-size: 1.5em;
  }

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

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

  .page-contact__form-group input,
  .page-contact__form-group textarea {
    padding: 12px;
  }

  .page-contact__submit-button {
    padding: 15px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Kiểu dáng cụ thể cho nút di động */
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .page-contact__cta-button,
  .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;
    padding-right: 15px;
  }
  
  .page-contact__cta-buttons {
    flex-direction: column; /* Xếp chồng các nút dọc */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Kiểu dáng cụ thể cho FAQ di động */
  .page-contact__faq-question {
    padding: 15px 20px;
  }
  
  .page-contact__faq-question h3 {
    font-size: 1em;
  }
  
  .page-contact__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  
  .page-contact__faq-item.active .page-contact__faq-answer {
    padding: 20px !important;
  }
}