/* style/index.css */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #000; /* Body background from shared.css is #000 */
  color: #ffffff; /* Light text for dark background */
  padding-bottom: 60px;
}

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

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-index__section-description {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: #f0f0f0;
}

/* --- 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: linear-gradient(135deg, #017439, #004d26);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

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

.page-index__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  object-fit: cover;
  pointer-events: none; /* Prevents video controls from interfering with click event on <a> */
}

.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: 12px;
  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: 20px;
  font-weight: bold;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  padding: 12px 25px;
  background: rgba(1, 116, 57, 0.8);
  border-radius: 8px;
  white-space: nowrap;
}

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

.page-index__play-now-button {
  display: inline-block;
  padding: 18px 45px;
  background: #C30808; /* Register/Login color */
  color: #FFFF00; /* Register/Login font color */
  text-decoration: none;
  border-radius: 10px;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-index__play-now-button:hover {
  background: #a80707;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-index__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- H1 Title + CTA Section --- */
.page-index__title-section {
  padding: 80px 20px;
  text-align: center;
  background: #017439; /* Primary color as background */
  color: #ffffff;
  box-shadow: inset 0 -5px 15px rgba(0, 0, 0, 0.2);
}

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

.page-index__main-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 25px;
  line-height: 1.2;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.page-index__title-description {
  font-size: 20px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-index__cta-button {
  display: inline-block;
  padding: 16px 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);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-index__btn-register {
  background: #C30808;
  color: #FFFF00;
}

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

.page-index__btn-login {
  background: #C30808;
  color: #FFFF00;
}

.page-index__btn-login:hover {
  background: #a80707;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-index__btn-download {
  background: #ffffff;
  color: #017439;
  border: 2px solid #017439;
}

.page-index__btn-download:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Feature Games Section --- */
.page-index__feature-games {
  padding: 80px 20px;
  background-color: #f8f8f8;
  color: #333333;
}

.page-index__feature-games .page-index__section-title {
  color: #333333;
  text-shadow: none;
}

.page-index__feature-games .page-index__section-description {
  color: #666666;
}

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

.page-index__game-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-index__game-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-index__game-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.page-index__game-item h3 {
  font-size: 22px;
  font-weight: bold;
  margin: 20px 20px 10px;
  color: #017439;
}

.page-index__game-item h3 a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__game-item h3 a:hover {
  color: #004d26;
}

.page-index__game-item p {
  font-size: 16px;
  color: #666666;
  margin: 0 20px 20px;
  flex-grow: 1;
}

.page-index__game-button {
  display: inline-block;
  padding: 12px 25px;
  background: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  margin: 0 20px 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
}

.page-index__game-button:hover {
  background: #004d26;
  transform: translateY(-1px);
}

/* --- FAQ Section --- */
.page-index__faq-section {
  padding: 80px 20px;
  background: #0d0d0d; /* Darker background */
  color: #ffffff;
}

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

.page-index__faq-section .page-index__section-description {
  color: #cccccc;
}

.page-index__faq-list {
  max-width: 900px;
  margin: 50px auto 30px;
}

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);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

details.page-index__faq-item summary.page-index__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #ffffff;
  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: #017439;
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
  line-height: 1;
}

details.page-index__faq-item .page-index__faq-answer {
  padding: 0 25px 25px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 8px 8px;
  color: #cccccc;
  font-size: 16px;
}

.page-index__faq-answer p {
  margin-top: 15px;
}

.page-index__cta-center {
  text-align: center;
  margin-top: 40px;
}

.page-index__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: #017439;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__btn-primary:hover {
  background: #004d26;
  transform: translateY(-2px);
}

.page-index__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: #ffffff;
  color: #017439;
  text-decoration: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  border: 2px solid #017439;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-index__btn-secondary:hover {
  background: #f0f0f0;
  color: #004d26;
  transform: translateY(-2px);
}

/* --- Brand Section --- */
.page-index__brand-section {
  padding: 80px 20px;
  background-color: #f8f8f8;
  color: #333333;
}

.page-index__brand-section .page-index__section-title {
  color: #333333;
  text-shadow: none;
}

.page-index__brand-section .page-index__section-description {
  color: #666666;
}

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

.page-index__brand-item {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
}

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

.page-index__brand-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}

.page-index__brand-subtitle {
  font-size: 24px;
  font-weight: bold;
  margin: 0 25px 15px;
  color: #017439;
}

