/* 全局变量定义 */
:root {
  color: rgb(228, 226, 226);
  --primary-color: #3498db;
  /* Main blue color */
  --secondary-color: #2ecc71;
  /* Green accent */
  --accent-color: #e74c3c;
  /* Red focus color */
  --bg-color: #f8f9fa;
  /* Light background */
  --card-bg: #ffffff;
  /* Card background */
  --text-main: #34495e;
  /* Dark gray text */
  --text-secondary: #7f8c8d;
  /* Light gray text */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* Subtle shadow */
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  /* Medium shadow */
  --radius-lg: 12px;
  /* Large rounded corners */
  --radius-md: 8px;
  /* Medium rounded corners */
  --font-main: 'Nunito Sans', sans-serif;
  /* Main font */
  --font-headers: 'Montserrat', sans-serif;
  /* Header font */
}

/* -------------------------------- 导航部分 -------------------------------- */
.indexnav-container {
  /* position: sticky; */
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
}

.indexnav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* .indexnav .left .logo-text {
  font-size: 28px;                     Larger logo
  font-weight: 700;
  color: var(--primary-color);          Use primary color
  letter-spacing: -1px;
  font-family: var(--font-headers);      Distinct font for logo
} */
.indexnav .left img {
  width: 50px;
  height: 50px;
}

.indexnav .right ul {
  list-style: none;
  display: flex;
  gap: 30px;
  padding: 0;
  margin: 0;
}

.indexnav .right ul li a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 16px;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s;
}

.indexnav .right ul li a:hover,
.indexnav .right ul li a.active {
  color: var(--primary-color);
}

/* indexnavigation underline animation */
.indexnav .right ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.indexnav .right ul li a:hover::after,
.indexnav .right ul li a.active::after {
  width: 100%;
}

.indexnav .right button {
  background-color: #fff;
  border: none;
  text-align: center;
  line-height: 10px;
  color: var(--text-secondary);
  font-size: 16px;
  /* position: relative; */
}

.indexnav .right ul button:hover .icon {
  cursor: pointer;
  fill: red;
}

.indexnav .right ul .icon {
  width: 15px;
  height: 15px;
  fill: var(--text-secondary);
}

/* -------------------------------- 导航部分 end -------------------------------- */

/* -------------------------------- 搜索弹窗部分 -------------------------------- */
.window {
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.window .center {
  width: 70%;
  height: 350px;
  border-radius: 15px;
  background-color: #fff;
  color: #cdcece;
}

.window .center button:hover {
  cursor: pointer;
  color: red;
}

.window .center .windowtitle {
  height: 30px;
  text-align: center;
  /* background-color: #f8e6e6; */
}

.window .center .windowtitle span {
  font-size: 20px;
  color: #141414;
}

.window .center .windowtitle button {
  height: 100%;
  float: right;
  border: none;
  background-color: #fff;
}

.window .center .windowhead {
  height: 10%;
  margin-bottom: 10px;
  border: 1px solid black;
  display: flex;
  justify-content: space-between;
}

.window .center .windowhead input {
  width: 90%;
  border: none;
}

.window .center .windowhead button {
  width: 10%;
  border: none;
  background-color: #fff;
}

.window .center .windowbody {
  width: 100%;
  height: 85%;
  margin-bottom: 10px;
  background-color: #fff;
  overflow-y: auto;
}

.window .center .windowbody a {
  display: block;
  width: 100%;
  background-color: #fff;
  color: #cdcece;
  text-decoration: none;
}

.window .center .windowbody a:hover {
  background-color: #f8f1f1;
}

.window .center .windowbody a span {
  margin-left: 10px;
}

.window .center .windowbody .listbox {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #f7f4f4;
}

.window .center .windowbody .listbox .Classification {
  padding: 0px 5px;
  margin: 5px;
  background-color: #f3f2f2;
  border-radius: 15px;
  float: right;
  font-size: 10px;
  color: #cdcece;
}

.window .center .windowfoot {
  height: 10%;
}

.window .center .windowfoot span {
  font-size: 15px;
  color: #cdcece;
  margin-right: 10px;
}

/* -------------------------------- 搜索弹窗部分 end -------------------------------- */

/* --- 内容区域 --- */
.center {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- Banner --- */
.banner {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-lg);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  box-shadow: 1px 20px 20px -2px rgb(197, 196, 196) ;
  border: 1px solid  rgb(238, 237, 237) ;
}

/* 轮播图片容器 */
.banner-swiper {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.8s ease-in-out;
}
.swiper-item {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.swiper-item img{
  width: 100%;
  height: 100%;
}

/* .banner-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.45);
  z-index: 1;
} */
/* .banner-content {
  position: relative;
  z-index: 2;
} */

/* 底部圆点 */
.swiper-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: 0.3s;
}
.dot.active {
  background: #fff;
  width: 24px;
  border-radius: 5px;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
  padding: 20px;
}

.banner h1 {
  font-size: 56px;
  /* Increase font size */
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 2px;
  font-family: var(--font-headers);
  /* Use header font */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  /* Add shadow */
}

.banner .subtitle {
  font-size: 20px;
  /* Increase font size */
  opacity: 0.9;
  margin-bottom: 20px;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  /* Add subtle shadow */
}

/* --- marquee 跑马灯 --- */
.marquee-container {
  margin-top: 10px;
  width: 100%;
  overflow: hidden;
  /* 超出部分隐藏 */
  position: relative;
  /*  绝对定位 */
  white-space: nowrap;
  /* 禁止文本换行 */
}

.marquee-text {
  color: rgba(37, 30, 30, 0.541);
  display: inline-block;
  /* 保持文字一行，且能被动画位移 */
  white-space: nowrap;
  /* 关键：禁止文字换行 */
  padding-left: 100%;
  /* 初始位置：文字从容器右侧外开始 */
  animation: marquee 15s linear infinite;
  /* 15秒匀速滚动，无限循环 */
}

/* 鼠标悬停停止滚动 */
.marquee-text:hover {
  animation-play-state: paused;
  /* 推荐用 paused 而非 none，恢复时更流畅 */
}

/* 跑马灯动画效果 */
@keyframes marquee {

  /* 开始 */
  0% {
    transform: translateX(0%);
  }

  /* 消失 */
  100% {
    transform: translateX(-100%);
  }
}

/* 时间 */
.timebox {
  /* background-color: #cca7a7; */
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}
.timebox .xt{
  width: 8%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.06);
}

