@import url('css2.css');

/* 全局样式 */
:root {
    --primary-color: #007bff; /* 更鲜艳的蓝色 */
    --secondary-color: #6c757d;
    --accent-color: #28a745; /* 更鲜艳的绿色 */
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #495057;
    --heading-font: 'Montserrat', sans-serif; /* 引入更现代的字体 */
    --body-font: 'Open Sans', sans-serif;
    --border-radius: 0.5rem; /* 统一圆角 */
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--body-font);
    line-height: 1.7;
    color: var(--text-color);
    /* padding-top will be dynamically calculated or set based on fixed elements */
    background-color: var(--light-color);
    font-size: 16px; /* 设置基础字体大小 */
}

/* 确保不同元素的字体大小相对协调 */
h1, .h1 { font-size: calc(1.375rem + 1.5vw); }
@media (min-width: 1200px) {
  h1, .h1 { font-size: 2.5rem; }
}
h2, .h2 { font-size: calc(1.325rem + 0.9vw); }
@media (min-width: 1200px) {
  h2, .h2 { font-size: 2rem; }
}
h3, .h3 { font-size: calc(1.3rem + 0.6vw); }
@media (min-width: 1200px) {
  h3, .h3 { font-size: 1.75rem; }
}
h4, .h4 { font-size: calc(1.275rem + 0.3vw); }
@media (min-width: 1200px) {
  h4, .h4 { font-size: 1.5rem; }
}
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

p, .lead {
    font-size: 1rem; /* 调整段落和lead文本大小 */
}

.lead {
    font-size: 1.15rem; /* 特殊调整lead */
}

/* 顶部联系栏 */
.top-bar {
    background-color: var(--primary-color) !important; /* 使用主色调 */
    padding: 0.8rem 0; /* 调整内边距 */
    z-index: 1031;
    position: fixed; /* 固定在顶部 */
    width: 100%;
    top: 0;
    height: 60px; /* 设置固定高度 */
    display: flex; /* 用于垂直居中文本 */
    align-items: center; /* 垂直居中文本 */
    justify-content: center; /* 水平居中文本 */
}

.top-bar-text {
    color: white;
    font-size: 2.2rem; /* 调整字体大小以适应固定高度 */
    font-weight: bold; /* 加粗 */
    text-align: center; /* 居中 */
    margin-bottom: 0; /* 移除底部外边距 */
    line-height: 1; /* 确保单行文本在 flex 容器中正确对齐 */
}

.top-bar i {
    width: 20px;
    text-align: center;
    color: var(--accent-color);
}

/* 导航栏样式 */
.navbar {
    box-shadow: var(--box-shadow);
    background-color: rgba(255, 255, 255, 0.98) !important; /* 更高的不透明度 */
    padding: 0.75rem 0; /* 调整内边距 */
    transition: padding 0.3s ease;
    position: fixed; /* 固定在顶部 */
    width: 100%;
    top: 60px; /* 定位在 top-bar 下方 */
    z-index: 1030;
    height: 100px; /* 设置导航栏固定高度 */
    display: flex; /* 用于垂直居中内容 */
    align-items: center; /* 垂直居中内容 */
}

main {
    padding-top: 110px; /* 为固定的 top-bar (60px) 和 navbar (50px) 留出空间 */
}

.navbar .container {
    align-items: center; /* 确保logo和toggler垂直居中 */
}

.navbar-brand {
    font-family: var(--heading-font);
    font-weight: 700; /* 加粗 */
    color: var(--primary-color) !important;
    font-size: 2.1rem;
    padding: 0;
    display: flex; /* 使用flex对齐图标和文字 */
    align-items: center; /* 垂直居中对齐 */
}

.navbar-brand i {
    color: var(--accent-color);
}

.navbar-nav .nav-item {
    list-style-type: none; /* 移除圆点 */
}

.nav-link {
    font-family: var(--body-font);
    font-weight: 600;
    padding: 0.75rem 1.25rem !important; /* 调整内边距 */
    transition: color 0.3s ease, background-color 0.3s ease;
    color: var(--dark-color) !important;
    border-radius: var(--border-radius);
    margin: 0 0.3rem;
    font-size: 2.1rem; /* 增大导航链接字体大小 */
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(0, 123, 255, 0.1);
}

/* 主横幅样式 */
.hero-section {
    background: linear-gradient(rgba(25, 70, 120, 0.85), rgba(10, 30, 50, 0.9));
    background-size: cover;
    color: white;
    padding: 120px 0 120px; /* 调整内边距 */
    position: relative;
    text-align: left; /* 文本左对齐 */
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section::before { /* 移除旧的底部渐变，或调整为更柔和的效果 */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--light-color) 10%, transparent);
    z-index: 1;
}

