/* 全局样式 */
:root {
    --theme-color: #000000;
    --theme-dark: #333333;
    --theme-light: #f5f5f5;
    --highlight: #FF4D4D;
    --bg-light: #ffffff;
    --text-main: #000000;
    --text-secondary: #666666;
    --text-color: #000000;
    --light-bg: #ffffff;
    --dark-bg: #000000;
    --box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --chat-blue: #000000;
    --chat-blue-light: #e6edfb;
}

/* 基础样式 */
body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    font-size: clamp(13.3px, 0.95vw + 0.475rem, 17.1px); /* 调整为响应式字体大小 */
    margin: 0;
    padding: 0;
}

/* 导航栏样式 */
.navbar, .bg-primary {
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
}

.navbar::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--highlight);
    z-index: 1001;
}

.navbar-brand {
    display: flex; /* 使用 Flexbox */
    align-items: center; /* 垂直居中对齐子元素 */
    gap: 10px; /* 设置图片和文字之间的间距 */
    font-size: clamp(1.045rem, 1.425vw + 0.475rem, 1.33rem); /* 调整为响应式字体大小 */
    font-weight: bold;
    color: #000;
    transition: var(--transition);
    text-shadow: none;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.nav-link {
    color: #000;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
    text-shadow: none;
    font-size: clamp(13.3px, 0.95vw + 0.38rem, 15.2px); /* 调整为响应式字体大小 */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--highlight);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    background: var(--highlight);
}

.nav-link.active {
    color: #000 !important;
    font-weight: bold;
}

/* 页面标题和横幅 */
.page-header, .hero-section {
    margin-top: 0;
    padding-top: 0;
}

.page-header .container, .hero-section .container {
    padding-top: 76px;
}

.page-header {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('../images/fr_bg.jpg') center center/cover no-repeat;
    color: #fff;
    padding: 4rem 0;
    margin-bottom: 3rem;
    text-align: center;
    z-index: 1;
}

.page-header h1, .page-header p, .page-header .lead {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.page-header h1 {
    font-size: 2.375rem; /* 调整为响应式字体大小 */
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 80vh;
    min-height: 600px;
    color: white;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 2.85rem; /* 调整为响应式字体大小 */
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

.hero-section .lead {
    font-size: 1.425rem; /* 调整为响应式字体大小 */
    margin-bottom: 2rem;
    color: white;
}

/* 服务特点 */
.feature-box {
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
    background: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1.5px solid var(--theme-light);
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--highlight);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-box:hover {
    transform: translateY(-10px);
    border-color: var(--highlight);
}

.feature-box:hover::before {
    transform: scaleX(1);
}

.feature-box i {
    font-size: 2.85rem; /* 调整为响应式字体大小 */
    color: var(--theme-color) !important;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-box:hover i {
    transform: scale(1.1);
    color: #FF4D4D !important;
}

/* 发展历程时间线 */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--highlight);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 2rem 0;
    position: relative;
    width: 50%;
    margin-left: auto;
}

.timeline-item:nth-child(even) {
    margin-left: 0;
    margin-right: auto;
}

.timeline-dot {
    width: 19px; /* 调整大小 */
    height: 19px; /* 调整大小 */
    background: var(--highlight);
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    z-index: 1;
    border: 2px solid #fff;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: auto;
    right: -10px;
}

.timeline-content {
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    position: relative;
    border: 1.5px solid var(--theme-light);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--highlight);
}

.timeline-content h3 {
    font-size: 1.52rem; /* 调整字体大小 */
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-main);
}

.timeline-content p {
    font-size: 0.855rem; /* 调整字体大小 */
    color: var(--text-secondary);
}

/* 服务卡片 */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    background: #fff;
    border: 1.5px solid var(--theme-light);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--highlight);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.14rem; /* 调整字体大小 */
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* 联系信息 */
.contact-info {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.info-box {
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
    border: 1.5px solid var(--theme-light);
}

.info-box:hover {
    transform: translateY(-5px);
    border-color: var(--highlight);
}

.info-box i {
    color: var(--theme-color) !important;
    margin-bottom: 1.5rem;
}

.info-box h3 {
    font-size: 1.52rem; /* 调整字体大小 */
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-main);
}

/* 联系表单 */
.contact-form {
    padding: 4rem 0;
}

.contact-form .card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    background: #fff;
    border: 1.5px solid var(--theme-light);
    box-shadow: 0 4px 24px rgba(14,180,147,0.08);
}

.contact-form .card-body {
    padding: 2.5rem;
}

.contact-form h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.8rem;
    color: var(--theme-color) !important;
    text-align: center;
}

.form-control {
    border-radius: 10px;
    padding: 1rem;
    border: 1.5px solid #eee;
    transition: var(--transition);
    background: #fff;
    color: var(--text-color);
}

.form-control:focus {
    border-color: var(--theme-color) !important;
    background: #fff;
    color: var(--text-color);
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.1);
}

