/* 自定义Bootstrap样式 */

:root {
    --primary-color: #3f9bdc;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
}

/* 全局样式 */
body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 顶部信息栏 */
.top-bar {
    font-size: 14px;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-light .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.navbar-light .navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.2);
    border-radius: 4px;
}

/* 轮播图 */
.carousel-item {
    position: relative;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 0;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 区块标题 */
.section-header h2 {
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    margin-top: 1rem;
}

/* 卡片悬停效果 */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

/* 服务卡片 */
.service-icon {
    transition: transform 0.3s ease;
}

.card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 案例卡片 */
.case-card {
    overflow: hidden;
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(63, 155, 220, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-card:hover .case-overlay {
    opacity: 1;
}

.case-buttons {
    text-align: center;
}

/* 顾问卡片 */
.advisor-card {
    transition: all 0.3s ease;
}

.advisor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

.advisor-card img {
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.advisor-card:hover img {
    transform: scale(1.05);
}

/* 学堂卡片 */
.school-card {
    transition: all 0.3s ease;
}

.school-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

/* 图片悬停缩放 */
.hover-zoom {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

/* 标签页 */
.nav-pills .nav-link {
    color: #666;
    border-radius: 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background-color: transparent;
    border-bottom-color: var(--primary-color);
}

.nav-pills .nav-link.active {
    background-color: transparent;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.footer h5, .footer h6 {
    font-weight: 600;
}

/* 侧边栏客服 */
.sidebar-contact {
    position: fixed;
    right: -300px;
    top: 30%;
    z-index: 1000;
    transition: right 0.3s ease;
}

.sidebar-contact.active {
    right: 0;
}

.sidebar-toggle {
    position: absolute;
    left: -60px;
    top: 0;
    width: 60px;
    height: 100px;
    border-radius: 8px 0 0 8px;
    border: none;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.sidebar-toggle i {
    font-size: 24px;
}

.sidebar-content {
    width: 300px;
    max-height: 500px;
    overflow-y: auto;
}

/* 返回顶部按钮 */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.btn-back-to-top.show {
    display: flex;
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 轮播控制按钮 */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .carousel-caption {
        padding: 1rem 0;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .sidebar-contact {
        right: -280px;
    }
    
    .sidebar-content {
        width: 280px;
    }
    
    .navbar-nav {
        background-color: rgba(63, 155, 220, 0.95);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 加载动画 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* 自定义滚动条 */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* 按钮样式增强 */
.btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(63, 155, 220, 0.25);
}

/* 链接样式 */
a {
    transition: color 0.3s ease;
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 阴影工具类 */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

/* 打印样式 */
@media print {
    .navbar,
    .sidebar-contact,
    .btn-back-to-top,
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }
}

/* ==================== 分页样式 ==================== */
.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    margin: 0;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(63, 155, 220, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(63, 155, 220, 0.4);
    transform: scale(1.05);
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-weight: 600;
    padding: 0.5rem 1.2rem;
}

/* 分页省略号样式 */
.pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: transparent;
}

/* 响应式分页 */
@media (max-width: 576px) {
    .pagination {
        gap: 0.25rem;
        flex-wrap: wrap;
    }
    
    .pagination .page-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0.4rem 1rem;
    }
}

/* 分页动画 */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pagination .page-item {
    animation: pageEnter 0.3s ease;
}

/* 分页容器样式 */
nav[aria-label="Page navigation"] {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}
