/* ===================================
   外眼看河池 专题页面 样式
   =================================== */

/* 容器与整体布局 */
.container {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #ffffff;
  overflow-x: hidden;
  font-size: 16px;
}

/* ===================================
   1. 头部 Banner 区域
   =================================== */
.header {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #021a38;
}

.header-banner {
  display: block;
  width: 100%;
}

.header-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ===================================
   2. 导航栏区域
   =================================== */
.nav {
  position: relative;
  width: 100%;
  background: linear-gradient(to right, #388a89, #4a9b9a, #388a89);
  z-index: 100;
  box-shadow: 0 4px 15px rgba(45, 115, 115, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.nav-item {
  position: relative;
  color: rgba(255, 255, 255, 0.95);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 8px 24px;
  border-radius: 24px;
  transition: all 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.35s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.nav-item:hover::after {
  width: 35%;
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.nav-item.active::after {
  width: 45%;
}

/* ===================================
   3. 主体内容区域 (Sections)
   =================================== */
.content {
  width: 100%;
  margin: 0 auto;
}

.section-block {
  padding: 50px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 栏目标题与下划线 (字体大小最小16px, 标题使用24px) */
.section-title {
  text-align: center;
  margin-bottom: 35px;
}

.section-title a {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.section-title h2 {
  font-size: 30px;
  font-weight: 700;
  color: #1e5c5e;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.section-title .title-line {
  display: block;
  width: 36px;
  height: 3px;
  background: #e08838;
  margin: 8px auto 0;
  border-radius: 2px;
  transition:
    width 0.35s ease,
    background 0.35s ease;
}

.section-title a:hover {
  transform: translateY(-2px);
}

.section-title a:hover h2 {
  color: #e08838;
}

.section-title a:hover .title-line {
  width: 52px;
}

/* HECHI INSIGHTS 特殊背景下的标题悬停效果 */
.section-insights .section-title a:hover h2 {
  color: #f3a647;
}

.section-insights .section-title a:hover .title-line {
  background: #ffffff;
  width: 52px;
}

/* 通用按钮 (MORE) */
.more-btn-wrapper {
  text-align: center;
  margin-top: 38px;
}

.btn-more {
  display: inline-block;
  background: #e08838;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 9px 42px;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(224, 136, 56, 0.3);
  transition: all 0.3s ease;
}

.btn-more:hover {
  background: #c9752b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224, 136, 56, 0.45);
}

/* ===================================
   4. 通用卡片外观 (与 Ocean University 保持一致, 图片比例统一 3/2)
   =================================== */
.log-card,
.viral-card,
.insights-card,
.media-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(13, 98, 185, 0.12);
  box-shadow: 0 6px 20px rgba(2, 26, 56, 0.06);
  transition:
    transform 0.35s cubic-bezier(0.215, 0.61, 0.355, 1),
    box-shadow 0.35s cubic-bezier(0.215, 0.61, 0.355, 1),
    border-color 0.35s ease;
  display: flex;
  flex-direction: column;
}

.log-card > a,
.viral-card > a,
.insights-card > a,
.media-card > a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.log-card:hover,
.viral-card:hover,
.insights-card:hover,
.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 104, 207, 0.35);
  box-shadow: 0 6px 16px rgba(11, 78, 153, 0.12);
}

/* 所有内容图片保持 3:2 比例 */
.card-img-wrapper {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.log-card:hover .card-img-wrapper img,
.viral-card:hover .card-img-wrapper img,
.insights-card:hover .card-img-wrapper img,
.media-card:hover .card-img-wrapper img {
  transform: scale(1.06);
}

.card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

/* 内容区标题字体改为 18px */
.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #222222;
  line-height: 1.4;
}

/* ===================================
   5. 栏目一: MY HECHI LOG (背景色为 #f8f8f8, 左右等高对齐)
   =================================== */
.section-log {
  width: 100%;
  background: #f8f8f8;
  padding: 50px 0;
}

.section-log-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.log-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  width: 100%;
  align-items: stretch;
}

.log-left {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 18px;
}

.log-right {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 15px;
}

/* Swiper 轮播图 */
.log-swiper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  border: 1px solid rgba(13, 98, 185, 0.12);
  box-shadow: 0 6px 20px rgba(2, 26, 56, 0.06);
}

.log-swiper .swiper-slide {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.log-swiper .swiper-slide a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
}

.slide-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f0f0f0;
}

.slide-img-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.log-swiper .swiper-slide:hover img {
  transform: scale(1.05);
}

/* 轮播图底部文案与背景，覆盖到底部包容分页器 */
.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 18px 34px 18px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.45) 60%,
    transparent 100%
  );
  z-index: 2;
  box-sizing: border-box;
  pointer-events: none;
}

