/* --- 顶部轮播图 CSS --- */

/* 1. 总容器样式 */
.banner-carousel-container {
    position: relative;
    width: 100%;
    padding-bottom: 31.25%; /* 16:9 宽高比，兼容 chrome 86 */
    height: 0;
    overflow: hidden;
    margin: 0 auto;
    background-color: #f0f0f0;
    /* 允许子元素进行 3d 转换，有助于提升动画性能 */
    transform-style: preserve-3d;}

.banner-carousel-container.dragging {
    cursor: grabbing;}


/* 2. 所有幻灯片项的包裹容器 (用于拖动) */
.banner-slides-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* 使用 flex 布局，方便排列多个 slide-item */
    transition: transform 0.8s ease-in-out;}

/* 2.1 单个幻灯片项目 */
.banner-slide-item {
    flex: 0 0 100%; /* 不缩小，不放大，固定宽度为父容器的 100% */
    width: 100%; /* 确保每个子项占据全部宽度 */
    height: 100%;}

.banner-slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;}

/* 3. 底部覆盖层 (放置标题和圆点) */
.banner-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;}

/* 4. 标题样式 */
.banner-titles-wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 15px;
    text-align: left;}

.banner-title-item {
    display: none;
    font-size: 30px; /* 字号改为 30px */
    font-weight: bold;}

.banner-title-item.active {
    display: block;}

/* 5. 圆点导航样式 */
.banner-dots-wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;}

.banner-dot-item {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #FFFFFF80;
    opacity: 0.6;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;}

.banner-dot-item.active {
    opacity: 1;
    width: 12px;
    height: 12px;
    background-color: white;}

/* 6. 导航按钮样式 */
.banner-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4); /* 半透明底 */
    border: none;
    border-radius: 50%; /* 圆形 */
    width: 60px;
    height: 60px;
    font-size: 24px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20; /* 确保在覆盖层之上 */
    transition: background-color 0.3s ease, color 0.3s ease;}

.banner-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.6);}

.banner-prev-button {
    left: 20px;}

.banner-next-button {
    right: 20px;}
/* 顶层菜单容器，让 itemsBase 横向排列 */
.menuBar {
  white-space: nowrap; /* 父菜单横向排列 */
  display: flex;
  justify-content: space-between;}

/* 每个父菜单容器 */
.itemsBase {
  position: relative;
  display: inline-block;}

/* 父菜单链接样式 */
.items a {
  display: block;
  padding: 0 20px;
  /* background-color: #336699; */
  /*color: white;*/
  color: #083090;
  text-decoration: none;
  line-height: 51px;}

/* 子菜单容器（初始隐藏） */
.itemsOver {
  display: none;
  position: absolute;
  top: 100%; /* 紧贴在父菜单底部 */
  left: 50%; /* 水平居中对齐 */
  transform: translateX(-50%); /* 修正居中位置 */
  background-color: white;
  border: 1px solid #ccc;
  min-width: 160px;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);}

/* 子菜单项 */
.itemsOver .wnp a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  text-align: center;}

/* 子菜单 hover 效果 */
.itemsOver .wnp a:hover {
  background-color: #E6F0FF;
  color: #083090;}

/* 悬停显示子菜单 */
.itemsBase:hover .itemsOver {
  display: block;}

/* 当前项效果
.items a.active {
  color: #083090;
  border-bottom: 4px solid #083090;
}
*/

.items a:hover, .itemsBase:hover .items a {
  background-color: #083090;
  color: white;}

/* --- 轮播图 CSS --- */

/* 1. 总容器样式 */
.carousel-container {
    position: relative; /* 关键：为内部绝对定位的元素提供定位上下文 */
    width: 100%; /* 您可以根据需要设置具体宽度，如 800px */
    /*
     * 兼容 chrome 86 的宽高比设置：
     * 对于 16:9 的宽高比，计算为 (9 / 16) * 100% = 56.25%
     * 这会使容器的高度与其宽度的 56.25% 相等
     */
    padding-bottom: 56.25%; 
    height: 0; /* 使用 padding-bottom 时，必须将 height 设置为 0 */
    overflow: hidden; /* 隐藏容器外的内容 */
    margin: 7px auto; /* 居中显示 */
    background-color: #f0f0f0;}

/* 2. 单个幻灯片项目 */
.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* 默认全部透明 */
    transition: opacity 0.8s ease-in-out; /* 添加淡入淡出过渡效果 */
    visibility: hidden;}

/* 当前激活的幻灯片 */
.slide-item.active {
    opacity: 1; /* 显示当前幻灯片 */
    visibility: visible;}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;}

/* 3. 底部覆盖层 (放置标题和圆点) */
.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 25px;
    /* 从下到上渐变，让文字更清晰 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    color: white;}

/* 4. 标题样式 */
.titles-wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 15px; /* 标题和圆点之间的间距 */
    text-align: center;}

.title-item {
    display: none; /* 默认所有标题都隐藏 */
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;}

.title-item.active {
    display: block;}

/* 5. 圆点导航样式 */
.dots-wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;}

.dot-item {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #FFFFFF80;
    opacity: 0.6;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;}

/* 激活的圆点高亮样式 */
.dot-item.active {
    opacity: 1;
    width: 12px; /* 可以加一些效果让高亮更明显 */
    height: 12px;
    background-color: white;}