.btn-primary,
.btn-gradient-blue,
.btn-primary:focus,
.btn-primary:active {
    background: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary:hover,
.btn-gradient-blue:hover {
    background: var(--theme-dark) !important;
    border-color: var(--theme-dark) !important;
}

/* 地图 */
.map {
    padding: 4rem 0;
}

.map .ratio {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* 页脚 */
footer {
    background: var(--theme-color) !important;
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--theme-color) !important;
}

/* 在线聊天窗口样式 */

footer h5 {
    font-size: 1.14rem; /* 调整字体大小 */
    font-weight: bold;
    margin-bottom: 1.5rem;
    position: relative;
    color: #fff;
    text-align: center !important; /* 确保标题居中 */
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: -5px; /* 调整下划线位置，使其在标题下方 */
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: var(--highlight);
}

footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--highlight) !important;
}

/* 页脚社交图标居中对齐 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 页脚快速链接和联系方式内容居中 */
footer .col-lg-4 ul {
    padding-left: 0; /* 移除默认左边距 */
}

footer .col-lg-4 ul li {
    list-style: none; /* 移除列表标记 */
}

footer .col-lg-4 p {
    text-align: center !important; /* 确保关于我们文本居中 */
}

.footer-text-center {
    text-align: center !important;
}

.footer-list-center {
    text-align: center !important;
}

/* 在线聊天窗口样式 */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px; /* 电脑端宽度 */
    max-height: 700px; /* 电脑端最大高度 */
    background-color: #fff;
    border-radius: 10px; /* 添加圆角 */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-size: clamp(14px, 0.8vw + 0.6rem, 16px); /* 调整为响应式字体大小 */
    z-index: 3000;
}

.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #FF4D4D;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
}

.chat-icon p {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
}

.chat-header {
    background-color: black;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(14px, 1vw + 0.6rem, 18px); /* 调整为响应式字体大小 */
    font-weight: bold;
}

/* 聊天窗口：快捷联系方式栏 */
.chat-quick-contacts {
    display: block;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
}
.chat-quick-contacts:hover { text-decoration: none; }
.quick-contacts-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #fafafa;
}
.chat-widget .quick-contacts-link .qc-item,
.chat-quick-contacts .quick-contacts-link .qc-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #eee;
    font-size: 12px;
    color: #2563eb; /* 与站点蓝色一致 */
    font-weight: 700;
}
.quick-contacts-link .qc-item i { display: none; }
@media (max-width: 575.98px) {
    .quick-contacts-link { flex-wrap: wrap; }
}

.chat-header .close-button {
    background: none;
    border: none;
    color: white;
    font-size: clamp(18px, 1.2vw + 0.8rem, 22px); /* 调整为响应式字体大小 */
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    min-height: 300px;
    max-height: 350px; /* 调整初始消息区域最大高度 */
}

.message {
    margin-bottom: 10px;
    display: flex;
}

.message.sent {
    justify-content: flex-end;
}

.message.received {
    justify-content: flex-start;
}

.message-content-container {
    max-width: 85%;
}

.message-meta {
    font-size: clamp(10px, 0.6vw + 0.4rem, 12px); /* 调整为响应式字体大小 */
    color: #666;
    margin-bottom: 4px;
}

.message-bubble {
    padding: 6px 12px;
    border-radius: 18px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 15px;
}

.message.sent .message-bubble {
    background-color: #007bff;
    color: white;
}

.message.received .message-bubble {
    background-color: #f0f0f0;
    color: #333;
}

.chat-input-area {
    position: relative;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

.quick-reply-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.emoji-button,
.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
}

.emoji-button img,
.icon-button img {
    height: 24px;
    width: 24px;
    /* vertical-align: middle; */
    display: block;
}

.input-controls {
    display: flex;
    gap: 10px;
}

.message-input {
    flex-grow: 1;
}

.message-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: clamp(14px, 0.8vw + 0.6rem, 16px); /* 调整为响应式字体大小 */
}

.send-button {
    padding: 0px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: clamp(14px, 1vw + 0.4rem, 16px); /* 调整为响应式字体大小 */
}

.send-button:hover {
    background-color: #0056b3;
}

.emoji-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.chat-emoji-inline {
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
}

