/* style/index.css */

/* Variables and Base Styles for page-index */
:root {
  --primary-color: #017439;
  --secondary-color: #C30808; /* For register/login buttons */
  --text-color-light: #ffffff;
  --text-color-dark: #333333;
  --text-color-yellow: #FFFF00; /* For register/login button text */
  --bg-dark: #1a1a2e; /* From shared.css body background */
  --bg-light: #ffffff;
  --border-color: #e0e0e0;
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-color-light);
  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(--primary-color);
  border-radius: 2px;
}

/* 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 offset */
  background-color: var(--bg-dark);
}

.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;
  border-radius: 8px; /* Apply border-radius to the link wrapper */
  overflow: hidden; /* Ensure content inside respects border-radius */
}

.page-index__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.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 on <a> */
  display: block; /* Ensure no extra space below video */
}

.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: var(--text-color-light);
  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); /* Using primary color with opacity */
  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: var(--secondary-color); /* Use #C30808 for Play Now */
  color: var(--text-color-yellow); /* Use #FFFF00 for Play Now text */
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.page-index__play-now-button:hover {
  background: #a30707; /* Darken for hover */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

/* Hero Section (H1 + CTA) */
.page-index__hero-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--primary-color); /* Use primary color for hero section background */
  color: var(--text-color-light);
}

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

.page-index__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
}

.page-index__hero-description {
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.5;
  opacity: 0.9;
  color: var(--text-color-light);
}

.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 35px;
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-index__cta-button--register {
  background-color: var(--secondary-color); /* Register button color */
  color: var(--text-color-yellow); /* Register button font color */
  border: 2px solid var(--text-color-yellow);
}

.page-index__cta-button--register:hover {
  background-color: #a30707;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

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

.page-index__cta-button--join:hover {
  background-color: var(--primary-color);
  color: var(--text-color-light);
  border-color: var(--text-color-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-index__faq-section {
  padding: 80px 20px;
  background-color: var(--bg-dark); /* Dark background for FAQ section */
  color: var(--text-color-light);
}

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

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

details.page-index__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter background for items */
}
details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-color-light);
  font-size: 18px;
  font-weight: 600;
}
details.page-index__faq-item summary.page-index__faq-question::-webkit-details-marker {
  display: none;
}
details.page-index__faq-item summary.page-index__faq-question:hover {
  background: rgba(255, 255, 255, 0.1);
}
.page-index__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}
.page-index__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 20px;
  background: rgba(255, 255, 255, 0.02); /* Even lighter background for answer */
  border-radius: 0 0 8px 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}
.page-index__faq-answer p {
  margin: 0;
}


/* Brand Introduction Section */
.page-index__brand-section {
  padding: 80px 20px;
  background-color: var(--bg-dark); /* Dark background */
  color: var(--text-color-light);
}

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

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

.page-index__brand-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-index__brand-item-image {
  width: 100%; /* Ensure image fills container */
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block; /* Remove extra space below image */
  max-width: 100%; /* Responsive image */
}

.page-index__brand-item-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-index__brand-item p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* Blog List Section */
.page-index__blog-section {
  padding: 80px 20px;
  background-color: var(--bg-dark); /* Dark background */
  color: var(--text-color-light);
}

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

.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: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-index__blog-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-bottom: 20px; /* Add padding to the bottom of the link content */
}

.page-index__blog-item-image {
  width: 100%;
  height: 200px; /* Fixed height for blog images */
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  max-width: 100%; /* Responsive image */
}

.page-index__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 20px 10px; /* Add horizontal padding */
  color: var(--primary-color);
  line-height: 1.4;
}

.page-index__blog-item-excerpt {
  font-size: 15px;
  margin: 0 20px 15px; /* Add horizontal padding */
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  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: 14px;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin: 0 20px; /* Add horizontal padding */
}


/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__main-title {
    font-size: 40px;
  }
  .page-index__hero-description {
    font-size: 18px;
  }
  .page-index__section-title {
    font-size: 32px;
  }
  .page-index__brand-item-title {
    font-size: 22px;
  }
  .page-index__blog-item-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .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;
  }

  .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: 18px !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__hero-section,
  .page-index__faq-section,
  .page-index__brand-section,
  .page-index__blog-section {
    padding: 40px 15px;
  }

  .page-index__main-title {
    font-size: 32px;
  }
  .page-index__hero-description {
    font-size: 16px;
  }
  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .page-index__cta-button {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
  }

  .page-index__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  details.page-index__faq-item summary.page-index__faq-question {
    padding: 15px 20px;
    font-size: 16px;
  }
  .page-index__faq-toggle {
    font-size: 24px;
    width: 25px;
  }
  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 15px;
    font-size: 15px;
  }

  .page-index__brand-content {
    grid-template-columns: 1fr;
  }
  .page-index__brand-item {
    padding: 20px;
  }
  .page-index__brand-item-image {
    height: 200px;
  }
  .page-index__brand-item-title {
    font-size: 20px;
  }
  .page-index__brand-item p {
    font-size: 15px;
  }

  .page-index__blog-list {
    grid-template-columns: 1fr;
  }
  .page-index__blog-item-image {
    height: 180px;
  }
  .page-index__blog-item-title {
    font-size: 18px;
    margin: 0 15px 10px;
  }
  .page-index__blog-item-excerpt {
    font-size: 14px;
    margin: 0 15px 15px;
  }
  .page-index__blog-item-date {
    margin: 0 15px;
  }

  /* Global image responsive rules */
  .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__hero-container,
  .page-index__faq-container,
  .page-index__brand-container,
  .page-index__blog-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0; /* Handled by section padding */
    padding-right: 0; /* Handled by section padding */
    overflow: hidden !important;
  }
  
  /* Additional rule for brand images to fit */
  .page-index__brand-item-image {
    object-fit: contain; /* Adjust object-fit for mobile if needed */
  }
}

/* Ensure text contrast for dark body background */
.page-index__dark-section {
  background-color: var(--primary-color); /* Brand green */
  color: var(--text-color-light); /* White text */
}

/* Fallback for general text if not explicitly set */
.page-index p, .page-index li, .page-index span {
  color: inherit; /* Inherit from parent, which is set to light */
}

/* Adjusting some elements to ensure contrast */
.page-index__blog-item-title,
.page-index__brand-item-title {
  color: var(--primary-color); /* Green text on dark background, ensure contrast */
}

/* Ensure contrast for FAQ */
details.page-index__faq-item summary.page-index__faq-question {
  color: var(--text-color-light); /* White text on dark item background */
}
details.page-index__faq-item .page-index__faq-answer {
  color: rgba(255, 255, 255, 0.8); /* Slightly less white for body text */
}

/* Contrast fix for specific text if needed (example, not applied by default) */
.page-index__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}
.page-index__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}