.hero-section h1 {
    font-family: var(--heading-font);
    font-size: 3.2rem; /* 调整标题字号 */
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
    max-width: 550px; /* 调整段落宽度 */
    /* margin-left: auto; margin-right: auto; 已在父级text-align:left */
}

.hero-section .btn {
    padding: 12px 30px; /* 调整按钮内边距 */
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-right: 1rem; /* 调整按钮间距 */
    margin-bottom: 0.5rem;
}

.hero-section .btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.hero-section .btn-primary:hover {
    background-color: #1e7e34; /* 加深hover颜色 */
    border-color: #1e7e34;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
}

.hero-section .btn-outline-light {
    border-width: 2px;
}

.hero-section .btn-outline-light:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: var(--light-color);
    color: var(--dark-color);
}

/* 板块通用样式 */
section {
    padding: 100px 0; /* 增加上下内边距 */
    position: relative;
}

section:nth-of-type(odd) {
    background-color: white;
}

section:nth-of-type(even) {
    background-color: var(--light-color);
}

#home + section { /* 第一个section紧跟hero */
    padding-top: 80px;
}

section h2 {
    font-family: var(--heading-font);
    margin-bottom: 4rem; /* 增加标题下边距 */
    font-weight: 700;
    color: var(--dark-color);
    text-align: center;
    font-size: 2.5rem;
}

/* 服务卡片样式 */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* 更平滑的过渡 */
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    background-color: white;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 2.5rem; /* 增加内边距 */
}

.card-title {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.card .fas, .card .fab {
    font-size: 2.5rem; /* 调整图标大小 */
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: block; /* 使图标居中 */
    margin-left: auto;
    margin-right: auto;
}

/* 维修流程样式 */
#process {
    background-color: #e9ecef; /* 略微不同的背景色 */
}

.process-step {
    position: relative;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.process-step:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.process-step i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    font-size: 2.5rem; /* 调整图标大小 */
}

.process-step:hover i {
    transform: scale(1.1);
}

.step-number {
    position: absolute;
    top: -18px; /* 调整位置 */
    left: 50%;
    transform: translateX(-50%);
    width: 36px; /* 调整大小 */
    height: 36px; /* 调整大小 */
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.process-step h4 {
    font-family: var(--heading-font);
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* 优势部分样式 */
#advantages .row {
    align-items: center; /* 垂直居中对齐 */
}

.advantage-content {
    padding: 2rem;
}

.advantage-content h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.advantage-content ul li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.advantage-content ul li i {
    color: var(--accent-color);
    margin-right: 0.75rem;
    font-size: 1.3rem;
}

.advantage-image img {
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    max-width: 100%; /* 确保图片响应式 */
    height: auto;
}

.advantage-image img:hover {
    transform: scale(1.03) rotate(-1deg); /* 轻微旋转效果 */
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
}

/* 维修案例样式 */
#cases {
    background-color: var(--light-color);
}

.case-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden; /* 确保图片圆角生效 */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.15);
}

.case-card img {
    width: 100%;
    height: 220px; /* 调整图片高度 */
    object-fit: cover; /* 保持图片比例并填充 */
    transition: transform 0.3s ease;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

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

.case-card .case-content {
    padding: 1.5rem;
    flex-grow: 1; /* 使内容区域填满剩余空间 */
}

.case-card h5 {
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color) !important;
    color: #adb5bd; /* 柔和的文字颜色 */
    padding: 60px 0 40px; /* 调整内边距 */
}

