/* 土力学课程网站样式 */

/* 全局样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 导航栏 - 全局统一样式 */
.navbar {
    background-color: #1a5276 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-dark .navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.navbar-dark .nav-link {
    color: #fff !important;
    font-size: 1.1rem;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.navbar-dark .nav-link:hover {
    color: #aed6f1 !important;
}

/* 横幅区域 */
.jumbotron {
    background: linear-gradient(135deg, #1a5276 0%, #3498db 100%);
    color: white;
    padding: 6rem 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.jumbotron h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    position: relative;
}

.jumbotron p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

/* 通用部分样式 */
.section {
    padding: 4rem 0;
    position: relative;
}

.section-title {
    margin-bottom: 3rem;
    color: #1a5276;
    font-weight: bold;
    font-size: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, #3498db, #1a5276);
    border-radius: 2px;
}

/* 卡片样式 */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* 课程特色 */
.course-feature {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.course-feature i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.course-feature:hover i {
    transform: scale(1.1);
}

.course-feature h3 {
    margin-bottom: 1rem;
    color: #1a5276;
    font-weight: bold;
}

/* 授课教师卡片 */
.instructor-card {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.instructor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.instructor-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid #3498db;
    transition: transform 0.3s;
}

.instructor-card:hover .instructor-img {
    transform: scale(1.05);
}

.instructor-card h3 {
    margin-bottom: 0.5rem;
    color: #1a5276;
    font-weight: bold;
}

.instructor-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .instructor-card {
        padding: 1.5rem;
    }
    
    .instructor-img {
        width: 120px;
        height: 120px;
    }
    
    .instructor-card h3 {
        font-size: 1.2rem;
    }
}

.instructor-card .text-muted {
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid #fff;
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: #3498db;
    transform: translateY(-2px);
}

/* 列表样式 */
.list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    transition: background-color 0.3s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item i {
    margin-right: 0.75rem;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.footer a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #3498db;
}

.footer ul {
    padding-left: 0;
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

/* 表单样式 */
.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.75rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* 引用样式 */
blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin-left: 0;
    font-style: italic;
    color: #666;
}

/* 代码块样式 */
pre, code {
    font-family: "Courier New", monospace;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
}

pre {
    padding: 1rem;
    overflow-x: auto;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .jumbotron {
        padding: 4rem 0;
    }
    
    .jumbotron h1 {
        font-size: 2.5rem;
    }
    
    .jumbotron p {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .course-feature {
        padding: 1.5rem;
    }
    
    .instructor-card {
        padding: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-link {
        margin-left: 0;
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .jumbotron p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn-primary, .btn-outline-light {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
}

/* 打印样式 */
@media print {
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .navbar, .jumbotron, .btn, footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
}