.slide-caption p {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin: 0;
}

/* Swiper 分页器融入暗色背景 */
.log-swiper .swiper-pagination {
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 5;
}

.log-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.6);
  opacity: 0.8;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.log-swiper .swiper-pagination-bullet-active {
  background: #e08838;
  opacity: 1;
  width: 18px;
  border-radius: 5px;
}

/* 左下横向卡片 */
.log-card-horizontal {
  flex: 1;
}

.log-card-horizontal > a {
  flex-direction: row;
  height: 100%;
}

.log-card-horizontal .card-img-wrapper {
  width: 35%;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
}

/* 右侧4块卡片布局 */
.log-card-sm > a {
  flex-direction: row;
  height: 100%;
}

.log-card-sm .card-img-wrapper {
  width: 55%;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
}

.log-card-text {
  flex: 1;
}

.log-card-text .card-body {
  padding: 14px 18px;
}

/* ===================================
   6. 栏目二: VIRAL HECHI ( Swiper 轮播图 一行3个 )
   =================================== */
.viral-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.log-swiper,
.viral-swiper,
.swiper-container {
  touch-action: pan-y;
}

.log-swiper img,
.viral-swiper img,
.log-swiper a,
.viral-swiper a {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.viral-swiper {
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 12px 4px 18px 4px;
  margin: -12px -4px -18px -4px;
}

.viral-swiper .swiper-slide {
  height: auto;
  display: flex;
  box-sizing: border-box;
}

.viral-swiper .viral-card {
  width: 100%;
  height: 100%;
}

.viral-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.viral-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.viral-arrow:hover {
  transform: translateY(-50%) scale(1.15);
  opacity: 0.85;
}

.viral-prev {
  left: -50px;
}

.viral-next {
  right: -50px;
}

/* ===================================
   7. 栏目三: HECHI INSIGHTS (背景色 #64a8c3, 三列高度一致)
   =================================== */
.section-insights {
  max-width: 100%;
  padding: 0;
  margin-top: 20px;
  margin-bottom: 20px;
}

.insights-banner-bg {
  width: 100%;
  background: #64a8c3;
  padding: 50px 20px;
}

.insights-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section-insights .section-title h2 {
  color: #ffffff;
}

.section-insights .section-title .title-line {
  background: #f3a647;
}

.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.insights-card-lg {
  height: 100%;
}

.insights-card-lg > a {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.insights-card-lg .card-body {
  flex: 1;
  display: flex;
  align-items: center;
}

.insights-middle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 15px;
}

.insights-card-sm > a {
  flex-direction: row;
  height: 100%;
}

.insights-card-sm .card-img-wrapper {
  width: 42%;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
}

.insights-card-text {
  flex: 1;
}

.insights-card-text .card-body {
  padding: 14px 18px;
}

/* ===================================
   8. 栏目四: MULTIMEDIA (不加视频播放三角形)
   =================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ===================================
   9. 页脚区域 (字体最小16px)
   =================================== */
.footer {
  width: 100%;
  background: #1578af;
  color: rgba(255, 255, 255, 0.95);
  padding: 24px 20px;
  text-align: center;
  font-size: 16px;
}

/* ===================================
   10. 回到顶部按钮 (使用 up.png 图片)
   =================================== */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 70px;
  width: 56px;
  height: 56px;
  background: #6c757d;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  text-decoration: none;
}

