/* style/index.css */

/* Global variables and resets for page-index scope */
:root {
  --primary-color: #0A1931; /* Deep Navy Blue */
  --secondary-color: #FFD700; /* Gold */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: #000000; /* From shared.css body background */
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
}

.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-light); /* Default text color for dark body background */
  background-color: var(--bg-dark); /* Ensure consistency with body background */
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  color: var(--secondary-color); /* Gold for titles */
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.page-index__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

/* 🚨 Video Area Styles (Must be at the top) */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 Must add desktop padding-top, ensuring content is not obscured by fixed nav bar */
  padding-top: 10px; /* Desktop: Adjust based on actual nav bar height */
  background: linear-gradient(135deg, var(--primary-color) 0%, #000000 100%);
}

.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;
}

/* 🚨 Video click link styles (Must be strictly adhered to) */
.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;
}

.page-index__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3); /* Goldish shadow on hover */
}

.page-index__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio - 🚨 PageSpeed optimization: fixed aspect ratio to prevent CLS */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.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 */
}

/* 🚨 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: var(--secondary-color); /* Gold text */
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  padding: 12px 25px;
  background: rgba(10, 25, 49, 0.8); /* Primary color with transparency */
  border: 2px solid var(--secondary-color);
  border-radius: 5px;
  white-space: nowrap;
}

/* 🚨 Play Now button styles (Must be strictly adhered to, positioned below the video in the center) */
.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: 15px 40px;
  background: var(--secondary-color); /* Gold button */
  color: var(--primary-color); /* Dark blue text on gold */
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
}

.page-index__play-now-button:hover {
  background: #e6c200; /* Slightly darker gold */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.page-index__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* 🚨 Module 1: H1 Title + CTA Buttons */
.page-index__hero-section {
  padding: 80px 20px;
  text-align: center;
  background: var(--primary-color);
  color: var(--text-light);
}

.page-index__hero-section .page-index__container {
  padding-top: 0;
}

.page-index__main-title {
  font-size: 48px;
  color: var(--secondary-color);
  margin-bottom: 25px;
  line-height: 1.2;
}

.page-index__description {
  font-size: 18px;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #e0e0e0;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  width: 100%; /* Ensure container takes full width */
  box-sizing: border-box;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 35px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
}

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

.page-index__btn-primary:hover {
  background: #e6c200;
  border-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

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

.page-index__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

/* 🚨 Module 3: Brand Introduction */
.page-index__brand-section {
  background: var(--bg-dark);
  padding: 80px 0;
  color: var(--text-light);
}

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

.page-index__brand-item {
  background: var(--primary-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure uniform height for grid items */
  display: flex;
  flex-direction: column;
}

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

.page-index__brand-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Enforce min image size */
  max-height: 250px;
}

.page-index__brand-item-title {
  font-size: 24px;
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 15px;
}

.page-index__brand-item p {
  font-size: 16px;
  color: #e0e0e0;
  flex-grow: 1; /* Allow paragraph to take available space */
}

/* 🚨 Module 2: FAQ Common Questions Area */
.page-index__faq-section {
  background: linear-gradient(135deg, #000000 0%, var(--primary-color) 100%);
  padding: 80px 0;
  color: var(--text-light);
}

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

/* FAQ容器样式 */
.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  background: var(--primary-color); /* Darker background for FAQ item */
}

/* FAQ默认状态 - 答案隐藏 */
.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;
  opacity: 0;
  color: #e0e0e0; /* Lighter text for answer */
  font-size: 15px;
  line-height: 1.7;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng !important để đảm bảo ưu tiên, giá trị đủ lớn */
  padding: 20px !important; /* Điều chỉnh padding cho trạng thái mở rộng */
  opacity: 1;
  background: #0A1931; /* Slightly different background for expanded answer */
  border-radius: 0 0 8px 8px;
}

/* Vấn đề phong cách */
.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--primary-color);
  border: 1px solid rgba(255, 215, 0, 0.2); /* Subtle gold border */
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #1a2a47; /* Slightly lighter primary on hover */
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.page-index__faq-item.active .page-index__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #1a2a47;
  color: var(--secondary-color);
}

/* Phong cách tiêu đề câu hỏi */
.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-light); /* Default text color */
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-index__faq-item.active .page-index__faq-question h3 {
  color: var(--secondary-color); /* Gold when active */
}

/* Chuyển đổi biểu tượng */
.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color); /* Gold for 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: 32px;
  height: 32px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  transform: rotate(45deg); /* Rotate for '−' effect */
  color: var(--secondary-color);
}


/* 🚨 Module 4: Blog List Display */
.page-index__blog-section {
  background: var(--bg-dark);
  padding: 80px 0;
  color: var(--text-light);
}