footer h5 {
    font-family: var(--heading-font);
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

footer p {
    margin-bottom: 0.85rem; /* 调整外边距 */
    font-size: 1rem; /* 调整字体大小 */
}

footer p i {
    color: var(--accent-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

footer .mt-4 p {
    font-size: 0.9rem;
    color: #6c757d; /* 更深的版权文字颜色 */
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    body {
        padding-top: 60px; /* 调整小屏幕导航栏高度 */
    }
    .navbar-brand {
        font-size: 1.4rem; /* 调整小屏幕品牌文字大小 */
    }
    .nav-link {
        font-size: 0.95rem; /* 调整小屏幕导航链接字体大小 */
        padding: 0.6rem 1rem !important;
    }
    .hero-section {
        padding: 100px 0 60px;
        /* margin-top: -70px; */
    }
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .hero-section .lead {
        font-size: 1.15rem;
    }
    section {
        padding: 60px 0;
    }
    section h2 {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    .navbar-nav {
        background-color: white;
        border-radius: var(--border-radius);
        padding: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: var(--box-shadow);
    }
    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }
}

@media (max-width: 767.98px) {
    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }
    .top-bar .col-md-6:last-child {
        margin-bottom: 0;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    .hero-section .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    .process-step, .case-card {
        margin-bottom: 2rem;
    }
    .advantage-content, .advantage-image {
        text-align: center;
    }
    .advantage-image img {
        margin-top: 2rem;
    }
    footer .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    footer .col-md-4:last-child {
        margin-bottom: 0;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 动画效果 (可选，可根据喜好添加更多) */
.card, .process-step, .case-card, .advantage-image img {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 侧边浮动联系栏 */
.floating-contact-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    padding: 1rem 0.5rem;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    box-shadow: -5px 0px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.floating-contact-bar .contact-item {
    position: relative;
    display: flex;
    align-items: center;
}

.floating-contact-bar a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.2s ease-in-out;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
}

.floating-contact-bar a:hover {
    transform: scale(1.15);
    background-color: rgba(255,255,255,0.2);
}

.floating-contact-bar .contact-popup {
    display: none;
    position: absolute;
    left: auto;
    right: 110%;
    top: 50%;
    transform: translateY(-50%);
    min-width: 140px;
    background: #fff;
    color: var(--dark-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    padding: 1rem 1.2rem;
    white-space: nowrap;
    z-index: 1001;
    text-align: center;
    font-size: 1rem;
    animation: fadeInRight 0.25s;
}

.floating-contact-bar .contact-item:hover .contact-popup {
    display: block;
}

.floating-contact-bar .contact-popup img {
    display: block;
    margin: 0 auto 0.5rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.floating-contact-bar .popup-label {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px) translateY(-50%); }
    to { opacity: 1; transform: translateX(0) translateY(-50%); }
}

/* 为不同板块的元素设置动画延迟，使其交错出现 */
#services .col-md-4:nth-child(1) .card { animation-delay: 0.1s; }
#services .col-md-4:nth-child(2) .card { animation-delay: 0.2s; }
#services .col-md-4:nth-child(3) .card { animation-delay: 0.3s; }

#process .col-md-3:nth-child(1) .process-step { animation-delay: 0.1s; }
#process .col-md-3:nth-child(2) .process-step { animation-delay: 0.2s; }
#process .col-md-3:nth-child(3) .process-step { animation-delay: 0.3s; }
#process .col-md-3:nth-child(4) .process-step { animation-delay: 0.4s; }

#cases .col-md-4:nth-child(1) .case-card { animation-delay: 0.1s; }
#cases .col-md-4:nth-child(2) .case-card { animation-delay: 0.2s; }
#cases .col-md-4:nth-child(3) .case-card { animation-delay: 0.3s; }


/* 联系表单样式 */
#contact {
    background-color: white;
}

#contact .card {
    border-radius: 15px;
    background-color: var(--light-color);
}

.form-control {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

#contact .btn-primary {
    padding: 12px;
    border-radius: 8px;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#contact .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    position: relative;
    padding: 60px 0 30px;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, var(--light-color), transparent);
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

footer p {
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.8);
}

footer i {
    width: 20px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .hero-section {
        padding: 100px 0 60px;
        margin-top: -66px;
    }

    section {
        padding: 60px 0;
    }

    .hero-section {
        text-align: center;
    }
    
    .hero-section .col-lg-6 {
        margin-bottom: 2rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .process-step {
        margin-bottom: 2rem;
    }

    .advantage-content {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .case-card {
        margin-bottom: 2rem;
    }
}

/* 动画效果 */
.btn, .card, .process-step, .case-card {
    transition: all 0.3s ease;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* 面包屑导航样式 (当前位置) */
.breadcrumb-bar {
    background-color: #f8f9fa;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    border: 1px solid #dee2e6;
}

.breadcrumb-bar a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-bar a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

.breadcrumb-bar .mx-2.text-muted {
    user-select: none; /* 防止分隔符被选中 */
}

/* 上下篇导航 */
.prenext-nav {
    font-size: 1rem;
    color: #6c757d; /* "没有了" 的文字颜色 */
    margin: 20px;
}
.prenext-nav a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    display: inline-block;
    color: #007bff;
}
.prenext-nav a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}
.prenext-next a:hover {
    transform: translateX(-4px);
}
.prenext-prev, .prenext-next {
    flex-basis: 48%;
}
.prenext-nav a:not([href]) { /* 兼容PbootCMS可能输出的空链接 */
    color: #6c757d !important;
    pointer-events: none;
}