/* style/index.css */

/* Global page styles within .page-index scope */
.page-index {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark (#1a1a2e), so text is light */
  background-color: transparent; /* Main content background will be transparent to show body background */
}

.page-index__section {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden; /* Prevent content overflow */
}

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

.page-index__main-title,
.page-index__brand-title,
.page-index__faq-main-title,
.page-index__blog-title {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #ffffff; /* Default for dark background sections */
  line-height: 1.2;
}

.page-index__hero-section .page-index__main-title {
  color: #ffffff; /* H1 in hero section */
}

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

/* Smart color contrast classes */
.page-index__dark-bg {
  background-color: #1a1a2e; /* Example dark background, or primary color */
  color: #ffffff;
}

.page-index__light-bg {
  background-color: #FFFFFF;
  color: #333333;
}

.page-index__light-bg .page-index__main-title,
.page-index__light-bg .page-index__brand-title,
.page-index__light-bg .page-index__faq-main-title,
.page-index__light-bg .page-index__blog-title,
.page-index__light-bg .page-index__brand-item-title,
.page-index__light-bg .page-index__blog-item-title {
  color: #017439; /* Use primary color for titles on light background */
}

.page-index__light-bg p {
  color: #333333;
}

/* CTA Buttons */
.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-index__cta-button {
  display: inline-block;
  padding: 15px 40px;
  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: nowrap; /* Prevent text wrapping for single line */
}

.page-index__cta-button--register {
  background: #C30808; /* Custom Register color */
  color: #FFFF00; /* Custom Register font color */
}

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

.page-index__cta-button--login {
  background: #C30808; /* Custom Login color */
  color: #FFFF00; /* Custom Login font color */
}

.page-index__cta-button--login:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-index__cta-button--view-all {
  background: #017439; /* Primary color */
  color: #FFFFFF;
  padding: 12px 30px;
  font-size: 16px;
}

.page-index__cta-button--view-all:hover {
  background: #005a2d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 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; /* Match body background for seamless look */
}

.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.4);
  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(1, 116, 57, 0.8); /* Primary color with transparency */
  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: #C30808; /* Custom Login/Register color */
  color: #FFFF00; /* Custom Login/Register font color */
  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: nowrap;
}

.page-index__play-now-button:hover {
  background: #a30606;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Hero Section (Module 1) */
.page-index__hero-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #1a1a2e; /* Dark background for hero */
  color: #ffffff;
}

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

/* Brand Section (Module 3) */
.page-index__brand-section {
  padding: 80px 20px;
  background-color: #FFFFFF; /* Light background for brand section */
  color: #333333;
  text-align: center;
}

.page-index__brand-title {
  color: #017439; /* Primary color for title on light background */
}

.page-index__brand-intro-text {
  font-size: 18px;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

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

.page-index__brand-item {
  background-color: #f8f8f8;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

.page-index__brand-item-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #017439; /* Primary color for item titles */
}

.page-index__brand-item p {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1; /* Allow paragraph to grow and push image down */
}

.page-index__brand-item-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: auto; /* Push image to the bottom if content is short */
  object-fit: cover;
  min-height: 200px; /* Minimum size for content images */
}

/* FAQ Section (Module 2) */
.page-index__faq-section {
  padding: 80px 20px;
  background-color: #1a1a2e; /* Dark background for FAQ */
  color: #ffffff;
  text-align: center;
}

.page-index__faq-main-title {
  color: #ffffff;
}

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

.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: #2a2a3e; /* Slightly lighter dark background for FAQ item */
}

.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #017439; /* Primary color for question background */
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  position: relative;
  border: 1px solid #017439;
}

.page-index__faq-question:hover {
  background: #005a2d;
}

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

.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click */
  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 'x' effect, or just change text */
  color: #FFFF00; /* Yellow for active toggle */
}

.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 25px;
  opacity: 0;
  color: #f0f0f0;
  background-color: #2a2a3e;
  border-radius: 0 0 8px 8px;
  border-left: 1px solid #017439;
  border-right: 1px solid #017439;
  border-bottom: 1px solid #017439;
}

.page-index__faq-item.active .page-index__faq-answer {
  max-height: 2000px !important; /* Sufficiently large */
  padding: 20px 25px !important;
  opacity: 1;
}

.page-index__faq-answer p {
  margin: 0;
  color: #f0f0f0;
}

/* Blog Section (Module 4) */
.page-index__blog-section {
  padding: 80px 20px;
  background-color: #FFFFFF; /* Light background for blog section */
  color: #333333;
  text-align: center;
}

.page-index__blog-title {
  color: #017439; /* Primary color for title on light background */
}

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

.page-index__blog-item {
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__blog-item-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.page-index__blog-item-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-index__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 10px;
  color: #017439; /* Primary color for blog titles */
  transition: color 0.3s ease;
}

.page-index__blog-item-link:hover .page-index__blog-item-title {
  color: #005a2d;
}

.page-index__blog-item-excerpt {
  font-size: 15px;
  color: #555555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-index__blog-item-date {
  font-size: 13px;
  color: #888888;
  display: block;
  margin-top: auto;
}

.page-index__view-all-blogs {
  margin-top: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__main-title,
  .page-index__brand-title,
  .page-index__faq-main-title,
  .page-index__blog-title {
    font-size: 36px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .page-index__section {
    padding: 40px 15px;
  }

  /* Fixed header spacing for mobile */
  .page-index__video-section {
    padding-top: var(--header-offset, 120px) !important;
    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;
    border-radius: 4px;
    object-fit: contain; /* Use contain for mobile to ensure full video visibility */
  }

  .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__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  .page-index__main-title,
  .page-index__brand-title,
  .page-index__faq-main-title,
  .page-index__blog-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .page-index__hero-description,
  .page-index__brand-intro-text {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

  .page-index__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
  }

  .page-index__brand-grid,
  .page-index__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-index__brand-item-title {
    font-size: 20px;
  }

  .page-index__brand-item p {
    font-size: 15px;
  }

  .page-index__faq-question {
    padding: 15px 20px;
  }
  
  .page-index__faq-question-title {
    font-size: 16px;
  }

  .page-index__faq-answer {
    padding: 0 20px;
  }

  .page-index__faq-item.active .page-index__faq-answer {
    padding: 15px 20px !important;
  }

  .page-index__blog-item-title {
    font-size: 18px;
  }

  .page-index__blog-item-excerpt {
    font-size: 14px;
  }

  /* Ensure all images are responsive and don't overflow */
  .page-index img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-index__section,
  .page-index__card,
  .page-index__container,
  .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;
    overflow: hidden !important; /* Ensure content does not overflow */
  }
}

/* CSS for image color filter restriction - NO FILTER ALLOWED */
.page-index img {
  filter: none; /* Ensure no filter is applied */
}