/* 全局样式 */
:root {
    --primary-color: #dc3545;
    --secondary-color: #212121;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-bg: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar-brand img {
    filter: brightness(0) invert(1);
}

.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* 服务卡片样式 */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.2) !important;
}

.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* 城市网格样式 */
.city-grid .city-item {
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.city-grid .city-item:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    .city-grid .col-lg-2 {
        padding: 0.25rem;
    }
}

/* AOS动画增强 */
[data-aos] {
    transition-duration: 0.8s;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}
/* 页面标题样式 */
.page-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,.5);
}

.breadcrumb-dark .breadcrumb-item a {
    color: rgba(255,255,255,.8);
}

.breadcrumb-dark .breadcrumb-item a:hover {
    color: white;
}

/* 文章列表样式 */
.news-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.news-item:hover {
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.news-image-wrapper {
    overflow: hidden;
    border-radius: 8px;
}

.news-image-wrapper img {
    transition: transform 0.5s ease;
}

.news-item:hover .news-image-wrapper img {
    transform: scale(1.1);
}

.hover-danger:hover {
    color: var(--primary-color) !important;
}

/* 侧边栏样式 */
.sidebar-widget .widget-title {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-widget .widget-content {
    border: 1px solid #eee;
    border-top: none;
}

.random-item:last-child {
    border-bottom: none !important;
}

.tag-cloud a {
    display: inline-block;
    transition: all 0.3s ease;
}

.tag-cloud a:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* 文章详情样式 */
.article-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.article-content {
    position: relative;
}

.article-content .content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content .content p {
    margin-bottom: 1.5rem;
}

.article-content .content h2,
.article-content .content h3,
.article-content .content h4 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.share-buttons a {
    transition: all 0.3s ease;
}

.share-buttons a:hover {
    color: var(--accent-color) !important;
    transform: scale(1.2);
}

.related-articles .card {
    transition: all 0.3s ease;
}

.related-articles .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.1) !important;
}

/* 关于我们页面 */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
    margin-left: 0;
}

.team-member {
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,.15) !important;
}

.member-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certificate-item {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

.certificate-item:hover {
    transform: scale(1.05);
}

/* 联系我们页面 */
.contact-info .info-item {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

.contact-info .info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.15) !important;
}

.contact-form-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.1) !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, .25);
}

.form-control {
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
}

.form-control:focus + .form-label {
    color: var(--primary-color);
}

.wechat-info p {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.promise-item {
    padding: 2rem;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, .25);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item::before {
        left: 30px;
    }
    
    .timeline-content {
        width: auto;
        margin-left: 80px !important;
        margin-right: 0 !important;
    }
    
    .timeline-date {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .counter-item {
        margin-bottom: 2rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    display: none;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* 加载动画 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}