/* style/terms-conditions.css */
/* body đã padding-top: var(--header-offset)；trang này cấm viết lại biến đó */

/* Biến màu tùy chỉnh */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Kiểu cơ bản cho trang */
.page-terms-conditions {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-main); /* Chữ sáng trên nền tối */
  background-color: var(--background-color); /* Nền xanh đậm/đen */
  padding-bottom: 60px; /* Khoảng trống trên footer */
}

/* Phần Hero */
.page-terms-conditions__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Hình ảnh ở trên, nội dung ở dưới */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Khoảng đệm nhỏ phía trên */
  text-align: center;
  overflow: hidden; /* Đảm bảo nội dung không tràn */
  box-sizing: border-box;
}

.page-terms-conditions__hero-image {
  width: 100%;
  height: auto;
  max-height: 500px; /* Giới hạn chiều cao cho thẩm mỹ */
  object-fit: cover;
  display: block;
  margin-bottom: 30px; /* Khoảng trống giữa hình ảnh và nội dung */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__hero-content {
  max-width: 900px;
  margin: 0 auto;
  z-index: 1; /* Đảm bảo nội dung nằm trên mọi hiệu ứng nền */
  position: relative;
}

.page-terms-conditions__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Kích thước font H1 đáp ứng */
  color: var(--gold-color);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-terms-conditions__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-terms-conditions__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ hơn */
  width: 100%;
  max-width: 600px; /* Giới hạn chiều rộng nhóm nút */
  margin: 0 auto;
}

.page-terms-conditions__btn-primary,
.page-terms-conditions__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Đảm bảo các nút không tràn */
}

.page-terms-conditions__btn-primary {
  background: var(--button-gradient);
  color: var(--text-main);
  border: 2px solid transparent;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-color);
}

.page-terms-conditions__btn-secondary {
  background: transparent;
  color: var(--gold-color);
  border: 2px solid var(--gold-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__btn-secondary:hover {
  background: rgba(242, 193, 78, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--gold-color);
}

/* Khu vực nội dung */
.page-terms-conditions__content-area {
  max-width: 1000px;
  margin: 40px auto;
  padding: 40px 20px;
  background-color: var(--card-bg); /* Nền xanh đậm hơn cho nội dung */
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  color: var(--text-main); /* Chữ sáng */
}

.page-terms-conditions__section-title {
  color: var(--gold-color);
  font-size: 2.2em;
  margin-top: 40px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--divider-color);
  padding-bottom: 15px;
}

.page-terms-conditions__sub-title {
  color: var(--primary-color);
  font-size: 1.6em;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-terms-conditions__paragraph {
  margin-bottom: 20px;
  font-size: 1.1em;
  color: var(--text-main);
}

.page-terms-conditions__list {
  list-style-type: disc;
  margin-left: 30px;
  margin-bottom: 20px;
  color: var(--text-main);
}

.page-terms-conditions__list li {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.page-terms-conditions__list li strong {
  color: var(--gold-color);
}

.page-terms-conditions__image {
  width: 100%;
  height: auto;
  min-width: 200px; /* Yêu cầu kích thước tối thiểu */
  min-height: 200px;
  border-radius: 8px;
  margin: 30px 0;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__content-area a {
  color: var(--gold-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.page-terms-conditions__content-area a:hover {
  color: var(--glow-color);
}

/* Phần FAQ */
.page-terms-conditions__faq-list {
  margin-top: 40px;
}

.page-terms-conditions__faq-item {
  background-color: var(--deep-green); /* Nền tối hơn cho các mục FAQ */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main);
  background-color: var(--primary-color); /* Màu chính cho nền câu hỏi */
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.page-terms-conditions__faq-question:hover {
  background-color: var(--secondary-color);
}

.page-terms-conditions__faq-qtext {
  flex-grow: 1;
  color: var(--text-main);
}

.page-terms-conditions__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  transition: transform 0.3s ease;
  color: var(--gold-color);
}

/* Đối với thẻ details, nút chuyển đổi được xử lý bởi trình duyệt, nhưng chúng ta có thể tạo kiểu cho biểu tượng */
.page-terms-conditions__faq-item[open] .page-terms-conditions__faq-toggle {
  transform: rotate(45deg); /* Dấu cộng xoay thành dấu chéo */
}

.page-terms-conditions__faq-answer {
  padding: 15px 25px;
  font-size: 1.1em;
  color: var(--text-secondary);
  background-color: var(--card-bg); /* Nền card cho câu trả lời */
}

/* Kiểu cụ thể cho phần tử details */
.page-terms-conditions__faq-item details > summary {
  list-style: none; /* Ẩn dấu mặc định */
}
.page-terms-conditions__faq-item details > summary::-webkit-details-marker {
  display: none; /* Ẩn dấu mặc định cho trình duyệt webkit */
}

/* Kiểu đáp ứng */
@media (max-width: 768px) {
  .page-terms-conditions {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-terms-conditions__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Đảm bảo khoảng đệm nhỏ phía trên */
  }

  .page-terms-conditions__hero-image {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-terms-conditions__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
    margin-bottom: 15px;
  }

  .page-terms-conditions__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }

  .page-terms-conditions__cta-buttons {
    flex-direction: column; /* Xếp chồng các nút theo chiều dọc */
    gap: 10px;
    padding: 0 15px; /* Thêm khoảng đệm vào vùng chứa nút */
  }

  .page-terms-conditions__btn-primary,
  .page-terms-conditions__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 1em;
  }

  .page-terms-conditions__content-area {
    margin: 20px auto;
    padding: 20px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-terms-conditions__section-title {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .page-terms-conditions__sub-title {
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .page-terms-conditions__paragraph,
  .page-terms-conditions__list li {
    font-size: 1em;
  }

  .page-terms-conditions__image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 20px 0;
  }

  .page-terms-conditions__faq-question {
    padding: 15px 20px;
    font-size: 1.1em;
  }

  .page-terms-conditions__faq-answer {
    padding: 10px 20px;
    font-size: 1em;
  }
}

/* Đảm bảo không có bộ lọc trên hình ảnh */
.page-terms-conditions img {
  filter: none !important;
}

/* CSS cho các phần tử video (nếu có) */
.page-terms-conditions video,
.page-terms-conditions__video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.page-terms-conditions__video-section,
.page-terms-conditions__video-container,
.page-terms-conditions__video-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 768px) {
  .page-terms-conditions video,
  .page-terms-conditions__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-terms-conditions__video-section,
  .page-terms-conditions__video-container,
  .page-terms-conditions__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-terms-conditions__video-section {
    padding-top: 10px !important;
  }
  
  .page-terms-conditions__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}