/*
  首页样式表
  - 头条区布局：左新闻(1210px) + 右广告(425px)
  - 主题行与分块区域
  - 卡片排布与响应式调整
*/

/*
  总体布局：两列 flex
  Left: 1210px
  Right: 425px
  Gap: 30px
  Total Content Width = 1210 + 425 + 30 = 1665px

  Container Max-Width: 1665px
  Container Padding: 50px * 2 = 100px
  Available Content Width = 1665 - 100 = 1565px

  因此，在 1665px 的容器内，无法放下 1665px 的内容。
  我们需要让布局在默认状态下就适应可用空间，或者调整容器/宽度。
  鉴于用户指定了 1210px 和 425px 的精确值，我们使用 flex 比例来缩放，
  确保比例为 1210 : 425。
*/

/* 首页移动端一级分类横滑导航 */
.home-mobile-primary-nav {
  display: none;
}

.home-mobile-primary-nav__track {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .home-mobile-primary-nav {
    display: block;
    background: #ffffff;
    border-bottom: 1px solid #e7edf4;
    margin-bottom: 4px;
  }

  .home-mobile-primary-nav__track {
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 8px 12px 6px;
    -webkit-overflow-scrolling: touch;
  }

  .home-mobile-primary-nav__track::-webkit-scrollbar {
    display: none;
  }

  .home-mobile-primary-nav__track a {
    display: inline-block;
    flex: 0 0 auto;
    padding: 4px 6px;
    font-size: 13px;
    line-height: 1.3;
    color: #4b5563;
    background: transparent;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
  }

  .home-mobile-primary-nav__track a:hover,
  .home-mobile-primary-nav__track a:active {
    color: #0b61aa;
  }

  .home-mobile-primary-nav__track a:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #9ca3af;
  }
}

/* 第一内容区：头条布局 */
.home-section-first__layout {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
  justify-content: center;
}

/* 左侧新闻区（头条专用） */
.home-section-first__news {
  /* 目标宽度 1210px，但允许缩小 */
  flex: 1210;
  min-width: 0;
  /* 防止 flex item 溢出 */
}

.home-section-first-mobile-swiper {
  display: none;
}

.home-section-first-mobile-swiper__card {
  border-radius: 0;
}

.home-section-first-mobile-swiper__card .card-media {
  height: 100%;
}

.home-section-first-mobile-swiper__pagination {
  position: static;
  margin-top: 10px;
  text-align: center;
}

/*
  新闻区内部网格：3列，均分
  Row 1: Main (2 cols) + Stack (1 col)
  Row 2, 3: 3 cols each
*/
.home-section-first__news-grid {
  display: grid;
  /* 使用 minmax(0, 1fr) 确保均分且能缩小 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 行高：
     Row 1: 450px (215*2 + 20 gap -> Stack height)
     Row 2: 330px
     Row 3: 330px
     间隔：30px
  */
  grid-template-rows: 450px 330px 330px;
  gap: 30px;
}

/* 第一行元素 */
.home-section-first__card--lead {
  grid-column: 1 / 3;
  /* 跨前两列 */
  grid-row: 1;
  height: 100%;
  position: relative;
}

