/* 全局样式 */
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
}

/* 布局容器 */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部导航栏 */
nav {
    background: #ffffff;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .logo {
    height: 48px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

nav ul li a:hover {
    color: #0077cc;
}
/* 多级下拉菜单基础 */
.navbar .dropdown-menu { border-radius: 10px; }
.dropdown-submenu { position: relative; }
.dropdown-submenu > a::after {
  content: "▸"; font-size: 10px; margin-left: 6px;
}
.dropdown-submenu .dropdown-menu {
  top: 0; left: 100%; margin-left: .2rem; margin-right: .2rem;
}
/* 可选：悬停展开（桌面端友好） */
@media (hover:hover) {
  .dropdown-submenu:hover > .dropdown-menu { display: block; }
}
/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px 15px;
    text-align: center;
}

thead {
    background-color: #f0f0f0;
}

/* 表单 */
form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-top: 20px;
}

label {
    display: block;
    margin: 15px 0 5px;
    font-weight: bold;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    background: #0077cc;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
}

button:hover {
    background: #005fa3;
}

/* Hero 横幅区 */
.hero {
    background-image: url('/static/images/hero_bg.JPG');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: white;
    padding: 20px 5px;
    text-align: center;
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: -50%;
    width: 200%; height: 100%;
    background: rgba(0, 0, 0, 0.3);  /* 半透明黑色遮罩增强对比 */
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 38px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
}

.btn-primary {
    background-color: white;
    color: #0077cc;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #e5e5e5;
}

/* 三栏特色展示 */
.features {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: white;
    padding: 20px;
    flex: 1;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 快速入口按钮组 */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 50px;
}

.quick-btn {
    background: #0077cc;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.quick-btn:hover {
    background: #005fa3;
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
    justify-content: center;
}

.teacher-card {
    background: white;
    padding: 20px;
    width: 250px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.teacher-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}
/* 下拉菜单容器 */
.dropdown {
    position: relative;
}

/* 子菜单（不要用 margin-top）*/
.dropdown-content {
  position: absolute;
  top: 100%;               /* 紧贴主菜单底部 */
  left: 0;
  display: none;
  background-color: white;
  padding: 8px 0;          /* 增加菜单内间距（上下） */
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  border-radius: 4px;
}

/* 子菜单项样式 */
.dropdown-content li {
  display: block;
  padding: 8px 16px;      /* 字体周围留出空间 */
  white-space: nowrap;
  color: #333;
  text-decoration: none;
}

.dropdown-content li a {
    color: #333;
    text-decoration: none;
    display: block;
}

.dropdown-content li a:hover {
    background-color: #f0f0f0;
}

/* 鼠标悬停时显示下拉内容 */
.dropdown:hover .dropdown-content {
    display: block;
}

.slider-section {
    margin: 50px 0;
    text-align: center;
}

.slider {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.slides {
    display: flex;
    width: 300%;
    height: 100%;
    animation: slide 40s infinite;
}

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

/* 轮播动画 */
@keyframes slide {
    0% { transform: translateX(0); }
    25% { transform: translateX(-100%); }
    50% { transform: translateX(-200%); }
    75% { transform: translateX(-300%); }
    100% { transform: translateX(0); }
}

.slider-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    height: 500px;
    position: relative;
}

.slider-track {
    display: flex;
    width: calc(100%); /* 宽度为原图2倍（复制了一份） */
    animation: scroll-left 20s linear infinite;
}

.slider-track img {
    width: 100%; /*1000px; */
    height: 500px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 无限左滚动画 */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-5000px); /* 5图 × 1000px */
    }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 视频 */
.videos {
    margin: 40px 0;
}

.video-box {
    margin-bottom: 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.video-box iframe, .video-box video {
    width: 100%;
    height: 400px;
    border-radius: 8px;
}

.lesrooster img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 页脚 */
footer {
    background: #f2f2f2;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
    color: #666;
    font-size: 14px;
}

.pdf-list ul {
    list-style-type: disc;
    padding-left: 20px;
}

.pdf-list a {
    text-decoration: none;
    color: #0077cc;
}

.pdf-list a:hover {
    text-decoration: underline;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* 调整列宽  repeat(auto-fill, minmax(160px, 1fr))*/
    gap: 12px;
    padding: 10px 0;
}

.gallery-item img {
    width: 100%;
    height: 120px;              /* 控制高度 */
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.gallery-item img:hover {
    transform: scale(1.05);     /* 可选：鼠标悬停微放大 */
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.video-item {
    text-align: center;
}

.video-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.video-item img:hover {
    transform: scale(1.03);
}


.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    margin: 0 10px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.pagination span {
    margin: 0 10px;
    font-weight: 500;
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);  /* 小屏幕显示2列 */
  }
}

.dropdown > a::after {
  content: " ▼";
  font-size: 0.6em;
}

.school-map {
  padding: 20px 0;
}

.school-map h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  font-size: 14px;
}

/* 在屏幕宽度小于768px时生效的优化样式 */
@media (max-width: 768px) {
  /* 横幅区域文本居中 */
  .jumbotron, .banner, .hero {
    text-align: center;
    padding: 1rem;
  }

  /* 标题字体居中 */
  h1, h2, h3, h4 {
    text-align: center !important;
  }

  /* logo 图标缩小并居中 */
  .navbar-brand img {
    max-width: 120px;
    display: block;
    margin: 0 auto;
  }

  /* 菜单居中排列 */
  .navbar-nav {
    text-align: center;
  }
  .navbar-nav .nav-item {
    display: block;
    margin-bottom: 0.5rem;
  }

  /* 首页按钮居中 */
  .btn {
    display: block;
    width: 80%;
    margin: 0.5rem auto;
  }

  /* 调整图片展示 */
  .img-fluid, img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}

/* ==== Bootstrap 多级下拉支持 ==== */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-left: .1rem;
  margin-right: .1rem;
}

.dropdown-menu.show {
  display: block;
}

