/* style/about.css */

/* --- Base Styles --- */
.page-about {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #ffffff; /* Explicitly set for clarity, though shared.css might handle body */
}

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

.page-about__section {
  padding: 60px 0;
  text-align: center;
}

.page-about__section-title {
  font-size: 36px;
  color: #26A9E0; /* Brand color for titles */
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-about__section-title--white {
  color: #ffffff;
}

.page-about__section-description {
  font-size: 18px;
  color: #555555;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-about__section-description--white {
  color: #f0f0f0;
}

/* --- Hero Section --- */
.page-about__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header offset */
  background: linear-gradient(135deg, #26A9E0 0%, #a7e0ff 100%); /* Gradient background with brand color */
  overflow: hidden; /* Ensure content doesn't overflow */
}

.page-about__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-about__hero-image {
  width: 100%;
  height: auto; /* Ensure aspect ratio */
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 40px;
}

.page-about__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  color: #ffffff; /* White text for hero content */
}

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

.page-about__intro-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: #f0f0f0;
}

/* --- CTA Button Base Style --- */
.page-about__cta-button,
.page-about__btn-primary,
.page-about__btn-secondary,
.page-about a[class*="button"],
.page-about a[class*="btn"] {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%; /* Ensure button fits container */
  box-sizing: border-box; /* Include padding/border in width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
}

.page-about__cta-button {
  background: #EA7C07; /* Login color for primary CTA */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-about__cta-button:hover {
  background: #d46e06;
  border-color: #d46e06;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.page-about__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

.page-about__btn-primary--login {
  background: #EA7C07;
  border-color: #EA7C07;
}
.page-about__btn-primary--login:hover {
  background: #d46e06;
  border-color: #d46e06;
}

.page-about__btn-secondary {
  background: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-about__btn-secondary:hover {
  background: #f0f8ff;
  color: #1f8ec4;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-about__btn-secondary--white-border {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.page-about__btn-secondary--white-border:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.page-about__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* --- Giới thiệu về HM88 (Our Story, Mission) --- */
.page-about__story-mission {
  background-color: #ffffff;
  text-align: left;
}

.page-about__content-wrapper {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-about__text-block {
  flex: 1;
}

.page-about__text-block p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333333;
}

.page-about__image-right {
  flex-shrink: 0;
  width: 40%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  min-width: 200px; /* Min size for content images */
  min-height: 200px; /* Min size for content images */
}

/* --- Tại sao chọn HM88 (Why Choose Us) --- */
.page-about__dark-bg {
  background-color: #26A9E0;
  color: #ffffff;
}

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

.page-about__feature-card {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white for contrast */
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
  height: 100%; /* Ensure cards are same height */
  display: flex;
  flex-direction: column;
}

.page-about__feature-card:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.25);
}

.page-about__card-title {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: bold;
  color: #ffffff; /* White title for dark background */
}

.page-about__feature-card p {
  font-size: 16px;
  color: #f0f0f0; /* Light grey text for dark background */
  flex-grow: 1;
}

/* --- Khám phá Thế giới Giải trí Đa dạng (Games Showcase) --- */
.page-about__games-showcase {
  background-color: #f8f9fa; /* Light background for this section */
  text-align: center;
}

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

.page-about__game-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.page-about__game-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  min-width: 200px; /* Min size for content images */
  min-height: 200px; /* Min size for content images */
}

.page-about__game-card .page-about__card-title {
  color: #26A9E0;
  padding: 20px 15px 10px;
  font-size: 20px;
}

.page-about__game-card p {
  color: #555555;
  font-size: 15px;
  padding: 0 15px 20px;
  flex-grow: 1;
}

.page-about__game-card .page-about__btn-secondary {
  margin: 0 15px 20px;
  width: calc(100% - 30px);
  font-size: 16px;
  padding: 10px 20px;
  align-self: center;
}

/* --- Cam kết Bảo mật, Công bằng và Hỗ trợ Tận tâm (Security & Support) --- */
.page-about__security-support {
  background-color: #26A9E0;
}

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

.page-about__info-card {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-about__info-card .page-about__card-title {
  color: #ffffff;
}

.page-about__info-card .page-about__card-text--white {
  color: #f0f0f0;
  font-size: 16px;
  flex-grow: 1;
}

/* --- FAQ Section --- */
.page-about__faq-section {
  background-color: #ffffff;
}

.page-about__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

/* FAQ容器样式 */
.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-about__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0 15px;
  opacity: 0;
  color: #333333;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-about__faq-item.active .page-about__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: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

/* Vấn đề kiểu dáng */
.page-about__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-about__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

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

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

/* Biểu tượng chuyển đổi */
.page-about__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 biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: #26A9E0; /* Màu thương hiệu cho biểu tượng chuyển đổi hoạt động */
  transform: rotate(45deg); /* Xoay để có dấu trừ */
}

/* --- CTA Bottom Section --- */
.page-about__cta-bottom {
  background-color: #26A9E0;
  padding-bottom: 80px;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-about__main-title {
    font-size: 40px;
  }
  .page-about__section-title {
    font-size: 30px;
  }
  .page-about__intro-description {
    font-size: 18px;
  }
  .page-about__content-wrapper {
    flex-direction: column;
    gap: 30px;
  }
  .page-about__image-right {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .page-about {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 🚨 Mobile Hero Section */
  .page-about__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-about__hero-image {
    border-radius: 8px;
    margin-bottom: 30px;
  }

  .page-about__main-title {
    font-size: 32px;
  }
  .page-about__intro-description {
    font-size: 16px;
  }
  .page-about__section {
    padding: 40px 0;
  }
  .page-about__section-title {
    font-size: 26px;
    margin-bottom: 15px;
  }
  .page-about__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* 🚨 Images in content area */
  .page-about img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px; /* Enforce minimum size even on mobile */
    min-height: 200px; /* Enforce minimum size even on mobile */
  }

  .page-about__image-right {
    width: 100%;
    min-width: 200px;
    min-height: 200px;
  }

  .page-about__game-image {
    height: auto !important; /* Allow height to adjust */
    min-height: 200px;
    min-width: 200px;
  }

  /* 🚨 Buttons in content area */
  .page-about__cta-button,
  .page-about__btn-primary,
  .page-about__btn-secondary,
  .page-about a[class*="button"],
  .page-about 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;
    font-size: 16px;
  }
  
  .page-about__cta-buttons,
  .page-about__button-group,
  .page-about__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }

  .page-about__feature-card,
  .page-about__game-card,
  .page-about__info-card {
    padding: 20px;
    border-radius: 8px;
  }
  .page-about__card-title {
    font-size: 20px;
  }
  .page-about__feature-card p,
  .page-about__game-card p,
  .page-about__info-card p {
    font-size: 15px;
  }

  .page-about__game-card .page-about__btn-secondary {
    width: calc(100% - 30px);
  }

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

  .page-about__container {
    padding: 0 15px;
  }
  .page-about__section {
    padding-left: 0;
    padding-right: 0;
  }
  .page-about__text-block p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .page-about__main-title {
    font-size: 28px;
  }
  .page-about__section-title {
    font-size: 24px;
  }
}