/* 智能文字颜色选择器 - Mặc định cho nền sáng */
.page-contact {
  color: #333333; /* Mặc định sử dụng chữ tối cho nền sáng */
  background-color: #F5F7FA; /* Màu nền tổng thể */
}

.page-contact__dark-section {
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff; /* Chữ trắng cho nền đậm */
}

.page-contact__light-bg {
  background: #FFFFFF;
  color: #333333;
}

.page-contact__background-section {
  background-color: #F5F7FA;
  color: #333333;
}

/* HERO 主图区域 */
.page-contact__hero-section {
  padding-top: 10px; /* Nhỏ hơn so với header-offset để tránh double padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.page-contact__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Giới hạn chiều cao hình ảnh */
}

.page-contact__hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: 20px;
  margin-top: -100px; /* Kéo nội dung lên trên hình ảnh một chút */
  background-color: rgba(255, 255, 255, 0.9); /* Nền bán trong suốt để chữ dễ đọc */
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  color: #333333;
}

.page-contact__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #E53935;
}

.page-contact__hero-description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Các phương thức liên hệ */
.page-contact__methods-section {
  padding: 60px 0;
  text-align: center;
}

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

.page-contact__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  color: #333333;
  margin-bottom: 20px;
}

.page-contact__section-description {
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-contact__card {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  color: #333333;
}

.page-contact__card-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
  border-radius: 8px;
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

.page-contact__card-title {
  font-size: 1.8em;
  font-weight: 600;
  color: #E53935;
  margin-bottom: 15px;
}

.page-contact__card p {
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-contact__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-contact__btn-secondary {
  display: inline-block;
  background: #ffffff;
  color: #E53935;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #E53935;
  cursor: pointer;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__btn-secondary:hover {
  background: #E53935;
  color: #ffffff;
}

.page-contact__social-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-contact__social-btn {
  display: inline-block;
  background: #333333;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-contact__social-btn:hover {
  background-color: #555555;
}

/* Contact Form Popup */
.page-contact__form-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s;
}

.page-contact__form-popup.active {
  visibility: visible;
  opacity: 1;
}

.page-contact__form-content {
  position: relative;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: left;
}

.page-contact__close-form-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 2em;
  background: none;
  border: none;
  cursor: pointer;
  color: #333333;
}

.page-contact__form-title {
  font-size: 2em;
  color: #E53935;
  margin-bottom: 25px;
  text-align: center;
}

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

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

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

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

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

.page-contact__faq-list {
  margin-top: 40px;
}

.page-contact__faq-item {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-contact__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  background-color: #F8F8F8;
  border-bottom: 1px solid #E0E0E0;
  list-style: none; /* Hide default marker for details */
}

.page-contact__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-contact__faq-qtext {
  flex-grow: 1;
}

.page-contact__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-contact__faq-item[open] .page-contact__faq-toggle {
  transform: rotate(45deg);
}

.page-contact__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.7;
  border-top: 1px solid #EFEFEF;
}

.page-contact__faq-answer p {
  margin-bottom: 0;
}

.page-contact__faq-answer a {
  color: #E53935;
  text-decoration: underline;
}

/* CTA Bottom Section */
.page-contact__cta-bottom {
  padding: 60px 0;
  text-align: center;
}

.page-contact__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

.page-contact__cta-description {
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

.page-contact__cta-bottom .page-contact__btn-primary {
  margin-right: 15px;
}

.page-contact__cta-bottom .page-contact__btn-secondary {
  background: #FFFFFF;
  color: #E53935;
  border: 2px solid #FFFFFF;
}

.page-contact__cta-bottom .page-contact__btn-secondary:hover {
  background: transparent;
  color: #FFFFFF;
}

/* General Image and Container Responsive Styles */
.page-contact img {
  max-width: 100%;
  height: auto;
  display: block;
  box-sizing: border-box;
}

.page-contact__section,
.page-contact__card,
.page-contact__container,
.page-contact__contact-grid,
.page-contact__social-links,
.page-contact__form-content,
.page-contact__faq-list,
.page-contact__cta-bottom .page-contact__button-group {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page-contact {
    font-size: 16px;
    line-height: 1.6;
  }

  /* HERO 主图区域 */
  .page-contact__hero-section {
    padding-top: 10px !important;
    padding-bottom: 20px;
  }

  .page-contact__hero-content {
    margin-top: -50px; /* Điều chỉnh lại khoảng cách trên di động */
    padding: 15px;
  }

  .page-contact__main-title {
    font-size: 1.8em;
    margin-bottom: 10px;
  }

  .page-contact__hero-description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }

  /* 长文金框区 - N/A for contact page */

  /* 游戏轮播 - N/A for contact page */

  /* 合作品牌六宫格 - N/A for contact page */

  /* 博客卡片区 - N/A for contact page */

  /* Các phương thức liên hệ */
  .page-contact__methods-section {
    padding: 30px 0;
  }

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

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

  .page-contact__contact-grid {
    grid-template-columns: 1fr; /* Một cột trên di động */
    gap: 20px;
  }

  .page-contact__card {
    padding: 20px;
  }

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

  .page-contact__card p {
    font-size: 0.95em;
  }

  .page-contact__social-links {
    flex-direction: column; /* Xếp chồng nút trên di động */
    gap: 10px;
    padding: 0 15px;
  }

  .page-contact__social-btn {
    width: 100% !important;
  }

  .page-contact__form-content {
    padding: 25px;
    width: 95%;
  }

  .page-contact__form-title {
    font-size: 1.5em;
  }

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

  .page-contact__form-input,
  .page-contact__form-textarea {
    padding: 10px;
    font-size: 0.95em;
  }

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

  .page-contact__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-contact__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }

  /* CTA Bottom Section */
  .page-contact__cta-bottom {
    padding: 30px 0;
  }

  .page-contact__cta-title {
    font-size: 1.8em;
  }

  .page-contact__cta-description {
    font-size: 0.95em;
  }

  .page-contact__cta-bottom .page-contact__btn-primary,
  .page-contact__cta-bottom .page-contact__btn-secondary {
    margin-right: 0;
    margin-bottom: 15px; /* Thêm khoảng cách giữa các nút */
    width: 100%; /* Đảm bảo nút chiếm toàn bộ chiều rộng */
  }

  /* 通用图片与容器 */
  .page-contact img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-contact__section,
  .page-contact__card,
  .page-contact__container,
  .page-contact__contact-grid,
  .page-contact__social-links,
  .page-contact__form-content,
  .page-contact__faq-list,
  .page-contact__cta-bottom .page-contact__button-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-contact__btn-primary,
  .page-contact__btn-secondary,
  .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,
  .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;
    flex-direction: column;
  }
}