.timebox a {
  color: #141414;
  text-decoration: none;
}

.timeboxcenter {
  padding: 5px 20px;
  /* width: 50%; */
  background-color: #fff;
  border: 3px solid rgba(0, 0, 0, 0.06);
  border-radius: 15px;
  text-align: center;
}
.timebox:hover .timeboxcenter{
  border: 3px solid rgb(233, 220, 245);
}
.timebox:hover .xt{
  background-color: rgb(233, 220, 245);
}

/* 时间 */


/* --- 通用 Section --- */
.section-box {
  margin-top: 60px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
  margin-top: 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.section-header h2 {
    font-size: 24px;
    color: #222;
    margin: 0;
}
.more-btn {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.section-title {
  font-size: 32px;
  /* Larger title */
  font-weight: 700;
  color: var(--text-main);
  margin-right: 10px;
  font-family: var(--font-headers);
}

.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.more-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.more-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.more-link .arrow {
  margin-left: 5px;
  font-size: 16px;
}

/* 卡片列表外层容器：使用CSS Grid实现响应式卡片布局 */
.scroll-container {
  --cols: 4;                /* CSS变量，默认渲染4列，JS会根据窗口宽度动态改写此变量 */
  display: grid;            /* 开启网格布局 */
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); /* 根据--cols变量生成等宽列，minmax(0,1fr)解决内容挤压 */
  gap: 20px;                /* 卡片之间横向、纵向间距 20px */
  overflow: visible;        /* 取消横向滚动，所有卡片完整展示，不会裁切半个卡片 */
  margin-top: 16px;         /* 容器距离上方标题区域外边距 */
}


.scroll-container::-webkit-scrollbar {
  display: none;
}

/* --- 卡片通用样式 --- */
.card-link {
  text-decoration: none;
  color: inherit;
  flex: 0 0 320px;
  /* transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; */
  border: 1px solid rgb(197, 196, 196);
  background-color: #fff;
  /* box-shadow:1px 20px 20px -2px rgb(197, 196, 196); */
  border-radius: 15px;
  overflow: hidden;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  /* box-shadow: var(--shadow-sm); */
  /* transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); */
  height: 100%;
  display: flex;
  flex-direction: column;
  /* border: 1px solid rgba(0, 0, 0, 0.03); */
}

.card:hover {
  /* transform: translateY(-5px); */
  /* box-shadow: var(--shadow-md); */
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
}

.card-img {
  width: 100%;
  height: 200px;
  /* Adjust the image size */
  overflow: hidden;
  position: relative;
}

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

.card-info {
  padding: 15px;
  /* Adjust spacing inside the info */
}
 h3 {
    display: block;
    font-size: 1.17em;
    margin: 5px 0px;
    font-weight: bold;
    unicode-bidi: isolate;
    color: #141414;
}

.location {
  font-size: 20px;
  /* Increase title size */
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.4;
  color: var(--text-main);
}

.city {
  color: var(--text-secondary);
  /* City color */
  margin-bottom: 3px;
  max-height: 30px;
  overflow: hidden;
  /* 超出部分隐藏 */
}

.station {
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 5px;
  margin: 0px;
  max-height: 33px;
  padding: 10px;
  overflow: hidden;
  /* 超出部分隐藏 */
  background-color: #f0efd5;
}

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

.card-content {
  padding: 20px;
  /* background-color: #ddc1c1; */
  /* margin-bottom: 5px; */
  /* flex: 1;
  display: flex;
  flex-direction: column;  */
}

.card-title {
  font-size: 20px;
  /* Increase title size */
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag {
  display: inline-block;
  background-color: rgba(52, 152, 219, 0.15);
  /* Lighter blue */
  color: var(--primary-color);
  /* Primary color tag */
  padding: 6px 12px;
  /* Adjust padding */
  border-radius: 6px;
  font-size: 12px;
  max-height: 30px;
  overflow: hidden;
  /* 超出部分隐藏 */
}

/* --- 笔记卡片特殊样式 --- */
.note-card {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  height: 100%;
}

.note-card:hover {
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
}

.note-icon {
  font-size: 36px;
  margin-bottom: 15px;
  display: block;
  color: var(--secondary-color)
    /* Green icon */
}

.card-tag {
  padding: 5px 5px 5px 10px;
  border-radius: 10px;
  background-color: rgba(46, 204, 113, 0.15);
  color: var(--secondary-color);
  font-size: 13px;
}

/* --- 旅游卡片特殊样式 --- */
.travel-link {
  flex: 0 0 320px;
}

.travel-card {
  position: relative;
  height: 350px;
  /* reduced height slightly*/
  display: flex;
  flex-direction: column;

}

.travel-info {
  padding: 15px;
  /* adjust the padding*/
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  /*Add a border*/
  flex-grow: 1;
  /* occupy remaining space*/
}

.travel-info h3 {
  font-size: 18px;
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .indexnav-container {
    padding: 0 10px;
  }

  .indexnav .right ul {
    gap: 15px;
  }

  .indexnav .right ul li a {
    font-size: 14px;
  }

  .banner h1 {
    font-size: 40px;
  }

  .banner .subtitle {
    font-size: 16px;
  }

  .card-link {
    flex: 0 0 260px;
  }

  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 576px) {
  .indexnav .left .logo-text {
    font-size: 24px;
  }

  .banner h1 {
    font-size: 32px;
  }

  .banner .subtitle {
    font-size: 14px;
  }

  .card-link {
    flex: 0 0 85%;
  }

  .scroll-container {
    padding-left: 0;
    padding-right: 0;
  }
}

/* 工具栏 */
.home-tool-bar {
  position: fixed;
  bottom: 100px;
  right: 0px;
  text-align: center;
  display: flex;
  flex-direction: column;
  display: none;
  color: black;
  background-color: white;
  border-radius: 15px;
  border: 1px solid #cac9c9;
  overflow: hidden;
}

.home-tool-bar button {
  border: none;
  background-color: white;
}

.home-tool-bar button:hover {
  cursor: pointer;
}

.home-tool-bar .home-tool-bar-box {
  padding: 5px;
  border-bottom: 1px solid #cac9c9;
}

.desc {
  opacity: 0;
  /* 初始隐藏 */
  visibility: hidden;
  /* 防止隐藏时占用空间 */
  position: fixed;
  /* 绝对定位，基于 li 的相对定位 */
  right: 70px;
  padding: 8px;
  border-radius: 5px;
  text-align: center;
  color: black;
  font-size: 15px;
  background-color: #f3f2f2;
  display: flex;
  flex-direction: row;
  /* transition: opacity 0.5s ease; 平滑显示/隐藏 */
}

/* ---- 三角形 ---- */
/* 通用样式，方便展示 */
.triangle-container {
  position: fixed;
  /* 绝对定位*/
  right: 50px;
  width: 20px;
  height: 20px;
  /* background-color: #63ee39; */
}

/* 基础三角形样式 */
.triangle {
  width: 0;
  height: 0;
  border-style: solid;
}

/* 向右的三角形 */
.triangle-right {
  margin-top: -5px;
  border-width: 15px 0 15px 15px;
  border-color: transparent transparent transparent #f3f2f2;
}
