:root {
  --primary-color: #113B7A;
  --secondary-color: #1D5FD1;
  --button-gradient: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  --card-bg: #10233F;
  --text-main: #F3F8FF;
  --text-secondary: #AFC4E8;
  --border-color: #244D84;
  --glow-color: #4FA8FF;
  --gold-color: #F2C14E;
  --divider-color: #1B3357;
  --deep-navy-color: #08162B;
}

.page-content.page-index {
  color: var(--text-main); /* Default text color for body's dark background */
  background-color: var(--deep-navy-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 */
  box-sizing: border-box;
}

.page-index__video-container {
  position: relative;
  width: 100%; /* Important for flex stretch */
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.page-index__main-title {
  color: var(--gold-color);
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.02em;
  max-width: 900px;
  /* Using clamp for responsive font size, avoids fixed large values */
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.page-index__tagline {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 30px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.5;
  max-width: 800px;
}

.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);
  background-color: #000;
}

.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 on parent <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: 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(var(--primary-color-rgb, 17, 59, 122), 0.8);
  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.2);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.page-index__play-now-button:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%); /* Invert gradient or slightly darker */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px 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);
}

/* Module 2: Promo/GifCode Section */
.page-index__promo-dark {
  background: #2c2c2c; /* Specific dark background */
  padding: 40px 20px;
  box-sizing: border-box;
  color: var(--text-main);
}

.page-index__gifcode-tabs {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__gifcode-title {
  color: var(--gold-color); /* Use gold for prominence */
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: bold;
}

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

.page-index__gifcode-tab-nav a {
  color: var(--text-secondary); /* Unactive tabs secondary color */
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 1.1rem;
}

.page-index__gifcode-tab-nav a.is-active,
.page-index__gifcode-tab-nav a:hover {
  color: var(--gold-color); /* Active/hover tabs gold color */
  border-bottom-color: var(--gold-color);
}

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

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

.page-index__gifcode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1250px; /* Slightly wider to accommodate gaps */
  margin: 0 auto;
  justify-content: center;
}

.page-index__gifcode-col {
  flex: 1 1 calc(50% - 8px); /* 2 columns with gap */
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.page-index__gifcode-img {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.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: 4px;
  min-width: 200px; /* Ensure minimum size */
  min- /* Based on aspect ratio */
}

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

.page-index__blog-section-title {
  color: var(--gold-color); /* Gold color for blog title */
  text-align: center;
  margin: 50px 0 30px 0; /* Margin to separate from gifcode and slider */
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: bold;
  text-transform: uppercase;
}

/* Module 3: Latest Articles Horizontal Slider */
.page-index__blog-slider {
  padding: 40px 0 60px 0;
  background: #f0f2f5; /* Light background for blog slider */
  color: #333333; /* Dark text for light background */
  box-sizing: border-box;
}

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

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

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

.page-index__post-item {
  flex: 0 0 calc((100% - 80px) / 5); /* 5 cards visible, 4 gaps of 20px */
  scroll-snap-align: start;
  min-width: 200px; /* Minimum card width */
  box-sizing: border-box;
}

.page-index__post-box {
  position: relative;
  background: #ffffff; /* White background for each post card */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 100%; /* Ensure all cards have same height */
  display: flex;
  flex-direction: column;
}

.page-index__post-image {
  flex-shrink: 0;
}

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

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

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

.page-index__post-text {
  padding: 15px;
  text-align: center;
  color: #333333; /* Dark text for light background */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

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

.page-index__post-title a:hover {
  color: var(--secondary-color);
}

.page-index__post-divider {
  width: 50px;
  height: 2px;
  background: var(--divider-color); /* Use custom divider color */
  margin: 10px auto;
}

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

.page-index__post-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #ffffff; /* White badge background */
  border: 2px solid var(--gold-color); /* Gold border for badge */
  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: var(--primary-color); /* Primary color for day */
}

.page-index__post-date-month {
  display: block;
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
}

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(var(--primary-color-rgb, 17, 59, 122), 0.8); /* Primary color with transparency */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  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);
  transform: translateY(-50%) scale(1.05);
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-index__post-item {
    flex: 0 0 calc((100% - 60px) / 4); /* 4 cards visible */
  }
}

@media (max-width: 849px) {
  .page-index__post-item {
    flex: 0 0 calc((100% - 40px) / 3); /* 3 cards visible */
  }
  .page-index__blog-slider-wrap {
    padding: 0 20px;
  }
  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-index__video-section {
    padding: 30px 15px 40px 15px; /* Adjust padding for mobile */
    padding-top: 10px !important; /* body already has offset */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  .page-index__video-container,
  .page-index__video-link,
  .page-index__video-wrapper,
  .page-index__video-cta {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }

  .page-index__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }

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

  .page-index__main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 10px;
  }

  .page-index__tagline {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    margin-bottom: 20px;
  }

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

  .page-index__promo-dark {
    padding: 30px 15px;
  }

  .page-index__gifcode-tab-nav {
    gap: 15px;
    margin-bottom: 20px;
  }

  .page-index__gifcode-tab-nav a {
    font-size: 1rem;
    padding: 6px 10px;
  }

  .page-index__gifcode-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    margin-bottom: 20px;
  }

  .page-index__gifcode-col {
    flex: 1 1 100%; /* Single column for mobile */
  }

  .page-index__gifcode-img img {
    min-width: 200px !important;
    min-
  }

  .page-index__blog-section-title {
    margin: 40px 0 25px 0;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }

  .page-index__blog-slider {
    padding: 30px 0 50px 0;
  }

  .page-index__blog-slider-wrap {
    padding: 0 15px;
  }

  .page-index__post-item {
    flex: 0 0 100%; /* Single card visible */
  }

  .page-index__post-cover img {
    min-width: 200px !important;
    min-
  }

  .page-index__blog-slider-prev,
  .page-index__blog-slider-next {
    width: 30px;
    height: 30px;
    font-size: 18px;
    top: 40%;
  }
}

@media (max-width: 549px) {
  .page-index__post-item {
    flex: 0 0 100%; /* Ensure single card visible */
  }
}