/* style/index.css */

:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #1A1A2E; /* Midnight Blue */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #0a0a0a;
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --border-color-light: #e0e0e0;
}

.page-index {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Body background is dark (#0a0a0a), so use light text */
  background-color: var(--background-dark);
  line-height: 1.6;
}

/* ========================================================================== */
/* VIDEO SECTION - Bắt buộc phải có */
/* ========================================================================== */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Desktop padding-top to clear fixed header */
  background: var(--secondary-color);
  box-sizing: border-box;
}

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

.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.3);
  box-sizing: border-box;
}

.page-index__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.page-index__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  box-sizing: border-box;
}

.page-index__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index__play-now-button:hover {
  background: #e6c200;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

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

/* ========================================================================== */
/* HERO SECTION (H1 + Buttons) - Bắt buộc phải có */
/* ========================================================================== */
.page-index__hero-section {
  background: var(--secondary-color);
  padding: 80px 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__hero-container {
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-index__main-title {
  font-size: 3.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-index__hero-description {
  font-size: 1.2em;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-index__cta-button {
  display: inline-block;
  padding: 15px 35px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

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

/* ========================================================================== */
/* FEATURES SECTION */
/* ========================================================================== */
.page-index__features-section {
  background: var(--background-dark);
  padding: 80px 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-index__features-container {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-index__features-title {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-index__feature-item {
  background: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.page-index__feature-icon {
  width: 120px; /* Min size 200x200, but icon-like images can be smaller if used as part of larger content. */
  height: 120px;
  margin-bottom: 20px;
  object-fit: contain;
  display: block;
  max-width: 100%;
  height: auto;
}

.page-index__feature-heading {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__feature-text {
  font-size: 1em;
  color: var(--text-light);
}

/* ========================================================================== */
/* BRAND SECTION - Bắt buộc phải có */
/* ========================================================================== */
.page-index__brand-section {
  background: var(--secondary-color);
  padding: 80px 20px;
  box-sizing: border-box;
}

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

.page-index__brand-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-index__brand-item {
  background: var(--card-bg-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.page-index__brand-heading {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-index__brand-text {
  font-size: 1em;
  color: var(--text-light);
}

/* ========================================================================== */
/* FAQ SECTION - Bắt buộc phải có */
/* ========================================================================== */
.page-index__faq-section {
  background: var(--background-dark);
  padding: 80px 20px;
  box-sizing: border-box;
}

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

.page-index__faq-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  border: 1px solid rgba(255, 215, 0, 0.3);
  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: #252542;
  border-color: var(--primary-color);
}

.page-index__faq-question:active {
  background: #2e2e50;
}

.page-index__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none;
}

.page-index__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-index__faq-item.active .page-index__faq-toggle {
  transform: rotate(45deg); /* Change to X or rotate */
  color: var(--primary-color);
}

.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: #1f1f3a;
  color: var(--text-light);
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Ensure it can expand for any content */
  padding: 20px 15px !important;
  opacity: 1;
  border-radius: 0 0 5px 5px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-top: none;
}

.page-index__faq-answer p {
  margin: 0;
  font-size: 0.95em;
  color: var(--text-light);
}

/* ========================================================================== */
/* BLOG SECTION - Bắt buộc phải có */
/* ========================================================================== */
.page-index__blog-section {
  background: var(--secondary-color);
  padding: 80px 20px;
  box-sizing: border-box;
}

.page-index__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-index__blog-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 50px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

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

.page-index__blog-item {
  background: var(--card-bg-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-index__blog-item-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  max-width: 100%;
}

.page-index__blog-item-title {
  font-size: 1.3em;
  color: var(--primary-color);
  padding: 15px 20px 10px;
  margin: 0;
}

.page-index__blog-item-excerpt {
  font-size: 0.95em;
  color: var(--text-light);
  padding: 0 20px 15px;
  flex-grow: 1;
}

.page-index__blog-item-date {
  font-size: 0.85em;
  color: #aaa;
  padding: 0 20px 20px;
  display: block;
}

/* ========================================================================== */
/* Responsive Design */
/* ========================================================================== */
@media (max-width: 1024px) {
  .page-index__main-title {
    font-size: 3em;
  }
  .page-index__features-title,
  .page-index__brand-title,
  .page-index__faq-title,
  .page-index__blog-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-index {
    font-size: 16px;
    line-height: 1.6;
  }
  
  /* Video Section Mobile */
  .page-index__video-section {
    padding-top: 10px !important; /* Mobile padding-top to clear fixed header */
    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-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;
    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;
  }

  /* Hero Section Mobile */
  .page-index__hero-section {
    padding: 60px 15px;
  }

  .page-index__main-title {
    font-size: 2.2em;
  }

  .page-index__hero-description {
    font-size: 1em;
  }

  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__cta-button {
    width: 100%;
    padding: 12px 25px;
    font-size: 1em;
  }

  /* Features Section Mobile */
  .page-index__features-section {
    padding: 60px 15px;
  }

  .page-index__features-title {
    font-size: 2em;
    margin-bottom: 40px;
  }

  .page-index__feature-icon {
    width: 100px;
    height: 100px;
  }
  
  .page-index__feature-item {
    padding: 20px;
  }

  /* Brand Section Mobile */
  .page-index__brand-section {
    padding: 60px 15px;
  }

  .page-index__brand-title {
    font-size: 2em;
    margin-bottom: 40px;
  }

  /* FAQ Section Mobile */
  .page-index__faq-section {
    padding: 60px 15px;
  }

  .page-index__faq-title {
    font-size: 2em;
    margin-bottom: 40px;
  }

  .page-index__faq-question {
    padding: 15px;
  }
  
  .page-index__faq-question h3 {
    font-size: 1em;
  }

  .page-index__faq-toggle {
    font-size: 20px;
    width: 24px;
    height: 24px;
  }
  
  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px !important;
  }

  /* Blog Section Mobile */
  .page-index__blog-section {
    padding: 60px 15px;
  }

  .page-index__blog-title {
    font-size: 2em;
    margin-bottom: 40px;
  }

  .page-index__blog-item-thumbnail {
    height: 180px;
  }

  .page-index__blog-item-title {
    font-size: 1.1em;
  }

  .page-index__blog-item-excerpt,
  .page-index__blog-item-date {
    font-size: 0.9em;
  }
  
  /* Generic responsive image/container styles */
  .page-index img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-index__section,
  .page-index__container,
  .page-index__card,
  .page-index__feature-item,
  .page-index__brand-item,
  .page-index__blog-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-index__features-grid,
  .page-index__brand-content,
  .page-index__blog-list {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .page-index__main-title {
    font-size: 1.8em;
  }
  .page-index__features-title,
  .page-index__brand-title,
  .page-index__faq-title,
  .page-index__blog-title {
    font-size: 1.8em;
  }
}

/* Blog Section Styles - Auto Generated */
.latest-blog-section {
  padding: 40px 20px;
  margin: 20px 0;
}

.latest-blog-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.latest-blog-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
  font-weight: bold;
}

.latest-blog-section p {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.blog-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.blog-card .blog-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.blog-card .blog-content {
  padding: 20px;
}

.blog-card .blog-content h3 {
  margin: 0 0 12px 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
}

.blog-card .blog-content .blog-title-link {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card .blog-content .blog-title-link:hover {
  color: #007bff;
}

.blog-card .blog-content .blog-excerpt {
  color: #666;
  line-height: 1.7;
  margin: 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
}

.blog-card .blog-content .blog-date {
  display: block;
  color: #999;
  font-size: 0.9rem;
  margin: 15px 0 12px 0;
}

.blog-card .blog-content .read-more-link {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
}

.blog-card .blog-content .read-more-link:hover {
  background: #0056b3;
}

.view-all-posts {
  text-align: center;
  margin-top: 30px;
}

.view-all-posts .cta-button {
  display: inline-block;
  padding: 12px 24px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.view-all-posts .cta-button.secondary {
  background: #6c757d;
}

.view-all-posts .cta-button.secondary:hover {
  background: #5a6268;
}

.view-all-posts .cta-button:hover {
  background: #0056b3;
}

@media (max-width: 768px) {
  .blog-list {
    grid-template-columns: 1fr;
  }
  
  .latest-blog-section h2 {
    font-size: 1.5rem;
  }
  
  .blog-card .blog-img {
    height: 250px;
  }
  
  .blog-card .blog-content {
    padding: 15px;
  }
}
