/* style/index.css */
:root {
  --primary-color: #C91F17;
  --secondary-color: #E53935;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --text-main: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red: #7A0E0E;
}

/* 智能文字颜色选择器 - 必须实现（使用BEM命名规则） */
.page-index {
  color: #333333; /* Default for light background sections */
}

.page-index__dark-bg {
  color: var(--text-main); /* Deep Red / Dark background配浅色文字 */
  background: var(--deep-red);
}

.page-index__light-bg {
  color: #333333; /* 浅色背景配深色文字 */
  background: #ffffff;
}

/* 页面内容区域内的段落和列表项 */
.page-index p,
.page-index li {
  color: #333333; /* 确保在大多数背景下可读 */
}

/* 按钮文字对比度保障（使用BEM命名规则） */
.page-index__btn-primary {
  background: var(--primary-color);
  color: #ffffff; /* 按钮文字始终使用白色 */
  border: 2px solid transparent;
}

.page-index__btn-secondary {
  background: #ffffff;
  color: var(--primary-color); /* 使用品牌色确保对比度 */
  border: 2px solid var(--primary-color);
}

/* 🚨 桌面端视频区域样式（必须严格遵守） */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 页头整段高度由 shared 的 body { padding-top: var(--header-offset); } 承担；此处仅用小额顶距，禁止再写 var(--header-offset) 以免双倍空白 */
  padding-top: 10px;
  background: var(--deep-red); /* Using Deep Red as a section background */
}

.page-index__video-container {
  position: relative;
  width: 100%; /* 🚨 桌面端必须包含 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 宽高比 - 🚨 PageSpeed优化：固定宽高比避免布局偏移（CLS） */
  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; /* 防止视频控件阻止点击事件 */
}

/* 🚨 视频点击提示遮罩层样式（可选，增强用户体验） */
.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(var(--primary-color), 0.8);
  border-radius: 5px;
  white-space: nowrap;
}

/* 🚨 Play Now按钮样式（必须严格遵守，位于视频下方中间位置） */
.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); /* Custom 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;
}

.page-index__play-now-button:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%); /* Hover effect for gradient */
  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: #2c2c2c; /* Dark background as per demo */
  padding: 24px 16px;
  color: var(--text-main); /* Text Main for dark background */
}

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

.page-index__gifcode-title {
  color: var(--primary-color); /* Main color for title */
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-size: 1.8rem;
  font-weight: bold;
}

.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: #fff;
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: bold;
}

.page-index__gifcode-tab-nav a.is-active,
.page-index__gifcode-tab-nav a:hover {
  color: var(--primary-color); /* Main color for active/hover tab */
  border-bottom-color: var(--primary-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: 12px;
  max-width: 1250px;
  margin: 0 auto;
}

.page-index__gifcode-col {
  flex: 1 1 calc(50% - 6px); /* Desktop 2 columns */
  display: flex;
  flex-direction: column;
  gap: 12px;
  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; /* Fixed aspect ratio for GifCode images */
  object-fit: cover;
  transition: transform 0.3s;
  border-radius: 4px;
  min-width: 200px; /* Min size requirement */
  min- /* Min size requirement based on aspect ratio */
}

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

.page-index__blog-section-title {
  color: var(--primary-color); /* Main color for blog title */
  text-align: center;
  margin: 24px 0 0;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* 🚨 Module 3: Latest Articles Slider */
.page-index__blog-slider {
  padding: 32px 0;
  background: #f8f8f8; /* Light background for the slider section */
}

.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 */
  -ms-overflow-style: none;  /* For IE and Edge */
}

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

.page-index__blog-slider-prev,
.page-index__blog-slider-next {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: #333;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, color 0.3s;
}

.page-index__blog-slider-prev:hover,
.page-index__blog-slider-next:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

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

.page-index__post-item {
  flex: 0 0 calc((100% - 64px) / 5); /* Desktop 5 cards */
  scroll-snap-align: start;
  min-width: 0;
  transition: transform 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
}

.page-index__post-box {
  position: relative;
  background: #2c2c2c; /* Dark background for individual card */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: #fff; /* Light text on dark card */
}

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

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

.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;
  display: block;
  transition: transform 0.3s ease;
  min-width: 200px; /* Min size requirement */
  min- /* Min size requirement */
}