.back-to-top img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #495057;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.back-to-top:hover img {
  transform: translateY(-2px);
}

/* ===================================
   11. 页面入场淡入效果 (Scroll Reveal)
   =================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 0.7s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   汉堡菜单基础样式 (参考 Ocean University)
   =================================== */
.burger-checkbox {
  display: none;
}

.burger {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(30, 92, 94, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: none;
  z-index: 1001;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.burger:hover {
  background: rgba(56, 138, 137, 0.95);
  border-color: #ffffff;
}

.burger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 20px;
  background: #ffffff;
  border-radius: 2px;
  left: 9px;
  transition: all 0.3s ease-in-out;
  transform-origin: center center;
}

.burger span:nth-of-type(1) {
  top: 13px;
}

.burger span:nth-of-type(2) {
  top: 19px;
}

.burger span:nth-of-type(3) {
  top: 25px;
}

.burger-checkbox:checked ~ .header .burger span:nth-of-type(1) {
  top: 19px;
  transform: rotate(45deg);
}

.burger-checkbox:checked ~ .header .burger span:nth-of-type(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger-checkbox:checked ~ .header .burger span:nth-of-type(3) {
  top: 19px;
  transform: rotate(-45deg);
}

/* ===================================
   12. 响应式布局 (Mobile / Tablet)
   =================================== */
@media (max-width: 992px) {
  .log-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .viral-prev {
    left: 5px;
  }
  .viral-next {
    right: 5px;
  }
}

@media (max-width: 768px) {
  /* 移动端汉堡菜单按钮与抽屉 */
  .burger {
    display: block;
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1001;
  }

  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .burger-checkbox:checked ~ .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #296362 0%, #388a89 40%, #4a9b9a 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  }

  .burger-checkbox:checked ~ .nav {
    transform: translateX(0);
  }

  .nav-inner {
    display: flex;
    flex-direction: column;
    padding: 85px 20px 40px 20px;
    gap: 14px;
  }

  .nav-item {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 22px;
    text-align: left;
    width: 100%;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
    transition: all 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  }

  .nav-item::after {
    display: none;
  }

  .nav-item:hover,
  .nav-item.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    padding-left: 26px;
    transform: translateX(4px);
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.15),
      inset 0 0 10px rgba(255, 255, 255, 0.15);
  }

  .section-block {
    padding: 30px 15px;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .log-card-horizontal > a,
  .log-card-sm > a,
  .insights-card-sm > a {
    flex-direction: column;
  }

  .log-card-horizontal .card-img-wrapper,
  .log-card-sm .card-img-wrapper,
  .insights-card-sm .card-img-wrapper {
    width: 100%;
  }

  .viral-container {
    padding: 0 35px;
    position: relative;
    box-sizing: border-box;
  }

  .viral-arrow {
    display: flex;
    width: 30px;
    height: 30px;
    z-index: 20;
  }

  .viral-prev {
    left: 2px;
  }

  .viral-next {
    right: 2px;
  }

  /* 移动端卡片阴影优化：消除触屏粘性悬停拉长的拉伸阴影 */
  .log-card,
  .viral-card,
  .insights-card,
  .media-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
  }

  .log-card:hover,
  .viral-card:hover,
  .insights-card:hover,
  .media-card:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
  }

  .viral-swiper {
    padding: 4px 0 8px 0 !important;
    margin: 0 !important;
  }

  .back-to-top {
    right: 30px;
  }

  #insights {
    background: #64a8c3;
  }

  #insights .insights-banner-bg {
    padding: 0;
  }
  .slide-caption {
    padding-top: 20px;
  }
  .slide-caption p {
    font-size: 16px;
  }
}
