/* 自定义样式 */

/* 页面进入动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes indicator-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 全局字体设置 - 使用微软雅黑 */
body, .news-title-hover, .intro-name, .intro-subject, .intro-text,
.card-title, .card-text, .news-summary, .teacher-intro,
.tech-card h4, .activity-card h4, p, span, li, td, th {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif !important;
}

nav, nav a, nav button {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif !important;
}

footer, footer a, footer p {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .section-title, .page-title {
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif !important;
}

/* 动画类 */
.animate-header {
    animation: slideDown 0.8s ease-out forwards;
}

.animate-banner {
    animation: slideDown 0.8s ease-out 0.2s forwards;
   
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out 0.9s forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.6s ease-out 1.1s forwards;
    opacity: 0;
}

.animate-slide-up-delay2 {
    animation: slideUp 0.6s ease-out 1.3s forwards;
    opacity: 0;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动触发动画 */
.scroll-animate {
    opacity: 0;
}

.scroll-animate.slide-left {
    transform: translateX(-80px);
}

.scroll-animate.slide-right {
    transform: translateX(80px);
}

.scroll-animate.slide-up {
    transform: translateY(80px);
}

.scroll-animate.fade-in {
    transform: translateY(30px);
}

.scroll-animate.scale-in {
    transform: scale(0.8);
}

.scroll-animate.slide-left-delay {
    transform: translateX(-100px);
}

.scroll-animate.slide-right-delay {
    transform: translateX(100px);
}

.scroll-animate.animated {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-indicator {
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background-color: #03C1BC !important;
    width: 8px;
    animation: indicator-pulse 1.5s ease-in-out infinite;
}

/* 附小风采图片滚动动画 */
.animate-scroll {
    animation: scroll linear infinite;
}

.campus-scroll-container:hover .animate-scroll {
    animation-play-state: paused;
}

/* 新闻标题下划线动画 */
.news-title-hover {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.news-title-hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #EA3A6F;
    transition: width 0.3s ease-in-out;
}

.group:hover .news-title-hover::after {
    width: 100%;
}

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 图片缩放动画 */
.news-image-hover {
    transition: transform 0.3s ease;
}

.news-image-hover:hover {
    transform: scale(1.05);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #03C1BC;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 文字截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 教师卡片样式 */
.teacher-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.teacher-card:hover {
    box-shadow: 0 0 7px 4px rgba(212, 175, 55, 0.3), 0 0 15px 6px rgba(212, 175, 55, 0.15) !important;
}

.teacher-card .teacher-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.teacher-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: all 0.4s ease;
}

.teacher-card:hover .overlay {
    background: rgba(0, 0, 0, 0.7);
}

.teacher-card .name-plate {
    position: absolute;
    bottom: calc(25% - 2rem);
    left: 50%;
    transform: translateX(-50%);
    width: 66.67%;
    height: auto;
    background: transparent;
    text-align: center;
    transition: all 0.4s ease;
    z-index: 10;
}

.teacher-card .name-plate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(5);
    background: url('../images/name_bg.png') center/contain no-repeat;
    background-size: contain;
}

.teacher-card:hover .name-plate {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
}

.teacher-card .name-plate .name {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-weight: bold;
    color: #f5da0b;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    padding: 0.5rem 0;
}

.teacher-card .intro-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 20;
    text-align: center;
}

.teacher-card:hover .intro-box {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.teacher-card .intro-box .intro-name {
    font-size: 1rem;
    font-weight: bold;
    color: #1E293B;
    margin-bottom: 0.25rem;
}

.teacher-card .intro-box .intro-subject {
    font-size: 0.75rem;
    color: #2E9BDF;
    margin-bottom: 0.5rem;
}

.teacher-card .intro-box .intro-text {
    font-size: 0.75rem;
    color: #64748B;
    line-height: 1.4;
}

/* 卡片悬停效果 */
.feature-card:hover,
.activity-card:hover {
    transform: translateY(-4px);
}

/* 回到顶部按钮动画 */
.back-to-top-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 搜索框聚焦效果 */
input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* 按钮点击效果 */
button:active {
    transform: scale(0.98);
}

/* 校训样式 */
.school-motto {
    display: flex;
    align-items: center;
}

.motto-text {
    font-family: 'LiSu', 'STLiti', 'SimLi', '隶书', 'AR PL UKai CN', 'AR PL ZenKai Uni', serif;
    font-size: 1.8rem;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 
        0 0 10px rgba(135, 206, 250, 0.6),
        0 0 20px rgba(135, 206, 250, 0.4),
        1px 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3em;
}

/* 新闻详情正文图片居中 */
.news-detail-content img {
    display: inline-block !important;
}


/* 导航栏滚动效果 */
nav.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 图片懒加载占位 */
img[loading="lazy"] {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* 表格行悬停 */
tbody tr:hover {
    background-color: #f8fafc;
}

/* 教师列表样式 */
.teacher-card {
    display: flex;
    justify-content: center;
}

.teacher-card-inner {
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.teacher-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.teacher-photo-wrapper {
    width: 100%;
    background: linear-gradient(135deg, #1e6eb8 0%, #0d47a1 100%);
    padding-top: 140%;
    position: relative;
    overflow: hidden;
}

.teacher-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.teacher-info {
    padding: 12px;
    background-color: #ffffff;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.teacher-name-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #1a202c;
    margin-bottom: 6px;
    text-align: center;
}

.teacher-intro {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

/* 筛选按钮激活状态 */
.filter-btn.active {
    background-color: #66834B;
    color: white;
}

/* 页脚链接悬停 */
footer a:hover {
    color: #EA3A6F;
}

/* 公告置顶标记 */
.sticky-badge {
    background-color: #10B981;
    color: white;
}

/* 教育格言区块 */
.motto-block {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

/* 教师照片墙 */
.photo-wall img {
    transition: transform 0.3s ease;
}

.photo-wall img:hover {
    transform: scale(1.05);
}

/* 友情链接按钮 */
.friend-link {
    transition: all 0.3s ease;
}

.friend-link:hover {
    transform: translateY(-2px);
}

/* 移动端菜单动画 */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

/* 分页按钮 */
.pagination-btn {
    min-width: 44px;
    min-height: 44px;
}

/* 新闻列表项 */
.news-item {
    transition: box-shadow 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 活动卡片 */
.activity-card img {
    transition: transform 0.5s ease;
}

.activity-card:hover img {
    transform: scale(1.1);
}

/* 科技亮点卡片 */
.feature-card img {
    height: 128px;
    object-fit: cover;
}

/* 日期标签 */
.date-tag {
    background-color: #10B981;
    color: white;
    font-size: 12px;
}

/* 荣誉标签 */
.honor-tag {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

/* 左侧侧边栏菜单 */
.left-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 140px;
    background: url(/images/left_moto.png) calc(100% - 10px) calc(100% - 24px) no-repeat;
}

/* 阅读全文按钮 */
.read-more {
    color: #66834B;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* 表单输入框 */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #EA3A6F;
    box-shadow: 0 0 0 3px rgba(234, 58, 111, 0.1);
}

/* 按钮基础样式 */
.btn-primary {
    background-color: #66834B;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4a6336;
}

/* 图片容器 */
.img-container {
    overflow: hidden;
}

.img-container img {
    transition: transform 0.5s ease;
}

.img-container:hover img {
    transform: scale(1.1);
}

/* 文章内容样式 */
.article-content p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.article-content h3 {
    color: #1E293B;
    font-size: 1.25rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.article-content li {
    margin-bottom: 0.5em;
}

/* 加载动画 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-indicator {
        width: 6px;
        height: 6px;
    }
    
    .article-content p {
        font-size: 0.9rem;
    }
}

/* 移动端触摸优化 */
@media (hover: none) {
    .feature-card:active,
    .activity-card:active,
    .teacher-card:active {
        transform: scale(0.98);
    }
}

/* 焦点样式 */
button:focus,
a:focus {
    outline: 2px solid #EA3A6F;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    nav, footer, .back-to-top, .search-bar {
        display: none;
    }
    .article-content {
        max-width: 100%;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary: #d97706;
        --secondary: #059669;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}