.page-index__brand-text {
  font-size: 16px;
  color: #666666;
  margin: 0 25px;
  flex-grow: 1;
}

/* --- Blog Section --- */
.page-index__blog-section {
  padding: 80px 20px;
  background: #0d0d0d; /* Darker background */
  color: #ffffff;
}

.page-index__blog-section .page-index__section-title {
  color: #ffffff;
}

.page-index__blog-section .page-index__section-description {
  color: #cccccc;
}

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

.page-index__blog-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-index__blog-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-index__blog-item-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0 20px 10px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.page-index__blog-item-title:hover {
  color: #017439;
}

.page-index__blog-item-excerpt {
  font-size: 15px;
  color: #cccccc;
  margin: 0 20px 15px;
}

.page-index__blog-item-date {
  font-size: 14px;
  color: #999999;
  margin: 0 20px 20px;
  display: block;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-index__main-title {
    font-size: 40px;
  }

  .page-index__section-title {
    font-size: 32px;
  }

  .page-index__play-now-button {
    font-size: 20px;
    padding: 15px 40px;
  }

  .page-index__cta-button {
    font-size: 16px;
    padding: 14px 30px;
  }

  .page-index__game-item h3 {
    font-size: 20px;
  }

  .page-index__brand-subtitle {
    font-size: 22px;
  }

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

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

  .page-index__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-index__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  /* Video Section Mobile */
  .page-index__video-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 0;
    padding-right: 0;
    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: 0 15px;
    overflow: hidden !important;
  }

  .page-index__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__video-wrapper {
    border-radius: 8px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-index__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    object-fit: contain; /* Ensure video fits */
  }

  .page-index__video-click-hint {
    font-size: 16px;
    padding: 10px 20px;
  }

  .page-index__video-cta {
    margin-top: 30px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-index__play-now-button {
    font-size: 18px;
    padding: 14px 30px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* H1 Title + CTA Section Mobile */
  .page-index__title-section {
    padding: 50px 15px;
  }

  .page-index__main-title {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .page-index__title-description {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .page-index__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  /* Feature Games Section Mobile */
  .page-index__feature-games {
    padding: 50px 0;
  }

  .page-index__game-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .page-index__game-item {
    border-radius: 8px;
    margin: 0 15px;
  }

  .page-index__game-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__game-item h3 {
    font-size: 19px;
    margin: 15px;
  }

  .page-index__game-item p {
    font-size: 15px;
    margin: 0 15px 15px;
  }

  .page-index__game-button {
    margin: 0 15px 15px;
  }

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

  .page-index__faq-list {
    margin: 30px auto 20px;
    padding: 0 15px;
  }

  details.page-index__faq-item {
    border-radius: 6px;
  }

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

  .page-index__faq-toggle {
    font-size: 24px;
    margin-left: 15px;
  }

  details.page-index__faq-item .page-index__faq-answer {
    padding: 0 20px 20px;
    font-size: 15px;
  }

  .page-index__btn-primary, .page-index__btn-secondary {
    font-size: 16px;
    padding: 12px 25px;
  }

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

  .page-index__brand-content {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .page-index__brand-item {
    border-radius: 8px;
    margin: 0 15px;
  }

  .page-index__brand-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__brand-subtitle {
    font-size: 20px;
    margin: 0 15px 10px;
  }

  .page-index__brand-text {
    font-size: 15px;
    margin: 0 15px;
  }

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

  .page-index__blog-list {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .page-index__blog-item {
    border-radius: 8px;
    margin: 0 15px;
  }

  .page-index__blog-item img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__blog-item-title {
    font-size: 17px;
    margin: 0 15px 8px;
  }

  .page-index__blog-item-excerpt,
  .page-index__blog-item-date {
    font-size: 14px;
    margin: 0 15px 12px;
  }
}

/* Ensure all images and video elements are responsive and do not overflow */
.page-index img, .page-index video {
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .page-index img, .page-index video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-index__section, .page-index__card, .page-index__container,
  .page-index__video-section, .page-index__video-container, .page-index__video-wrapper,
  .page-index__cta-buttons, .page-index__button-group, .page-index__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-index__cta-button, .page-index__btn-primary, .page-index__btn-secondary,
  .page-index a[class*="button"], .page-index a[class*="btn"],
  .page-index__play-now-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-index__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}