.page-index {
  color: var(--text-main, #FFF6D6); /* Default text color for the page, contrasting with dark body */
  background-color: var(--bg-color, #0A0A0A); /* Inherit from shared.css, default to #0A0A0A */
}

.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 */
  box-sizing: border-box;
}

.page-index__video-container {
  width: 100%; /* Important for desktop flex alignment */
  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; /* Prevents 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.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(242, 193, 78, 0.8); /* Using primary color for hint */
  border-radius: 5px;
  white-space: nowrap;
}

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

.page-index__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%); /* Custom button color */
  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, #FFD36B 0%, #F2C14E 100%); /* Slightly different gradient on hover */
  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);
}

/* Promo Dark Section */
.page-index__promo-dark {
  background: var(--card-bg, #111111); /* Dark background for this section */
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-index__gifcode-tabs {
  max-width: 1250px;
  margin: 0 auto;
  text-align: center;
}

.page-index__gifcode-title {
  color: var(--primary-color, #F2C14E); /* Primary color for title */
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.page-index__gifcode-tab-nav li {
  position: relative;
}

.page-index__gifcode-tab-nav a {
  color: #bbb; /* Lighter grey for inactive tabs */
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 10px 15px;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  border-bottom: 2px solid transparent;
  display: block;
}

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

.page-index__gifcode-tab-nav a:hover {
  color: var(--primary-color, #F2C14E);
}

.page-index__gifcode-panel {
  display: none;
  padding-top: 20px;
}

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

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

.page-index__gifcode-col {
  flex: 1 1 calc(50% - 10px); /* Two columns on desktop */
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  box-sizing: border-box;
}

.page-index__gifcode-img {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__gifcode-img:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-index__gifcode-img a {
  display: block;
  line-height: 0; /* Remove extra space below img */
}

.page-index__gifcode-img img {
  display: block;
  width: 100%;
  aspect-ratio: 370 / 127; /* Fixed aspect ratio for consistency */
  object-fit: cover;
  transition: transform 0.3s;
}

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

.page-index__blog-section-title {
  color: var(--primary-color, #F2C14E); /* Primary color for blog title */
  text-align: center;
  margin: 50px 0 0; /* Margin from GIFCODE section */
  font-size: 1.8rem;
  font-weight: bold;
}

/* Blog Slider Section */
.page-index__blog-slider {
  padding: 40px 0 60px;
  background: var(--bg-color, #0A0A0A); /* Inherit from body, ensuring dark background */
  box-sizing: border-box;
}

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

.page-index__blog-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: scroll; /* Enable horizontal scrolling */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* Webkit browsers */
}

.page-index__post-item {
  flex: 0 0 calc((100% - 80px) / 5); /* 5 cards visible on desktop, 4*20px gap */
  scroll-snap-align: start;
  min-width: 0; /* Allow items to shrink */
  box-sizing: border-box;
  background: var(--card-bg, #111111); /* Card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-index__post-box {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-index__post-cover {
  position: relative;
  padding-top: 120px; /* Fixed height for the cover image container */
  overflow: hidden;
}

.page-index__post-cover-link {
  display: block;
  line-height: 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-item:hover .page-index__post-cover img {
  transform: scale(1.05);
}

.page-index__post-text {
  padding: 15px;
  text-align: center;
  color: var(--text-main, #FFF6D6); /* Text color for post details */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-index__post-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-index__post-title a {
  color: var(--primary-color, #F2C14E); /* Primary color for title links */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index__post-title a:hover {
  color: var(--auxiliary-color, #FFD36B);
}

.page-index__post-divider {
  width: 50px;
  height: 2px;
  background: var(--border-color, #3A2A12); /* Border color for divider */
  margin: 10px auto;
}

.page-index__post-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #bbb;
  margin: 0;
  flex-grow: 1;
}

.page-index__post-date {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ffffff; /* White background for date badge */
  border: 2px solid var(--primary-color, #F2C14E); /* Primary color border */
  padding: 5px 8px;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-index__post-date-day {
  display: block;
  font-weight: 700;
  color: #333; /* Dark text for day */
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  color: #666; /* Slightly lighter text for month */
  text-transform: uppercase;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(var(--primary-rgb), 0.9); /* Primary color with transparency */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: var(--primary-color, #F2C14E);
  transform: translateY(-50%) scale(1.1);
}

.page-index__blog-slider-prev {
  left: 0;
}

.page-index__blog-slider-next {
  right: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__gifcode-title {
    font-size: 2rem;
  }
  .page-index__gifcode-tab-nav {
    gap: 20px;
  }
  .page-index__post-item {
    flex: 0 0 calc((100% - 60px) / 4); /* 4 cards visible */
  }
}

@media (max-width: 849px) {
  .page-index__gifcode-title {
    font-size: 1.8rem;
  }
  .page-index__post-item {
    flex: 0 0 calc((100% - 40px) / 3); /* 3 cards visible */
  }
}

@media (max-width: 768px) {
  /* General mobile adaptations for content sections */
  .page-index__video-section,
  .page-index__promo-dark,
  .page-index__blog-slider {
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 10px !important; /* Small top padding for all sections, body handles header offset */
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important; /* Prevent horizontal overflow */
  }

  /* Video specific mobile adaptations */
  .page-index__video-container,
  .page-index__video-link,
  .page-index__video-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

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

  .page-index__video-cta {
    margin-top: 20px;
    padding: 0 15px;
  }

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

  .page-index__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

  /* GifCode specific mobile adaptations */
  .page-index__gifcode-title {
    font-size: 1.5rem;
  }
  .page-index__gifcode-tab-nav {
    gap: 15px;
  }
  .page-index__gifcode-tab-nav a {
    font-size: 1rem;
    padding: 8px 10px;
  }
  .page-index__gifcode-row {
    gap: 15px;
  }
  .page-index__gifcode-col {
    flex: 1 1 100%; /* Single column on mobile */
    gap: 15px;
  }
  .page-index__gifcode-img img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__blog-section-title {
    font-size: 1.5rem;
    margin-top: 40px;
  }

  /* Blog Slider specific mobile adaptations */
  .page-index__blog-slider-wrap {
    padding: 0 15px;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 30px;
  }
  .page-index__blog-slider-prev {
    left: 5px;
  }
  .page-index__blog-slider-next {
    right: 5px;
  }
  .page-index__post-item {
    flex: 0 0 100%; /* 1 card visible on mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-index__post-cover img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-index__post-title {
    font-size: 1rem;
  }
  .page-index__post-excerpt {
    font-size: 0.8rem;
  }
  .page-index__post-date {
    font-size: 11px;
    padding: 3px 5px;
  }
}

@media (max-width: 549px) {
  .page-index__post-item {
    flex: 0 0 100%; /* 1 card visible on mobile */
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    display: block; /* Ensure arrows are visible */
  }
}