/* 自定义样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

/* 轮播图高度 */
.carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* 图片懒加载 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* 卡片阴影 */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 页脚链接 */
footer a:hover {
    color: #0d6efd !important;
}

/* 表单验证 */
.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item img {
        height: 300px;
    }
    
    .card {
        margin-bottom: 20px;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    100% {
        left: 100%;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 自定义按钮样式 */
.btn-primary {
    transition: all 0.3s;
}

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

/* 导航栏激活状态 */
.nav-link.active {
    color: #0d6efd !important;
    font-weight: bold;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: #212529;
}

/* 链接样式 */
a {
    color: #0d6efd;
    transition: color 0.3s;
}

a:hover {
    color: #0a58ca;
}