/* style/support.css */

/* Biến CSS cho màu sắc */
:root {
  --primary-color: #1A2E44;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212;
  --background-light: #f8f9fa;
  --card-background: rgba(255, 255, 255, 0.1);
  --border-color: #3a4a5c;
  --button-hover-dark: #0056b3;
  --button-hover-light: #e0e0e0;
}

/* -------------------- Base Styles -------------------- */
.page-support {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Mặc định cho nền tối */
  background-color: var(--background-dark);
  padding-top: 120px; /* Đảm bảo nội dung không bị header cố định che khuất */
}

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

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

.page-support__section-subtitle {
  font-size: 1.1em;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-support__dark-section {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 80px 0;
}

.page-support__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
  padding: 80px 0;
}

.page-support__light-bg .page-support__section-title,
.page-support__light-bg .page-support__section-subtitle {
  color: var(--text-dark);
}

/* -------------------- Buttons -------------------- */
.page-support__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Cho phép các nút xuống dòng trên di động */
}

.page-support__cta-button,
.page-support__btn-primary,
.page-support__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  white-space: normal; /* Cho phép văn bản nút xuống dòng */
  word-wrap: break-word;
}

.page-support__btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.page-support__btn-primary:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

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

.page-support__text-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-support__text-link:hover {
  color: #e6c200;
  text-decoration: underline;
}

/* -------------------- Hero Section -------------------- */
.page-support__hero-section {
  padding: 100px 0;
  background-image: url('[GALLERY:hero:nohu82,support,banner]');
  background-size: cover;
  background-position: center;
  text-align: center;
}

.page-support__main-title {
  font-size: 3.5em;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-support__hero-description {
  font-size: 1.2em;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: rgba(255, 255, 255, 0.9);
}

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

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

.page-support__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-support__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-support__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-support__faq-question:active {
  background: #eeeeee;
}

.page-support__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-dark);
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
}

.page-support__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn icon chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-support__faq-item.active .page-support__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg);
}

.page-support__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 15px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
  border-radius: 0 0 5px 5px;
}

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

/* -------------------- Contact Section -------------------- */
.page-support__contact-section {
  padding: 80px 0;
  background-color: var(--primary-color);
}

.page-support__contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.page-support__contact-item {
  background-color: var(--card-background);
  border-radius: 10px;
  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;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.page-support__contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-support__contact-icon {
  width: 80px; /* Kích thước tối thiểu 200px, nhưng đây là icon, sẽ được thay thế */
  height: 80px; /* Kích thước tối thiểu 200px, nhưng đây là icon, sẽ được thay thế */
  object-fit: contain;
  margin-bottom: 20px;
  filter: none; /* Đảm bảo không có filter */
}

.page-support__contact-title {
  font-size: 1.8em;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-support__contact-description {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 25px;
  flex-grow: 1;
}

/* -------------------- Resources Section (Blog List equivalent) -------------------- */
.page-support__resources-section {
  padding: 80px 0;
}

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

.page-support__resource-card {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-support__resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-support__resource-image {
  width: 100%;
  height: 200px; /* Đảm bảo kích thước tối thiểu */
  object-fit: cover;
  filter: none; /* Đảm bảo không có filter */
}

.page-support__resource-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.page-support__resource-link {
  text-decoration: none;
  color: var(--text-dark);
}

.page-support__resource-title {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.page-support__resource-link:hover .page-support__resource-title {
  color: var(--secondary-color);
}

.page-support__resource-excerpt {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-support__read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.page-support__read-more:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.page-support__view-all-button {
  text-align: center;
  margin-top: 50px;
}

/* -------------------- Responsible Gaming Section -------------------- */
.page-support__responsible-gaming-section {
  padding: 80px 0;
  text-align: center;
}

.page-support__responsible-gaming-section .page-support__section-title {
  color: var(--secondary-color);
}

.page-support__responsible-gaming-section .page-support__section-subtitle,
.page-support__responsible-gaming-text {
  color: rgba(255, 255, 255, 0.8);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

/* -------------------- Responsive Design -------------------- */
@media (max-width: 992px) {
  .page-support {
    padding-top: 100px; /* Điều chỉnh padding-top cho tablet */
  }

  .page-support__main-title {
    font-size: 3em;
  }

  .page-support__section-title {
    font-size: 2em;
  }

  .page-support__hero-description,
  .page-support__section-subtitle {
    font-size: 1em;
  }

  .page-support__cta-button,
  .page-support__btn-primary,
  .page-support__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  .page-support {
    padding-top: 100px !important; /* Điều chỉnh padding-top cho di động */
    font-size: 15px;
    line-height: 1.5;
  }

  .page-support__container {
    padding: 0 15px;
  }

  .page-support__hero-section,
  .page-support__faq-section,
  .page-support__contact-section,
  .page-support__resources-section,
  .page-support__responsible-gaming-section {
    padding: 40px 0;
  }

  .page-support__main-title {
    font-size: 2.5em;
  }

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

  .page-support__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-support__cta-button,
  .page-support__btn-primary,
  .page-support__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  /* FAQ Mobile */
  .page-support__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-support__faq-question h3 {
    font-size: 15px;
    margin-bottom: 0;
    width: calc(100% - 40px);
  }
  
  .page-support__faq-toggle {
    margin-left: 10px;
    width: 24px;
    height: 24px;
    font-size: 20px;
  }
  
  .page-support__faq-answer {
    padding: 0 15px;
  }
  
  .page-support__faq-item.active .page-support__faq-answer {
    padding: 15px !important;
  }

  /* Contact Section Mobile */
  .page-support__contact-grid {
    grid-template-columns: 1fr;
  }

  .page-support__contact-icon {
    width: 60px; /* Kích thước tối thiểu 200px, nhưng đây là icon, sẽ được thay thế */
    height: 60px; /* Kích thước tối thiểu 200px, nhưng đây là icon, sẽ được thay thế */
  }

  /* Resources Section Mobile */
  .page-support__resource-grid {
    grid-template-columns: 1fr;
  }
  
  .page-support__resource-image {
    height: 180px; /* Điều chỉnh chiều cao cho di động */
  }

  /* Responsive Images & Videos (General Rule) */
  .page-support img,
  .page-support video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-support__section,
  .page-support__card,
  .page-support__container,
  .page-support__contact-item,
  .page-support__resource-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }

  .page-support__contact-item, .page-support__resource-card {
    margin-left: 15px;
    margin-right: 15px;
  }

}

/* Đảm bảo tất cả hình ảnh đều có kích thước lớn hơn 200px */
.page-support img:not(.page-support__contact-icon) {
  min-width: 200px;
  min-height: 200px;
}

/* Card background for contrast */
.page-support__card {
  background: #ffffff; /* Ưu tiên nền trắng cho thẻ */
  color: var(--text-dark);
  border: 1px solid #e0e0e0;
}

.page-support__card .page-support__contact-title,
.page-support__card .page-support__resource-title {
  color: var(--primary-color);
}

.page-support__card .page-support__contact-description,
.page-support__card .page-support__resource-excerpt {
  color: #555;
}