.home-section-first__stack {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.home-section-first__stack .card {
  flex: 1;
  position: relative;
  min-width: 0;
}

.home-section-first__card--stack.overlay-card {
  min-height: 0;
}

.home-section-first__card--stack.overlay-card .card-media {
  height: 100%;
}

.home-section-first__card--stack.overlay-card .card-overlay-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (min-width: 769px) {
  .home-section-first__card--lead.overlay-card .card-overlay-title,
  .home-section-first__card--stack.overlay-card .card-overlay-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: calc(1.4em * 2);
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

.home-section-first__card--stack.overlay-card .status-chip {
  top: 12px;
  right: 12px;
}

/* 右侧广告区（头条专用） */
.home-section-first__ads {
  /* 目标宽度 425px，允许缩小 */
  flex: 425;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 兼容广告位不存在的情况：如果广告容器为空，隐藏它以便新闻区占满空间 */
.home-section-first__ads:empty {
  display: none;
}

/* ==========================
   第二内容区：SHIPBUILDING 布局（与头条类似的左右结构）
   ========================== */
.home-section-second__layout {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
  justify-content: center;
}

/* 首页活动区：统一 16:9 图片比例 */
.home-activity-area .activity-swiper .card-media {
  aspect-ratio: 16 / 9;
  height: auto;
}

.home-section-second__news {
  flex: 1210;
  min-width: 0;
}

.home-section-second__ads {
  flex: 425;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.home-section-second__ads:empty {
  display: none;
}

/* 第三内容区：Ship 三列区使用左右布局（左内容 + 右广告） */
.home-section-third__layout {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
  justify-content: center;
}

.home-section-third__left {
  flex: 1210;
  min-width: 0;
}

.home-section-third__ads {
  flex: 425;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.home-section-third__ads:empty {
  display: none;
}

.ad-top {
  height: 450px;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.ad-top:hover {
  border-color: #004494;
  transform: translateY(-2px);
}

.ad-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-tall {
  height: 690px;
  /* 默认用于头条区等通用广告位 */
  width: 100%;
  position: relative;
  background: #ebf5ff;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.ad-tall:hover {
  border-color: #004494;
  transform: translateY(-2px);
}

.ad-tall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-tall .ad-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  background: rgba(0, 126, 201, 0.2);
  padding: 20px;
}

.ad-tall .ad-overlay h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ad-tall .ad-overlay p {
  font-size: 16px;
  line-height: 1.5;
}

/* 头条区纵向广告高度（保持原设计） */
.home-section-first__layout .ad-tall {
  height: 690px;
}

/* SHIPBUILDING 区右侧纵向广告高度（覆盖为更高，与上下两行新闻视觉齐平） */
.home-section-second__layout .ad-tall {
  height: 680px;
  /* 对齐左侧第一行高度 */
}

/* SHIPBUILDING 区底部横向广告高度，对齐左侧第二行高度 */
.home-section-second__layout .ad-top {
  height: 330px;
}

/* Ship 三列区右侧广告：与左侧整体等高，并上下两块等分高度 */
.home-section-third__layout .home-section-third__ads {
  display: flex;
  flex-direction: column;
}

.home-section-third__layout .home-section-third__ads .ad-top {
  flex: 1;
  height: auto;
}

/* Card Hover Effects */
.card {
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  border-radius: 8px;
  border: 2px solid transparent;
  /* Transparent border to prevent layout shift */
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.card:hover {
  border-color: #004494;
  background-color: #f4fafd;
}

/* Standard Card Title Hover */
.standard-card:hover .card-title {
  color: #004494;
  /* Keep title blue on hover */
}

.card-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

/* 卡片样式已移动到 common.css 中，以便在其他页面复用 */



/* 响应式调整 */

/* 1. 当屏幕变窄，保持两列但缩小宽度 */
@media (max-width: 1700px) {
  .home-section-first__news-grid {
    gap: 30px;
    /* 缩小间距以节省空间 */
  }

  .home-section-first__layout {
    gap: 30px;
  }

  .home-section-second__layout,
  .home-section-third__layout,
  .ship-three-column-layout {
    gap: 30px;
  }

  /* 右侧广告区 */
  .home-section-first__ads {
    gap: 30px;
  }

  .home-section-second__ads,
  .home-section-third__ads {
    gap: 30px;
  }
}

/* 2. 中屏 (Tablet Landscape / Small Desktop)
   当屏幕更窄，保留广告位但缩小尺寸，或调整布局
*/
@media (max-width: 1280px) {
  .home-section-first__ads {
    gap: 30px;
  }

  .home-section-second__ads,
  .home-section-third__ads {
    gap: 30px;
  }

  .home-section-first__news-grid {
    gap: 30px;
    /* Reduce gap further */
  }

  .home-section-first__layout {
    gap: 30px;
  }

  .home-section-second__layout {
    gap: 30px;
  }
}

/* 3. 小屏 (Mobile / Tablet Portrait) */
@media (max-width: 1024px) {

  /* 移动端仅保留横幅广告，隐藏所有侧边广告位 */
  .home-section-ads,
  .home-section-first__ads,
  .home-section-second__ads,
  .home-section-third__ads {
    display: none !important;
  }

  .home-section-first__layout,
  .home-section-second__layout,
  .home-section-third__layout {
    flex-direction: column;
    /* Stack news and ads vertically */
  }

  .home-section-first__news,
  .home-section-second__news,
  .home-section-third__left {
    width: 100%;
    flex: auto;
  }

  /* 平板及以下：所有广告容器纵向一列，一行一个 */
  .home-section-first__ads,
  .home-section-second__ads,
  .home-section-third__ads {
    width: 100%;
    flex: auto;
    flex-direction: column;
  }

  .ad-top,
  .ad-tall {
    height: auto !important;
    /* Auto height for mobile ads */
    aspect-ratio: unset;
    /* Let content decide or fallback to auto */
    min-height: 150px;
    /* Ensure visibility even if content loads slowly */
  }

  .ad-top img,
  .ad-tall img {
    height: auto;
    /* Allow image to scale naturally */
    max-height: none !important;
    /* Remove the 300px artificial constraint */
  }

  .home-section-first__news-grid {
    display: flex;
    flex-direction: column;
    grid-template-rows: auto;
    gap: 24px;
  }

  .home-section-first__card--lead {
    height: auto;
    aspect-ratio: 16/9;
  }

  .home-section-first__stack {
    flex-direction: row;
    height: auto;
  }

  .home-section-first__stack .card {
    aspect-ratio: 16/9;
  }

  /* 平板及以下：其他多列模块也一行一个 */
  .grid-3-lists,
  .home-section-fourth__grid,
  .grid-ship {
    grid-template-columns: 1fr;
  }

  .standard-card {
    height: auto;
  }

  .standard-card .card-media {
    height: auto;
    aspect-ratio: 16/10;
  }
}

@media (max-width: 768px) {
  .home-section-first {
    padding-top: 8px;
  }

  .home-section-first-mobile-swiper {
    display: block;
    margin: 0 -12px 8px;
  }

  .home-section-first__news-grid>.home-section-first__card--lead,
  .home-section-first__news-grid>.home-section-first__stack {
    display: none !important;
  }

  .home-section-first__stack {
    flex-direction: column;
    gap: 16px;
  }

  .home-section-first__stack .card,
  .home-section-first__card--lead {
    aspect-ratio: auto !important;
  }

  /* 移动端：广告位纵向堆叠，每个占一整行 */
  .home-section-first__ads,
  .home-section-second__ads {
    flex-direction: column;
  }

  /* =========== Mobile Uniform Post Styling =========== */

  /* 1. Standard Cards (Left Text, Right Image) */
  .standard-card {
    flex-direction: row-reverse !important;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    box-shadow: none !important;
    background: #fff;
    height: auto !important;
    min-height: auto !important;
    aspect-ratio: auto !important;
  }

  .standard-card .card-media {
    width: 110px !important;
    height: 75px !important;
    flex-shrink: 0;
    border-radius: 4px;
    aspect-ratio: auto !important;
  }

  .standard-card .card-body {
    padding: 0 !important;
    justify-content: space-between;
    flex: 1;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .standard-card .card-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    font-weight: 500 !important;
    min-height: auto !important;
    white-space: normal !important;
    color: #333 !important;
  }

  .standard-card .card-meta {
    font-size: 11px !important;
    color: #999 !important;
    margin-top: 6px !important;
  }

  .standard-card .status-chip {
    display: none !important;
  }

  /* 2. Hero Cards (Top Image, Blue Bottom Box) */
  .card[class*="--lead"]:not(.overlay-card) {
    flex-direction: column !important;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: none !important;
    margin-bottom: 8px !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }

  .card[class*="--lead"]:not(.overlay-card) .card-media {
    width: 100% !important;
    height: 200px !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
  }

  .card[class*="--lead"]:not(.overlay-card) .card-body {
    padding: 24px 16px 16px 16px !important;
    background: #0e3051 !important;
    color: #fff !important;
    position: relative !important;
    border-radius: 0 !important;
  }

  .card[class*="--lead"]:not(.overlay-card) .card-title {
    color: #fff !important;
    font-size: 18px !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    font-weight: 600 !important;
  }

  .card[class*="--lead"]:not(.overlay-card) .card-overlay-desc,
  .card[class*="--lead"]:not(.overlay-card) .common-news-lead-desc {
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    margin-top: 8px;
  }

  .card[class*="--lead"]:not(.overlay-card) .card-meta {
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 8px !important;
  }

  .card[class*="--lead"] .chip-hot,
  .card[class*="--lead"] .chip-hot-w {
    top: -16px !important;
    left: 16px !important;
    display: inline-block !important;
  }

  /* 3. Overlay Cards (Top section lead/stack: refactoring visual DOM order purely via CSS) */
  /* 只给主大片(--lead)保留全宽深蓝属性，右侧堆叠的(stack)改为标准小图横排 */
  .home-section-first__card--lead.overlay-card {
    height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    margin-bottom: 8px !important;
    aspect-ratio: auto !important;
  }

  .home-section-first__card--lead.overlay-card .card-media {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
  }

  .home-section-first__card--lead.overlay-card .card-media img {
    height: 200px !important;
    flex: none;
    aspect-ratio: auto !important;
  }

  .home-section-first__card--lead.overlay-card .card-overlay-title {
    position: static !important;
    background: #0e3051 !important;
    padding: 24px 16px 16px 16px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #fff !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  .home-section-first__card--lead.overlay-card .status-chip {
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    z-index: 10;
  }

  .overlay-card .card-overlay-title {
    position: static !important;
    background: #0e3051 !important;
    padding: 24px 16px 16px 16px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #fff !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    max-height: calc(1.4em * 2 + 40px) !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
  }

  .overlay-card .status-chip {
    top: calc(200px - 16px) !important;
    /* sit exactly at the boundary of image and text */
    left: 16px !important;
    z-index: 10;
  }

  .home-section-first__card--stack.overlay-card .status-chip {
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
  }
}

/*
  保留原有其他样式
*/
.topics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.topics::-webkit-scrollbar {
  height: 6px;
}

.topics::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 999px;
}

.section-block {
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.grid-3-lists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* 三列 ship 区顶部图片固定高度 210px */
.grid-3-lists .card .card-media {
  height: 210px;
}

/* 第四内容区（原 GREEN SHIPPING）：4 列 3 行，中间 2x2 大卡片 */
.home-section-fourth__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, 330px);
  /* 每行 330，小块 330，大块 2 行共 660 */
  gap: 24px;
}

.home-section-fourth__card {
  height: 330px;
  /* 小块总高度 */
}

.home-section-fourth__card .card-media {
  height: 220px;
  /* 小块图片高度 */
}

.home-section-fourth__card--lead {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.home-section-fourth__cell--top-left {
  grid-column: 1;
  grid-row: 1;
}

.home-section-fourth__cell--top-right {
  grid-column: 4;
  grid-row: 1;
}

.home-section-fourth__cell--middle-left {
  grid-column: 1;
  grid-row: 2;
}

.home-section-fourth__cell--middle-right {
  grid-column: 4;
  grid-row: 2;
}

.home-section-fourth__cell--bottom-1 {
  grid-column: 1;
  grid-row: 3;
}

.home-section-fourth__cell--bottom-2 {
  grid-column: 2;
  grid-row: 3;
}

.home-section-fourth__cell--bottom-3 {
  grid-column: 3;
  grid-row: 3;
}

.home-section-fourth__cell--bottom-4 {
  grid-column: 4;
  grid-row: 3;
}

.home-section-fourth__card--lead .card-media {
  /* 与 SHIPBUILDING / SAFETY / PEOPLE 区的大图高度保持一致 */
  height: 460px;
}

@media (max-width: 768px) {
  .grid-3-lists {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .activity-prev {
    left: 10px;

  }

  .activity-next {
    right: 10px;

  }
}

.list-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ship 三列区整体块样式：顶部蓝色边框、平直无圆角 */
.home-section-third__left .list-column {
  background-color: #fff;
  padding-top: 12px;
}

.home-section-third__left .list-column:nth-child(1) {
  border-top: 4px solid #0F9DC0;
}

.home-section-third__left .list-column:nth-child(2) {
  border-top: 4px solid #007EC9;
}

.home-section-third__left .list-column:nth-child(3) {
  border-top: 4px solid #0E3051;
}

.home-section-third__left .card {
  border-radius: 0;
  box-shadow: none;
}

.column-header {
  display: flex;
  align-items: center;
}

.column-title {
  padding: 10px;
  font-weight: 700;
  font-size: 20px;
}

.column-more {
  color: #333;
  margin-left: 50px;
}

.text-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-section-third__left .text-list li {
  position: relative;
  padding: 12px 12px 12px 20px;
  /* 为前面的圆点留空间 */
  border-radius: 0;
  min-height: 90px;
  /* 两行文字高度 + 内边距，大致固定块高 */
  display: flex;
  align-items: start;
}

.home-section-third__left .text-list li+li {
  border-top: 1px solid #e5e5e5;
}

.home-section-third__left .text-list li:nth-child(odd) {
  background: #f7f7f7;
  /* 第一行灰色 */
}

.home-section-third__left .text-list li:nth-child(even) {
  background: #fff;
  /* 第二行白色 */
}

.home-section-third__left .text-list li::before {
  content: "•";
  position: absolute;
  left: 10px;
  top: 30%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #666;
}

.text-list li a {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 固定为两行文字高度 */
  min-height: calc(1.5em * 2);
}

.text-list li a:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

/* 第二内容区：Shipbuilding Section Layout */
.home-section-second__grid {
  display: grid;
  /* 3 列：
     - 大图占前两列
     - 右上两张小图占第 3 列（上下各一张）
     - 第二行 3 张小图均分整行
     大图跨两列两行，总面积约等于 4 张小图
  */
  grid-template-columns: repeat(3, 1fr);
  /* 与你当前设定保持一致：第一行 680px，第二行 330px */
  grid-template-rows: 680px 330px;
  gap: 30px;
}

/* Top Row Areas */
.home-section-second__card--lead {
  /* 大图跨前两列、两行 */
  grid-column: 1 / 3;
  grid-row: 1 / 2;
}

.home-section-second__column--top {
  /* 右上两张小图放在第 3 列第一行，内部再纵向拆分 */
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-section-second__column--top .card {
  flex: 1;
  height: calc(50% - 10px);
}

/* Bottom Row Areas */
.home-section-second__row--bottom {
  grid-column: 1 / -1;
  /* Span full width */
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Specific Card Styles */
.home-section-second__card--lead .card-media {
  height: 450px;
  /* 主图高度 450px */
}

/* SHIPBUILDING / GREEN / SAFETY / PEOPLE 主新闻：上图下文块（共享基础样式） */
.home-section-second__card-body--lead,
.home-section-fourth__card-body--lead,
.home-section-fifth__card-body--lead,
.home-section-sixth__card-body--lead {
  color: #fff;
  padding: 20px 24px 18px;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  flex: 1;
}

/* 各区块主新闻背景色 */
.home-section-second__card-body--lead {
  background: #20558B;
}

.home-section-fourth__card-body--lead {
  background: #0E3051;
}

/* 第五内容区（MARITIME SAFETY）：4 列 3 行，大卡片在右上角（2x2） */
.home-section-fifth__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, 330px);
  gap: 24px;
}

.home-section-fifth__card {
  height: 330px;
}

.home-section-fifth__card .card-media {
  height: 220px;
}

.home-section-fifth__card--lead {
  grid-column: 3 / 5;
  /* 右侧两列 */
  grid-row: 1 / 3;
  /* 上方两行 */
}

.home-section-fifth__card--lead .card-media {
  height: 460px;
  /* 大图高度 460 */
}

.home-section-fifth__card-body--lead {
  background: #0F9DC0;
}

/* 第六内容区（PEOPLE）：4 列 3 行，中间 2x2 大卡片 */
.home-section-sixth__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, 330px);
  gap: 24px;
}

.home-section-sixth__card {
  height: 330px;
}

/* 大图卡片使用自适应高度，避免与固定 330px 小卡片高度共用导致图片与文字重叠 */
.home-section-fourth__card--lead,
.home-section-fifth__card--lead,
.home-section-sixth__card--lead {
  height: auto;
}

.home-section-sixth__card .card-media {
  height: 220px;
}

.home-section-sixth__card--lead {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.home-section-sixth__card--lead .card-media {
  height: 460px;
}

.home-section-sixth__card-body--lead {
  background: #004494;
}

/* 主新闻标题与摘要样式（各区块共享） */
.home-section-second__title--lead,
.home-section-fourth__title--lead,
.home-section-fifth__title--lead,
.home-section-sixth__title--lead {
  color: #fff;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
}

.home-section-second__desc--lead,
.home-section-fourth__desc--lead,
.home-section-fifth__desc--lead,
.home-section-sixth__desc--lead {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.home-section-second__card-body--lead .card-meta,
.home-section-fourth__card-body--lead .card-meta,
.home-section-fifth__card-body--lead .card-meta,
.home-section-sixth__card-body--lead .card-meta {
  color: rgba(255, 255, 255, 0.8);
}

/* chip-hot 样式已移动到 common.css 中统一管理 */
.card-overlay-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-top: 8px;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Middle Column Adjustments */
.home-section-second__column--top .card-media {
  /* 小块卡片比头条区标准卡片略高（标准卡片 200px） */
  height: 215px;
}

.home-section-second__column--top .card-title {
  font-size: 16px;
  line-height: 1.4;
}

/* Tall Card Overlay */
.card-overlay-center {
  position: absolute;
  top: 40%;
  left: 20px;
  right: 20px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-overlay-center h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.card-overlay-center p {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 500;
}

/* Bottom Row Adjustments */
.home-section-second__row--bottom .card-media {
  /* 底部四个小卡片同样略高一些，保证版块整体视觉统一 */
  height: 215px;
}

.home-section-second__row--bottom .card-title {
  font-size: 15px;
  line-height: 1.4;
}

.bottom-overlay {
  font-size: 18px;
  font-weight: 700;
  padding: 15px;
  bottom: 10px;
}

/* Responsive */
@media (max-width: 1024px) {

  /* SHIPBUILDING：中屏以下改为单列流式布局，大图在上，小新闻在下 */
  .home-section-second__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 24px;
  }

  .home-section-second__card--lead {
    grid-column: 1;
    grid-row: 1;
  }

  .home-section-second__column--top {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    /* 垂直两条小新闻 */
  }

  .home-section-second__row--bottom {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: 1fr;
    /* 平板下改为单列，一行一个 */
  }

  /* 平板及以下：一行一个时，小新闻图片高度自适应 */
  .home-section-second__column--top .card-media,
  .home-section-second__row--bottom .card-media {
    height: auto;
  }
}

@media (max-width: 768px) {
  .home-section-second__grid {
    grid-template-columns: 1fr;

  }



  /* 移动端：SHIPBUILDING 底部 3 条小新闻单列显示 */
  .home-section-second__row--bottom {
    grid-template-columns: 1fr;

  }


}


/* ==================== */

/*   首页网格移动端适配   */

/* ==================== */

/* 平板：4 列改 2 列 */
@media (max-width: 1024px) {

  .home-section-fourth__grid,
  .home-section-fifth__grid,
  .home-section-sixth__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 20px;

  }



  /* 大卡片占满整行 */
  .home-section-fourth__card--lead,
  .home-section-fifth__card--lead,
  .home-section-sixth__card--lead {
    grid-column: 1 / -1;
    grid-row: auto;

  }



  /* 小卡片自动排列 */
  .home-section-fourth__card,
  .home-section-fifth__card,
  .home-section-sixth__card {
    height: auto;
    grid-column: auto;
    grid-row: auto;

  }

  .home-section-fourth__card .card-media,
  .home-section-fifth__card .card-media,
  .home-section-sixth__card .card-media {
    height: auto;
    aspect-ratio: 16/10;

  }

  .home-section-fourth__card--lead .card-media,
  .home-section-fifth__card--lead .card-media,
  .home-section-sixth__card--lead .card-media {
    height: auto;
    aspect-ratio: 16/9;

  }


}


/* 手机：单列显示 */
@media (max-width: 768px) {

  .home-section-fourth__grid,
  .home-section-fifth__grid,
  .home-section-sixth__grid {
    grid-template-columns: 1fr;
    gap: 16px;

  }


}

[data-animate] {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.in-view {
  opacity: 1;
  transform: translateY(0);
}

.ad-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.ad-modal--hidden {
  display: none;
}

.ad-modal__content {
  position: relative;
  max-width: 1120px;
  width: 90%;
  background-color: transparent;
}

.ad-modal__image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.ad-modal__image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.ad-modal__close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.ad-modal__close-button i {
  font-size: 18px;
}

.ad-modal__close-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ad-modal__label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
}

@media (max-width: 768px) {
  .ad-modal__content {
    width: 94%;
  }

  .ad-modal__close-button {
    top: 8px;
    right: 10px;
  }

  .ad-modal__label {
    left: 10px;
    bottom: 10px;
  }
}

.ad-floating {
  position: fixed;
  right: 0px;
  bottom: 0px;
  z-index: 900;
}

.ad-floating__content {
  position: relative;
  width: 420px;
  max-width: 100vw;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ad-floating__image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.ad-floating__close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
}

.ad-floating__close-button i {
  font-size: 16px;
}

.ad-floating__close-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .ad-floating {
    right: 12px;
    bottom: 12px;
  }

  .ad-floating__content {
    width: 90vw;
  }
}

/* ====================================
   横幅广告滚动视差效果 (类似大疆风格)
   随滚动展开/收缩的沉浸式动画
   ==================================== */

.banner-parallax-section {
  position: relative;
  overflow: hidden;
  margin: 40px 0;
}

.banner-parallax-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

.banner-parallax-content {
  /* 初始状态：缩小 + 圆角，无透明度变化 */
  transform: scale(0.75);
  border-radius: 32px;
  opacity: 1;
  will-change: transform, border-radius, width;
  overflow: hidden;
  max-width: none;
  /* 不限制max-width，由width控制 */
  width: 75%;
  margin: 0 auto;
  /* 不使用 CSS 过渡，由 JS lerp 控制平滑动画 */
}

/* 页面加载后状态 */
.banner-parallax-content.is-loaded {
  opacity: 1;
}

/* 完全展开状态（通过 JS 控制） */
.banner-parallax-content.is-expanded {
  transform: scale(1);
  border-radius: 0;
  opacity: 1;
  width: 100%;
  max-width: 100%;
}

/* 图片/视频填充效果 */
.banner-parallax-content img,
.banner-parallax-content video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 入场动画已移除 */

/* 首页移动端前三条轮播：对齐PC视觉（右上角标签 + 底部浅蓝标题条） */
@media (max-width: 768px) {
  /* 顶部三级新闻轮播：移动端全宽展示，减少与菜单间距 */
  .home-mobile-primary-nav {
    margin-bottom: 0 !important;
  }

  .home-section-first {
    padding-top: 2px !important;
  }

  .home-section-first-mobile-swiper {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 calc(50% - 50vw) 6px !important;
  }

  .home-section-first-mobile-swiper .swiper-slide {
    width: 100%;
  }

  .home-section-first-mobile-swiper__pagination {
    margin-top: 6px !important;
  }

  /* 轮播广告区：压缩上下留白 */
  .banner-parallax-section.section {
    margin: 6px 0 !important;
    padding-block: 6px !important;
  }

  /* 文章列表间距收紧，并用灰色分隔线隔开 */
  .home-section-first__news-grid {
    gap: 0 !important;
  }

  .home-section-first__news-grid .home-section-first__card--standard {
    margin: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  .home-section-first-mobile-swiper__card {
    border-radius: 0 !important;
    overflow: hidden;
  }

  .home-section-first-mobile-swiper__card .card-media {
    position: relative;
    height: 220px !important;
  }

  .home-section-first-mobile-swiper__card .card-media::after {
    display: none !important;
  }

  .home-section-first-mobile-swiper__card .status-chip {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
  }

  .home-section-first-mobile-swiper__card .card-overlay-title {
    position: absolute !important;
    display: block !important;
    left: 0;
    right: 0;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: rgba(0, 126, 201, 0.9) !important;
    color: #fff !important;
    box-sizing: border-box;
    height: calc(1.4em * 2 + 24px) !important;
    max-height: calc(1.4em * 2 + 24px) !important;
    overflow: hidden !important;
    z-index: 3;
  }

  .home-section-first-mobile-swiper__title-text {
    display: block !important;
    width: 100%;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    overflow: hidden !important;
    max-height: calc(1.4em * 2) !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
  }
}
