/**
 * 网站主样式表
 * 主题色：热情红 #E53935
 * 框架：Bootstrap 5 + AOS Animation
 */

/* ==================== 基础变量定义 ==================== */
:root {
    --primary-color: #E53935;
    --primary-dark: #C62828;
    --primary-light: #FFCDD2;
    --secondary-color: #607D8B;
    --text-dark: #212121;
    --text-muted: #757575;
    --bg-light: #F5F5F5;
    --white: #FFFFFF;
    --border-radius: 16px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --box-shadow-hover: 0 8px 30px rgba(229, 57, 53, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 工具类 ==================== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.hover-shadow {
    transition: var(--transition);
}

.hover-shadow:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-5px);
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-scale-img {
    transition: var(--transition);
}

.hover-scale-img:hover {
    transform: scale(1.1);
}

.hover-text-danger:hover {
    color: var(--primary-color) !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.object-fit-cover {
    object-fit: cover;
}

.ls-2 {
    letter-spacing: 2px;
}

.transition-all {
    transition: var(--transition);
}

/* ==================== 顶部栏 ==================== */
.top-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ==================== 导航栏 ==================== */
#mainNav {
    transition: var(--transition);
    padding: 1rem 0;
}

#mainNav.navbar-scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    transition: var(--transition);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* ==================== 移动端底部栏 ==================== */
.mobile-call-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

body {
    padding-bottom: 60px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* ==================== 轮播图 ==================== */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 6px !important;
    background-color: rgba(255,255,255,0.5) !important;
    border: 2px solid transparent !important;
    transition: var(--transition);
}

.carousel-indicators button.active {
    background-color: var(--primary-color) !important;
    transform: scale(1.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-size: 1.5rem;
}

/* ==================== 按钮样式 ==================== */
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}

.btn-danger:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.btn-outline-danger {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}

.btn-outline-danger:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ==================== 卡片样式 ==================== */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
}

/* ==================== 表单样式 ==================== */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(229, 57, 53, 0.25);
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

/* ==================== 页面标题 ==================== */
.page-header {
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.9) 0%, rgba(198, 40, 40, 0.9) 100%);
    z-index: -1;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
    line-height: 1;
}

/* ==================== 文章列表 ==================== */
.news-list-item {
    transition: var(--transition);
}

.news-list-item:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateX(5px);
}

/* ==================== 文章内容 ==================== */
.content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.content h2,
.content h3,
.content h4 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.content p {
    margin-bottom: 1.5rem;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--box-shadow);
}

.content ul,
.content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(229, 57, 53, 0.3);
    text-underline-offset: 3px;
}

.content a:hover {
    text-decoration-color: var(--primary-color);
}

/* ==================== 时间线 ==================== */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--primary-light);
    transform: translateX(-50%);
}

@media (max-width: 767.98px) {
    .timeline::before {
        left: 20px;
    }
}

/* ==================== 标签样式 ==================== */
.badge {
    font-weight: 500;
    padding: 0.5em 1em;
}

/* ==================== 城市标签 ==================== */
.city-tag {
    background: white;
    transition: var(--transition);
}

.city-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* ==================== 页脚 ==================== */
.footer {
    position: relative;
}

.footer-widget {
    height: 100%;
}

.footer-links a {
    display: inline-block;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.footer .badge {
    transition: var(--transition);
}

.footer .badge:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* ==================== 返回顶部 ==================== */
#backToTop {
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.4) !important;
}

/* ==================== AOS动画自定义 ==================== */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* ==================== 统计数字动画 ==================== */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 991.98px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        min-height: 500px;
    }
    
    .process-step::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .display-3 {
        font-size: 2rem;
    }
    
    .timeline .col-md-6 {
        padding-left: 50px;
    }
    
    .city-tag {
        font-size: 0.875rem;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .mobile-call-bar,
    #backToTop,
    .top-bar,
    footer {
        display: none !important;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* ==================== 加载动画 ==================== */
.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.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ==================== 自定义滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== 选中文字样式 ==================== */
::selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* ==================== 焦点样式 ==================== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== 无障碍辅助 ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==================== 特殊组件样式 ==================== */
.testimonial-card {
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.guarantee-item {
    transition: var(--transition);
}

.guarantee-item:hover {
    border-color: var(--primary-color);
    background: rgba(229, 57, 53, 0.02);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(229, 57, 53, 0.05);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(229, 57, 53, 0.25);
}

/* ==================== 服务流程连接线 ==================== */
@media (min-width: 992px) {
    .process-step::after {
        content: '';
        position: absolute;
        top: 40px;
        right: -50%;
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, var(--primary-color), transparent);
        opacity: 0.3;
    }
    
    .process-step:last-child::after {
        display: none;
    }
}

/* ==================== 图片占位符 ==================== */
.img-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* ==================== 动画延迟类 ==================== */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ==================== 边框样式 ==================== */
.border-danger {
    border-color: var(--primary-color) !important;
}

/* ==================== 背景透明度 ==================== */
.bg-danger.bg-opacity-10 {
    background-color: rgba(229, 57, 53, 0.1) !important;
}

.bg-danger.bg-opacity-5 {
    background-color: rgba(229, 57, 53, 0.05) !important;
}

/* ==================== 文字颜色 ==================== */
.text-danger {
    color: var(--primary-color) !important;
}

/* ==================== 按钮变体 ==================== */
.btn-light.text-danger {
    color: var(--primary-color) !important;
}

.btn-light.text-danger:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* ==================== 表单验证样式 ==================== */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
}

/* ==================== 模态框样式 ==================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 2px solid var(--primary-light);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* ==================== 提示框样式 ==================== */
.alert {
    border: none;
    border-radius: 12px;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* ==================== 分页样式 ==================== */
.pagination {
    gap: 5px;
}

.page-link {
    border: none;
    border-radius: 8px;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
}

/* ==================== 工具提示 ==================== */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
    border-top-color: var(--primary-color);
}

/* ==================== 下拉菜单 ==================== */
.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* ==================== 标签页 ==================== */
.nav-tabs {
    border-bottom: 2px solid #e0e0e0;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

/* ==================== 进度条 ==================== */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e0e0e0;
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* ==================== 列表组 ==================== */
.list-group-item {
    border-color: #f0f0f0;
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: rgba(229, 57, 53, 0.02);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== 徽章样式增强 ==================== */
.badge.bg-light {
    background-color: #f8f9fa !important;
    color: var(--text-dark);
    font-weight: 500;
}

/* ==================== 阴影效果 ==================== */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

.shadow {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
}

/* ==================== 圆角统一 ==================== */
.rounded-4 {
    border-radius: var(--border-radius) !important;
}

/* ==================== 间距调整 ==================== */
.section-padding {
    padding: 5rem 0;
}

/* ==================== 响应式字体 ==================== */
@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }
}

/* ==================== 性能优化 ==================== */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==================== 打印优化 ==================== */
@media print {
    .no-print {
        display: none !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ==================== 暗色模式支持（预留） ==================== */
@media (prefers-color-scheme: dark) {
    /* 预留暗色模式样式 */
}

/* ==================== 减少动画（无障碍） ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}