/* style/index.css */
/* body background: #08160F (dark), text color should be light */

:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --text-main-color: #F2FFF6;
  --text-secondary-color: #A7D9B8;
  --card-bg-color: #11271B;
  --background-color: #08160F;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-index {
  color: var(--text-main-color); /* General text color for dark body background */
  background-color: var(--background-color);
}

/* Module 1: 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: 10px; /* Small top padding, body handles header offset */
  background-color: var(--background-color);
}

.page-index__video-container {
  position: relative;
  width: 100%; /* Important for desktop width chain */
  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;
  border-radius: 8px;
  overflow: hidden;
}

.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 on parent link */
}

.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.3);
  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(17, 168, 78, 0.8); /* Using 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: var(--button-gradient);
  color: #ffffff;
  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: linear-gradient(180deg, #13994A 0%, #2AD16F 100%); /* Invert gradient or slightly darker */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

/* Module 2: Promo Dark Section */
.page-index__promo-dark {
  background: var(--card-bg-color); /* #11271B */
  padding: 24px 16px 40px;
  color: var(--text-main-color);
}

.page-index__gifcode-tabs {
  max-width: 1250px;
  margin: 0 auto;
  padding-bottom: 30px;
}

.page-index__gifcode-title {
  color: var(--primary-color); /* #11A84E */
  text-align: center;
  text-transform: uppercase;
  font-size: 1.8rem;
  margin-bottom: 25px;
  font-weight: 700;
}

.page-index__gifcode-tab-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 16px 0 30px;
}

.page-index__gifcode-tab-nav li {
  display: inline-block;
}

.page-index__gifcode-tab-nav a {
  color: var(--text-secondary-color); /* #A7D9B8 */
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 600;
}

.page-index__gifcode-tab-nav a.is-active,
.page-index__gifcode-tab-nav a:hover {
  color: var(--primary-color); /* #11A84E */
  border-bottom-color: var(--primary-color); /* #11A84E */
}

.page-index__gifcode-panel {
  display: none;
}

.page-index__gifcode-panel.is-active {
  display: block;
}

.page-index__gifcode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Increased gap for better spacing */
  max-width: 1250px;
  margin: 0 auto;
  justify-content: center; /* Center align rows */
}

.page-index__gifcode-col {
  flex: 1 1 calc(50% - 10px); /* 2 columns, accounting for gap */
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: calc(50% - 10px); /* Explicit max-width */
}

.page-index__gifcode-img {
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.05); /* Slightly visible background */
}

.page-index__gifcode-img a {
  display: block;
  line-height: 0;
}

.page-index__gifcode-img img {
  display: block;
  width: 100%;
  aspect-ratio: 370 / 127; /* Maintain aspect ratio */
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 6px;
}

.page-index__gifcode-img:hover img {
  transform: scale(1.03);
}

.page-index__blog-section-title {
  color: var(--primary-color); /* #11A84E */
  text-align: center;
  margin: 40px 0 0; /* Margin from the bottom of promo-dark section */
  font-size: 1.6rem;
  font-weight: 700;
}

/* Module 3: Latest Articles Slider */
.page-index__blog-slider {
  padding: 30px 0 60px;
  background-color: var(--background-color); /* Light background for this section */
  color: var(--text-main-color);
}

.page-index__blog-slider-wrap {
  position: relative;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 40px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* For Firefox */
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px; /* Space for potential scrollbar */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, Opera */
}

.page-index__post-item {
  flex: 0 0 calc((100% - (4 * 16px)) / 5); /* 5 cards, 4 gaps */
  scroll-snap-align: start;
  min-width: 0;
  background-color: var(--card-bg-color); /* #11271B */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-index__post-box {
  position: relative;
  height: 100%; /* Ensure box fills item height */
  display: flex;
  flex-direction: column;
}

.page-index__post-image {
  position: relative;
  overflow: hidden;
}

.page-index__post-cover {
  position: relative;
  padding-top: 120px; /* Fixed height for cover, as per demo */
  overflow: hidden;
  background-color: var(--divider-color); /* Placeholder background */
}

.page-index__post-cover-link {
  display: block;
  position: absolute;
  inset: 0;
}

.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-index__post-cover-link:hover img {
  transform: scale(1.05);
}

.page-index__post-text {
  padding: 15px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-index__post-title {
  margin: 0 0 10px;
  line-height: 1.3;
}

.page-index__post-title a {
  color: var(--primary-color); /* #11A84E */
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-index__post-title a:hover {
  color: var(--gold-color); /* #F2C14E */
}

.page-index__post-divider {
  width: 40px;
  height: 2px;
  background: var(--primary-color); /* #11A84E */
  margin: 8px auto;
}

.page-index__post-excerpt {
  color: var(--text-secondary-color); /* #A7D9B8 */
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
}