/* style/index.css */
/* 
  Màu sắc chính: #26A9E0
  Màu sắc phụ: #FFFFFF
  Màu nền body (từ shared.css): #1a1a2e (dark) -> Sử dụng màu chữ #FFFFFF cho các phần trên nền body trực tiếp
*/

/* ---------------------------------------------------- */
/* General Page Styles */
/* ---------------------------------------------------- */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

.page-index__section {
  padding: 80px 20px;
  text-align: center;
}

.page-index__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-index__dark-bg {
  background-color: #1a1a2e; /* Inherit from body or use a slightly different dark tone */
  color: #ffffff;
}

.page-index__light-bg {
  background-color: #f0f8ff; /* A very light blue tint */
  color: #333333;
}

.page-index h1,
.page-index h2,
.page-index h3 {
  color: #26A9E0; /* Brand primary color for headings */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-index h1 {
  font-size: 3.2em;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index h2 {
  font-size: 2.5em;
  font-weight: 600;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.page-index h3 {
  font-size: 1.8em;
  font-weight: 500;
}

.page-index p {
  font-size: 1.1em;
  margin-bottom: 15px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.4);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-primary:hover {
  background-color: #1e87b7; /* Darker shade of primary */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(38, 169, 224, 0.6);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background-color: #EA7C07; /* Login color for secondary CTA, high contrast */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(234, 124, 7, 0.4);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__btn-secondary:hover {
  background-color: #c96706; /* Darker shade of secondary */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(234, 124, 7, 0.6);
}

/* ---------------------------------------------------- */
/* Video Section */
/* ---------------------------------------------------- */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Fixed header spacing */
  background-color: #1a1a2e; /* Dark background for video section */
}

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

.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(0, 0, 0, 0.2);
}

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

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

.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.3);
  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: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(38, 169, 224, 0.8); /* Using primary color for hint */
  border-radius: 5px;
  white-space: nowrap;
}

.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: #26A9E0; /* Primary brand color */
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__play-now-button:hover {
  background: #1e87b7; /* Darker shade of primary */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

/* ---------------------------------------------------- */
/* Module 1: H1 Title + CTA Buttons */
/* ---------------------------------------------------- */
.page-index__title-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #1a1a2e; /* Dark background */
  color: #ffffff;
}

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

.page-index__main-title {
  color: #26A9E0; /* Primary color for H1 */
  margin-bottom: 25px;
}

.page-index__title-description {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-index__cta-button {
  flex-shrink: 0; /* Prevent buttons from shrinking too much */
}

/* ---------------------------------------------------- */
/* Module 3: Brand Introduction */
/* ---------------------------------------------------- */
.page-index__brand-section {
  padding: 80px 20px;
  background-color: #f0f8ff; /* Light background */
  color: #333333;
}

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

.page-index__brand-title {
  color: #26A9E0;
  margin-bottom: 50px;
  font-size: 2.5em;
}

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

.page-index__brand-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.page-index__brand-item-title {
  color: #26A9E0;
  font-size: 1.5em;
  margin-bottom: 15px;
}

.page-index__brand-item p {
  color: #555555;
  font-size: 1em;
}

.page-index__brand-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------------------- */
/* Module 2: FAQ Common Questions Area */
/* ---------------------------------------------------- */
.page-index__faq-section {
  padding: 80px 20px;
  background-color: #1a1a2e; /* Dark background */
  color: #ffffff;
}

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

.page-index__faq-main-title {
  color: #26A9E0;
  margin-bottom: 50px;
  font-size: 2.5em;
}

.page-index__faq-list {
  margin-top: 30px;
}

/* FAQ container styles */
.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

/* 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 15px;
  opacity: 0;
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for answer */
  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 15px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.1); /* Lighter background for active answer */
  border-radius: 0 0 5px 5px;
}

/* Question style */
.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #2a2a40; /* Darker background for question */
  border: 1px solid #3c3c5c;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-index__faq-question:hover {
  background: #3a3a50; /* Slightly lighter on hover */
  border-color: #4c4c6c;
}

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

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

/* Toggle icon */
.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: #26A9E0; /* Primary color 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: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  color: #EA7C07; /* Secondary color when active */
  transform: rotate(45deg); /* Rotate for 'x' effect */
}


/* ---------------------------------------------------- */
/* Module 4: Blog List Display */
/* ---------------------------------------------------- */
.page-index__blog-section {
  padding: 80px 20px;
  background-color: #f0f8ff; /* Light background */
  color: #333333;
}

.page-index__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-index__blog-title {
  color: #26A9E0;
  margin-bottom: 50px;
  font-size: 2.5em;
}

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

.page-index__blog-item {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

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

.page-index__blog-item-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
}

.page-index__blog-link {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: inherit;
}

.page-index__blog-item-title {
  color: #26A9E0;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-index__blog-item-excerpt {
  color: #555555;
  font-size: 0.95em;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-index__blog-item-date {
  font-size: 0.85em;
  color: #888888;
  display: block;
}

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

.page-index__view-all-button {
  padding: 12px 25px;
  font-size: 1em;
  border-radius: 5px;
}


/* ---------------------------------------------------- */
/* Responsive Design */
/* ---------------------------------------------------- */
@media (max-width: 1024px) {
  .page-index h1 {
    font-size: 2.8em;
  }
  .page-index h2 {
    font-size: 2.2em;
  }
  .page-index h3 {
    font-size: 1.6em;
  }
}

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

  .page-index__section {
    padding: 40px 15px;
  }

  .page-index__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-index__video-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }
  
  .page-index__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .page-index__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    overflow: hidden !important;
  }
  
  .page-index__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important; /* Ensure video scales */
    border-radius: 4px;
    object-fit: contain; /* Use contain to ensure video is fully visible */
  }
  
  .page-index__video-cta {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .page-index__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index h1 {
    font-size: 2.2em;
  }
  .page-index h2 {
    font-size: 1.8em;
  }
  .page-index h3 {
    font-size: 1.4em;
  }

  .page-index__title-section {
    padding: 40px 15px;
  }
  .page-index__title-description {
    font-size: 1em;
  }

  .page-index__cta-buttons {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding: 0 15px;
  }
  .page-index__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  .page-index__brand-section,
  .page-index__faq-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__brand-title,
  .page-index__faq-main-title,
  .page-index__blog-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-index__brand-content {
    grid-template-columns: 1fr;
  }

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

  .page-index__blog-list {
    grid-template-columns: 1fr;
  }
  .page-index__blog-item-image {
    height: 180px;
  }
  .page-index__blog-item-title {
    font-size: 1.2em;
  }
  .page-index__blog-item-excerpt {
    font-size: 0.9em;
  }
  .page-index__view-all-button-container {
    margin-top: 30px;
  }
  .page-index__view-all-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 1em !important;
  }

  /* Ensure all images are responsive */
  .page-index img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-index__section,
  .page-index__card,
  .page-index__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-index__blog-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .page-index h1 {
    font-size: 1.8em;
  }
  .page-index h2 {
    font-size: 1.5em;
  }
  .page-index h3 {
    font-size: 1.2em;
  }
  .page-index__main-title {
    font-size: 2em;
  }
}