/* ============================================================
   hyzpys.com 新页面共享样式（服务页/关于页/联系页）
   依赖 css/style.css（主模板基础样式）
   2026-08-21 SEO 站点架构重建
   ============================================================ */

/* ---- 语言切换（与首页一致）---- */
.language-switcher {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.language-switcher:hover { background-color: rgba(255, 255, 255, 0.2); }
.language-switcher i { color: white; font-size: 16px; }
.language-switcher span { color: white; font-weight: 500; }
.lang-en { display: none; }
html[lang="en"] .lang-zh { display: none; }
html[lang="en"] .lang-en { display: inline-block; }
/* 只有中文、没有对应英文的元素：切到英文时照常显示中文，绝不留空 */
html[lang="en"] .lang-zh.lang-keep { display: inline; }

/* ---- 返回顶部 ---- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

/* ---- 区块标题/悬浮效果（与首页一致）---- */
.services-icon { font-size: 2.5rem; color: #6c757d; }
.section-title {
    position: relative;
    display: inline-block;
    letter-spacing: 1px;
    font-weight: bold;
    color: #33adff;
}
.section-title::before {
    position: absolute;
    content: "";
    height: 3px;
    width: 100%;
    bottom: 0;
    left: 0;
    background: #33adff;
}
.hover-effect {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.feature-box {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ---- 页面 Hero（新页面顶部横幅）---- */
.page-hero {
    background: linear-gradient(rgba(25,67,118,.82), rgba(25,67,118,.82)), url('../img/carousel-1.jpg') center center no-repeat;
    background-size: cover;
    padding: 60px 0 50px;
    color: #fff;
}
/* 模板的 .nav-bar::before 会在导航条上半部铺一层深蓝（首页靠轮播 margin-top:-42px 盖住下半部，
   让导航"浮"在大图上）。新页面的 hero 同样上提 42px，否则导航两侧会露出一截孤立的深蓝色块。 */
@media (min-width: 992px) {
    .page-hero { margin-top: -42px; padding-top: 102px; }
}
.page-hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: .5rem; color: #fff; }
.page-hero .hero-sub { color: #fff; }
.page-hero .hero-sub { font-size: 1.05rem; opacity: .92; }
.breadcrumb-nav { font-size: .9rem; margin-bottom: 1.2rem; opacity: .85; }
.breadcrumb-nav a { color: #bfe0ff; }
.breadcrumb-nav a:hover { color: #fff; }
.breadcrumb-nav .sep { margin: 0 8px; opacity: .6; }

/* ---- 正文内容排版 ---- */
.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #194376;
    margin: 2.2rem 0 1rem;
    border-left: 4px solid #33adff;
    padding-left: .75rem;
}
.page-content h3 { font-size: 1.15rem; font-weight: 600; color: #333; margin: 1.6rem 0 .7rem; }
.page-content p { line-height: 1.9; margin-bottom: 1rem; color: #444; }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { line-height: 1.8; margin-bottom: .4rem; color: #444; }
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fff;
    font-size: .95rem;
}
.page-content th { background: #194376; color: #fff; padding: .7rem .8rem; text-align: left; }
.page-content td { padding: .65rem .8rem; border-bottom: 1px solid #e3e6ea; color: #444; }
.page-content tbody tr:nth-child(even) { background: #f6f9fc; }

/* ---- FAQ 手风琴 ---- */
.faq-item { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; margin-bottom: .8rem; overflow: hidden; }
.faq-item .faq-q {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.2rem; cursor: pointer; font-weight: 600; color: #194376;
}
.faq-item .faq-q i { transition: transform .3s; color: #33adff; }
.faq-item.open .faq-q i { transform: rotate(180deg); }
.faq-item .faq-a { display: none; padding: 0 1.2rem 1.1rem; line-height: 1.9; color: #555; }
.faq-item.open .faq-a { display: block; }

/* ---- CTA 转化块 ---- */
.cta-box {
    background: linear-gradient(135deg, #194376 0%, #33adff 100%);
    border-radius: 12px;
    color: #fff;
    padding: 2rem;
    margin: 2.5rem 0;
}
.cta-box h2, .cta-box h3 { color: #fff; border: none; padding: 0; margin-top: 0; }
.cta-box p { color: rgba(255,255,255,.92); }

/* ---- 相关链接卡 ---- */
.related-card {
    display: block;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    padding: 1.2rem;
    height: 100%;
    text-decoration: none;
    color: #333;
    transition: all .3s ease;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    text-decoration: none;
    color: #194376;
}
.related-card .rc-icon { font-size: 1.6rem; color: #33adff; margin-bottom: .6rem; }
.related-card h5 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.related-card p { font-size: .88rem; color: #777; margin: 0; line-height: 1.6; }

/* ---- 聊天组件（与首页样式一致，由 page-common.js 注入 DOM）---- */
.chat-widget {
    position: fixed; bottom: 24px; right: 24px; width: 400px; height: 560px;
    background-color: #fff; border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.08);
    display: flex; flex-direction: column; z-index: 1000; overflow: hidden;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    opacity: 0; transform: translateY(24px) scale(.96); pointer-events: none;
}
.chat-widget.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.chat-widget.minimized { height: 64px; overflow: hidden; }
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center;
}
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.chat-header-info h5 { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.chat-header-info .chat-status { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.chat-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.chat-controls { display: flex; gap: 6px; }
.chat-control {
    cursor: pointer; opacity: .7; transition: all .2s ease; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 13px;
}
.chat-control:hover { opacity: 1; background-color: rgba(255,255,255,.2); }
.chat-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f4f4f8; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px 16px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
.message { margin-bottom: 16px; display: flex; align-items: flex-end; gap: 8px; opacity: 0; transform: translateY(8px); animation: msgIn .3s ease forwards; }
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }
.message.user { flex-direction: row-reverse; }
.msg-avatar {
    width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 14px; flex-shrink: 0; margin-bottom: 2px;
}
.message.bot .msg-avatar { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.message.user .msg-avatar { background: #e0e7ff; color: #667eea; }
.message-content { padding: 10px 16px; max-width: 75%; word-break: break-word; line-height: 1.6; font-size: 14px; }
.message.bot .message-content { background-color: #fff; color: #374151; border-radius: 18px 18px 18px 4px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.message.user .message-content { background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 18px 18px 4px 18px; }
.message.system { justify-content: center; }
.message.system .message-content { background: transparent; color: #9ca3af; font-size: 12px; text-align: center; padding: 4px 0; max-width: 100%; }
.chat-input { display: flex; align-items: center; padding: 12px 14px; gap: 10px; background: #fff; border-top: 1px solid #f0f0f4; }
.chat-input input {
    flex: 1; padding: 11px 16px; border: 1.5px solid #e5e7eb; border-radius: 24px; outline: none;
    transition: all .2s ease; font-size: 14px; background: #f9fafb;
}
.chat-input input:focus { border-color: #667eea; background: #fff; box-shadow: 0 0 0 3px rgba(102,126,234,.1); }
.chat-input button {
    background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; width: 42px; height: 42px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .2s ease; flex-shrink: 0;
}
.chat-input button:hover { transform: scale(1.06); box-shadow: 0 4px 12px rgba(102,126,234,.4); }
.chat-input button:active { transform: scale(.96); }
.chat-input button i { font-size: 15px; margin-left: 1px; }
.chat-button {
    position: fixed; bottom: 28px; right: 28px; width: 60px; height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 6px 20px rgba(102,126,234,.45); z-index: 999;
    transition: all .35s cubic-bezier(.4,0,.2,1); font-size: 24px;
}
.chat-button:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 8px 28px rgba(102,126,234,.55); }
.chat-button.hidden { opacity: 0; transform: scale(0); pointer-events: none; }

@media (max-width: 480px) {
    .chat-widget { bottom: 0; right: 0; width: 100%; height: 100%; border-radius: 0; }
    .chat-widget.active { transform: translateY(0) scale(1); }
    .page-hero h1 { font-size: 1.6rem; }
}