.emoji-item {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item img {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.emoji-button {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}

/* 响应式样式 */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: clamp(1.045rem, 2.375vw + 0.95rem, 1.425rem); /* 调整为响应式字体大小 */
    }
    .navbar-brand img { max-height: clamp(23.75px, 2.375vw + 9.5px, 38px); } /* 调整为响应式最大高度 */
    .navbar-nav {
        background: #fff;
        padding: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }
    
    .navbar-nav .nav-item .nav-link {
        padding: 0.5rem 1rem;
        color: #000;
        font-size: clamp(14px, 1.5vw + 0.6rem, 18px); /* 调整为响应式字体大小 */
    }
    
    /* 统一字体大小调整 */
    h1, .display-1, .hero-section h1, .page-header h1 { font-size: clamp(22.8px, 2.375vw + 1.425rem, 34.2px); } /* 调整为响应式字体大小 */
    h2, .display-2, .page-header h2 { font-size: clamp(19px, 1.9vw + 1.14rem, 28.5px); } /* 调整为响应式字体大小 */
    h3, .display-3 { font-size: clamp(17.1px, 1.71vw + 0.95rem, 22.8px); } /* 调整为响应式字体大小 */
    .lead, .hero-section .lead, .page-header .lead { font-size: clamp(15.2px, 1.425vw + 0.76rem, 19px); } /* 调整为响应式字体大小 */
    body, p, .card-text, .card-title, .btn, .form-control { font-size: clamp(13.3px, 0.95vw + 0.475rem, 17.1px); } /* 调整为响应式字体大小 */
    .card-body, .feature-box, .info-box, .timeline-content { padding: 1rem; }
    .btn, .btn-lg, .btn-primary { padding: 0.5rem 1rem; }
    .card-img-top { height: 200px; }
    .chat-widget {
        width: 350px;
        max-height: 600px;
        border-radius: 10px;
    }
    .chat-header {
        padding: 0.75rem;
        font-size: clamp(14px, 1vw + 0.6rem, 18px);
    }
    .chat-messages {
        padding: 0.5rem;
        max-height: 300px;
    }
    .chat-input-area { padding: 0.5rem; }
    .quick-reply-buttons { gap: 0.25rem; }
    .quick-reply-button { padding: 0.25rem 0.5rem; font-size: clamp(11.4px, 0.57vw + 0.38rem, 13.3px); }
    .input-controls { gap: 0.25rem; }
    .icon-button { padding: 0.25rem; }
    .message-input input[type="text"] { padding: 0.5rem; }
    .send-button {
        padding: 0.5rem 1rem;
        font-size: clamp(14px, 0.8vw + 0.6rem, 16px); /* 调整为响应式字体大小 */
    }
}

@media (max-width: 767.98px) {
    .timeline::before { left: 31px; }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        margin-left: 0;
    }
    .timeline-item:nth-child(even) {
        margin-left: 0;
        padding-left: 70px;
    }
    .timeline-dot { left: 22px; }
    .timeline-item:nth-child(even) .timeline-dot { left: 22px; }
    
    .hero-section { height: 60vh; min-height: 400px; }
    .page-header { padding: 3rem 0; }
    .card-img-top { height: 200px; }
    
    .chat-widget {
        width: 70%;
        max-height: 80vh;
        border-radius: 10px;
    }
    .chat-header {
        padding: 0.75rem;
        font-size: clamp(14px, 1vw + 0.6rem, 18px); /* 调整为响应式字体大小 */
    }
    .chat-messages {
        padding: 0.5rem;
        max-height: 40vh;
    }
    .chat-input-area { padding: 0.5rem; }
    .quick-reply-buttons { gap: 0.25rem; }
    .quick-reply-button { padding: 0.25rem 0.5rem; font-size: clamp(11.4px, 0.57vw + 0.38rem, 13.3px); }
    .input-controls { gap: 0.25rem; }
    .icon-button { padding: 0.25rem; }
    .message-input input[type="text"] { padding: 0.5rem; }
    .send-button {
        padding: 0.5rem 1rem;
        font-size: clamp(14px, 0.8vw + 0.6rem, 16px); /* 调整为响应式字体大小 */
    }
}

@media (max-width: 575.98px) {
    .navbar-brand { font-size: clamp(17.1px, 1.9vw + 0.76rem, 20.9px); } /* 保留移动端字体大小设置 */
    .navbar-brand img { max-height: clamp(23.75px, 2.375vw + 9.5px, 38px); } /* 调整为响应式最大高度 */
    .navbar-nav .nav-link { padding: 0.5rem; }
    
    .hero-section { height: 50vh; min-height: 300px; }
    .page-header { padding: 2rem 0; }
    .card-img-top { height: 180px; }
}

@media (min-width: 992px) {
    .navbar-nav {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    .navbar-nav .nav-item {
        margin: 0 0.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        position: relative;
    }
    
    .navbar-brand {
        font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.4rem); /* 确保 এখানে clamp() 应用 */
        margin-right: 2rem;
    }
    
    .navbar-brand img {
        max-height: clamp(25px, 2.5vw + 10px, 40px); /* 调整为响应式最大高度 */
        vertical-align: middle; /* 添加垂直对齐样式 */
    }
    .chat-widget .message-bubble {
        font-size: 15px;
    }
}

/* 修复汉堡按钮图标丢失问题，强制恢复 Bootstrap 默认 SVG 图标 */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.55)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    width: 1.5em;
    height: 1.5em;
    display: inline-block;
    vertical-align: middle;
} 