/* style/index.css */

/* Global styles for page-index scope */
.page-index {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  /* Body background is #121212 (dark), so main text color should be light */
  color: #ffffff; 
  background-color: #121212; /* Ensure consistency with body background */
}

.page-index__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #ffffff; /* Default for dark sections */
  line-height: 1.2;
}

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

/* Light background sections */
.page-index__light-bg .page-index__section-title,
.page-index__light-bg .page-index__section-description,
.page-index__light-bg p,
.page-index__light-bg h3,
.page-index__light-bg li {
  color: #333333; /* Dark text on light background */
}

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

/* Dark background sections */
.page-index__dark-bg {
    background-color: #121212; /* Assuming body background is dark */
    color: #ffffff;
}

/* CTA Buttons common styles */
.page-index__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 15px; /* Add padding to prevent overflow on very small screens */
}

.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;
  max-width: 100%; /* Ensure button doesn't exceed container width */
  box-sizing: border-box;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

/* Specific button colors as per custom配色 */
.page-index__cta-button--register {
  background: #C30808; /* Register button background */
  color: #FFFF00; /* Register button font */
}

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

.page-index__cta-button--join {
  background: #C30808; /* Login button background (using same as register for consistency) */
  color: #FFFF00; /* Login button font */
}

.page-index__cta-button--join:hover {
  background: #a30606; /* Darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Default CTA button (for explore, view all) */
.page-index__cta-button--explore,
.page-index__cta-button--view-all,
.page-index__cta-button--start {
  background: var(--primary-color, #017439);
  color: #ffffff;
}

.page-index__cta-button--explore:hover,
.page-index__cta-button--view-all:hover,
.page-index__cta-button--start:hover {
  background: #005a2e; /* Darken primary color on hover */
  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 offset */
  background-color: #121212; /* Ensure 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;
  box-sizing: border-box;
}

.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);
  background-color: #000; /* Fallback for video */
}

.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 interfering with link click */
}

.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: 20px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 12px 25px;
  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;
}