/* style/index.css */
/* 页面完整样式代码 - 注意：所有选择器必须使用BEM命名规则（双下划线__连接） */

/* 智能文字颜色选择器 - body背景色为 #121212 (dark), 默认文字颜色应为浅色 */
.page-index {
  color: #ffffff; /* 必须使用浅色文字 */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* body背景色由shared.css控制 */
}

/* --- Video Section --- */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 顶部间距以公用片段约定为准，使用 var(--header-offset)，避免被固定页头盖住 */
  padding-top: var(--header-offset, 120px);
  background: linear-gradient(135deg, #017439, #00562a); /* Sử dụng màu xanh lá thương hiệu */
  box-sizing: border-box; /* Ensures padding doesn't add to total width */
}

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

/* 🚨 Video click link styles (must strictly adhere) */
.page-index__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px; /* Apply border-radius here as well for consistency */
  overflow: hidden; /* Ensure content respects border-radius */
}

.page-index__video-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-index__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio - 🚨 PageSpeed optimization: fixed aspect ratio to avoid CLS */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background-color: #000; /* Fallback for video area */
}

.page-index__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* Prevent video controls from blocking click event */
  background-color: #000; /* Ensure black background if video not loaded */
}

/* 🚨 Video click hint overlay styles (optional, enhances user experience) */
.page-index__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5); /* Darker overlay */
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-index__video-link:hover .page-index__video-overlay {
  opacity: 1;
}

.page-index__video-click-hint {
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  padding: 12px 25px;
  background: rgba(195, 8, 8, 0.8); /* Use Register/Login red color */
  border-radius: 50px; /* More rounded */
  white-space: nowrap;
  letter-spacing: 1px;
}

/* 🚨 Play Now button styles (must strictly adhere, centered below video) */
.page-index__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-index__play-now-button {
  display: inline-block;
  padding: 18px 50px;
  background: #C30808; /* Use Register/Login red color */
  color: #FFFF00; /* Use Register/Login font color */
  text-decoration: none;
  border-radius: 50px; /* Highly rounded */
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.page-index__play-now-button:hover {
  background: #a30606; /* Darker red on hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* --- H1 Title Section --- */
.page-index__title-section {
  padding: 80px 20px;
  text-align: center;
  background: #1a1a1a; /* Dark background to contrast with light text */
  color: #ffffff;
  box-sizing: border-box;
}

.page-index__title-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-index__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #FFFF00; /* Highlight H1 with yellow */
  line-height: 1.2;
}

.page-index__title-description {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box; /* Include padding in width calculation */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-index__cta-button--register {
  background: #C30808; /* Register red */
  color: #FFFF00; /* Register font yellow */
  border: 2px solid transparent;
}

.page-index__cta-button--register:hover {
  background: #a30606;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-index__cta-button--login {
  background: #017439; /* Primary green */
  color: #ffffff;
  border: 2px solid #017439;
}

.page-index__cta-button--login:hover {
  background: #00562a;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- Brand Introduction Section --- */
.page-index__brand-section {
  padding: 80px 20px;
  background: #017439; /* Primary brand color for a dark section */
  color: #ffffff; /* Light text for dark background */
  box-sizing: border-box;
}

.page-index__brand-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__brand-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 60px;
  color: #FFFF00; /* Highlight with yellow */
}

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

.page-index__brand-item {
  background: rgba(255, 255, 255, 0.1); /* Slightly transparent white for cards */
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
}

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

.page-index__brand-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 25px;
  object-fit: cover;
  min-width: 200px; /* Min size constraint */
  min-height: 200px; /* Min size constraint */
  width: 100%; /* Ensure it fills available space */
}

.page-index__brand-item-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #FFFF00; /* Highlight with yellow */
}

.page-index__brand-item p {
  font-size: 16px;
  line-height: 1.7;
  color: #f0f0f0;
}

.page-index__brand-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
}

.page-index__brand-features-list li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
  font-size: 16px;
  color: #f0f0f0;
}

.page-index__brand-features-list li::before {
  content: '✓';
  color: #FFFF00; /* Yellow checkmark */
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* --- FAQ Section --- */
.page-index__faq-section {
  padding: 80px 20px;
  background: #1a1a1a; /* Dark background */
  color: #ffffff; /* Light text */
  box-sizing: border-box;
}

.page-index__faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-index__faq-main-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 60px;
  color: #FFFF00; /* Highlight with yellow */
}

.page-index__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* FAQ container styles */
.page-index__faq-item {
  margin-bottom: 0; /* Gap handled by flex gap */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  background: #2a2a2a; /* Slightly lighter dark background for items */
}

/* FAQ default state - answer hidden */
.page-index__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 20px; /* Match question padding */
  opacity: 0;
  color: #f0f0f0;
}

/* FAQ expanded state - 🚨 Use !important and sufficiently large max-height to ensure expansion */
.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to contain any content */
  padding: 20px !important; /* Adjust padding as needed */
  opacity: 1;
  background: #3a3a3a; /* Different background for expanded answer */
  border-radius: 0 0 10px 10px;
  color: #f0f0f0;
}

/* Question styles */
.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px; /* Increased padding */
  background: #2a2a2a;
  border: 1px solid #444; /* Darker border */
  border-radius: 10px; /* More rounded */
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: #ffffff;
}

.page-index__faq-question:hover {
  background: #3a3a3a;
  border-color: #666;
}

.page-index__faq-question:active {
  background: #4a4a4a;
}

/* Question title styles */
.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px; /* Larger font size */
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 tag from blocking click event */
  color: #ffffff;
}

/* Toggle icon */
.page-index__faq-toggle {
  font-size: 30px; /* Larger icon */
  font-weight: bold;
  line-height: 1;
  color: #FFFF00; /* Yellow toggle icon */
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px; /* Larger touch target */
  height: 35px;
}