/* ========================================
   福建省新华技术学校官网样式
   主色调：浅蓝色系
   ======================================== */

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f5f9ff;
  line-height: 1.6;
  padding-top: 110px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

/* 颜色变量 */
:root {
  --primary-color: #1890ff;
  --primary-light: #40a9ff;
  --primary-lighter: #e6f7ff;
  --primary-dark: #096dd9;
  --secondary-color: #597ef7;
  --bg-color: #f5f9ff;
  --white: #ffffff;
  --text-primary: #262626;
  --text-secondary: #595959;
  --text-light: #8c8c8c;
  --border-color: #d9e8ff;
  --shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
  --shadow-hover: 0 4px 16px rgba(24, 144, 255, 0.15);
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   顶部导航栏
   ======================================== */
.header {
  background: linear-gradient(135deg, #1e88e5 0%, #64b5f6 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 90px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.header-top {
  display: none;
  background: rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-links a {
  margin-left: 20px;
}

.header-top-links a:hover {
  color: #fff;
}

.header-main {
  width: 100%;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 80px;
  width: auto;
}

/* 导航菜单 */
.nav {
  display: flex;
  gap: 5px;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  display: block;
  padding: 10px 18px;
  color: #fff;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-item > a:hover,
.nav-item.active > a {
  background: rgba(91, 181, 245, 0.2);
}

/* 下拉菜单 */
.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 8px 0;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 14px;
}

.dropdown li a:hover {
  background: var(--primary-lighter);
  color: var(--primary-color);
}

/* ========================================
   轮播图
   ======================================== */
.banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e6f7ff 0%, #d6e4ff 100%);
}

.banner-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-slide[style*="background-image"] {
  background-size: cover;
  background-position: center;
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
}

.banner-content h2 {
  font-size: 24px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-content p {
  font-size: 14px;
  opacity: 0.9;
}

.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.banner-dot.active {
  background: #fff;
  width: 30px;
  border-radius: 6px;
}

/* ========================================
   主要内容区
   ======================================== */
.main-content {
  padding: 40px 0;
  background-image: url('/uploads/images/bg-website-content.jpg');
  background-size: 100% auto;
  background-position: center top;
  background-repeat: repeat-y;
}

/* 区块标题 */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.section-title h3 {
  font-size: 20px;
  color: var(--text-primary);
  position: relative;
  padding-left: 16px;
}

.section-title h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-title .more {
  color: var(--text-light);
  font-size: 13px;
}

.section-title .more:hover {
  color: var(--primary-color);
}

/* 新闻卡片网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.news-card {
  background: var(--white);
  border-radius: 6px;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.news-card-header h4 {
  font-size: 14px;
  color: var(--primary-color);
}

.news-card-header .more-link {
  font-size: 11px;
  color: var(--text-light);
}

.news-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-list li:last-child {
  border-bottom: none;
}

.news-list li a {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 15px;
}

.news-list li a:hover {
  color: var(--primary-color);
}

.news-list li .date {
  font-size: 12px;
  color: var(--text-light);
  flex-shrink: 0;
}

/* 栏目区块 */
.section-block {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* 文章列表页 */
.page-header {
  background: linear-gradient(135deg, var(--primary-lighter) 0%, #f0f5ff 100%);
  padding: 40px 0;
  margin-bottom: 30px;
}

.page-header h2 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.page-header .breadcrumb {
  font-size: 13px;
  color: var(--text-light);
}

.page-header .breadcrumb a:hover {
  color: var(--primary-color);
}

/* 文章列表 */
.article-list {
  background: var(--white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.article-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
  border-bottom: none;
}

.article-cover {
  width: 200px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--primary-lighter);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-info h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.article-info h3:hover {
  color: var(--primary-color);
}

.article-summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  background: #fff;
}

.pagination .current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.pagination a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 文章详情页 */
.article-detail {
  background: var(--white);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-detail h1 {
  font-size: 26px;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
}

.article-detail-meta {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.article-detail-meta span {
  margin: 0 10px;
}

.article-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  word-break: break-word;
}

.article-content p:not([style*="text-indent"]):not([style*="margin-bottom"]) {
  margin-bottom: 16px;
  text-indent: 2em;
}

.article-content p[style*="text-indent"] {
  margin-bottom: 16px;
}

.article-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 4px;
}

.article-content img:not([style*="display"]) {
  margin: 20px auto;
  display: block;
}

.article-content section,
.article-content div {
  box-sizing: border-box;
}

.article-content .xiumi-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  padding: 8px 0;
}

.article-content .xiumi-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.article-content .xiumi-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.article-content .xiumi-scroll-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.article-content .xiumi-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.article-content .xiumi-scroll-container > section {
  display: inline-block;
  white-space: normal;
  vertical-align: top;
  margin-right: 12px;
  max-width: 300px;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.article-content table td,
.article-content table th {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.article-content table th {
  background-color: #f5f5f5;
}

.article-content ul,
.article-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-bottom: 16px;
  font-weight: bold;
}

.article-content h1 { font-size: 24px; }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 18px; }
.article-content h4 { font-size: 16px; }

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
  font-weight: normal;
}

/* 子栏目导航 */
.subnav-container {
  background: var(--white);
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.subnav-header {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.subnav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.subnav-item {
  padding: 6px 16px;
  background: var(--primary-lighter);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 13px;
  transition: all 0.3s;
}

.subnav-item:hover {
  background: var(--primary-color);
  color: #fff;
}

.subnav-item.active {
  background: var(--primary-color);
  color: #fff;
}

/* ========================================
   底部
   ======================================== */
.footer {
  background: linear-gradient(135deg, #0050b3 0%, #1d39c4 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 50px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-light);
}

.footer-col p {
  font-size: 13px;
  line-height: 2;
  margin-bottom: 8px;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 13px;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin-bottom: 6px;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .article-item {
    flex-direction: column;
  }

  .article-cover {
    width: 100%;
    height: 180px;
  }

  .banner {
    height: 180px;
  }

  .banner-content h2 {
    font-size: 20px;
  }

  /* 首页学校简介：手机端校徽在上、简介文字在下 */
  #homeAboutContent {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  /* 校徽下方的简介文字占满宽度 */
  #homeAboutContent > div:last-child {
    width: 100%;
  }
}
