/*
Theme Name: 锅炉设备企业主题
Theme URI: https://example.com
Author: 聚能热力
Author URI: https://example.com
Description: 专业的锅炉设备制造企业WordPress主题，适用于生物质锅炉、燃油燃气锅炉、热载体锅炉等设备展示
Version: 1.0
License: GPL v2 or later
Text Domain: boiler-company
*/

/* === 基础样式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* === 顶部栏登录入口样式 === */
.top-bar {
    background: #2c3e50;
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .contact-info span {
    margin-right: 20px;
}

/* QQ联系方式样式 */
.top-bar .qq-contact {
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    transition: all 0.3s;
}

.top-bar .qq-contact:hover {
    color: #12b7f5;
}

.top-bar .social-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.top-bar .social-links a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.top-bar .social-links a:hover {
    opacity: 0.8;
}

.top-bar .separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 12px;
    font-weight: 300;
}

.top-bar .login-link,
.top-bar .admin-link,
.top-bar .logout-link {
    color: white;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.top-bar .login-link:hover,
.top-bar .admin-link:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

.top-bar .logout-link {
    color: #ff6b6b;
}

.top-bar .logout-link:hover {
    color: #ff5252;
}

/* === 导航栏样式 === */
.navbar {
    padding: 15px 0;
    transition: all 0.3s;
}

.navbar-brand h2 {
    font-weight: 700;
    font-size: 28px;
}

.navbar-brand p {
    font-size: 13px;
    letter-spacing: 1px;
}

/* Bootstrap导航菜单下拉支持 */
.navbar-nav .dropdown-menu {
    position: absolute;
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    padding: 0;
    margin-top: 5px;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .dropdown-menu a {
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    transition: all 0.3s;
}

.navbar-nav .dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* 二级下拉菜单 */
.navbar-nav .dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
}

/* 当前菜单项高亮 */
.current-menu-item a {
    color: #0d6efd !important;
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: #333;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

/* === 页脚管理入口样式 === */
.admin-footer-section {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.admin-footer-section .btn {
    padding: 5px 10px;
    font-size: 12px;
    transition: all 0.3s;
}

.admin-footer-section .btn:hover {
    transform: translateY(-2px);
}

/* === 美女浮动客服样式 === */
.beauty-float-service {
    position: fixed;
    right: 30px;
    bottom: 100px;
    z-index: 99999;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 主客服头像 */
.beauty-float-service .service-avatar {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 182, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #fff;
    background: linear-gradient(135deg, #ff9a9e, #fad0c4, #fad0c4);
    animation: avatarPulse 3s infinite alternate;
}

.beauty-float-service .service-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(255, 107, 182, 0.6);
}

.beauty-float-service .service-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 在线状态指示器 */
.beauty-float-service .online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #4caf50;
    border: 2px solid #fff;
    animation: statusPulse 2s infinite;
}

.beauty-float-service .online-status::after {
    content: "在线";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4081;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.beauty-float-service .online-status:hover::after {
    opacity: 1;
}

/* 客服工具条 */
.beauty-float-service .service-toolbar {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: right center;
}

.beauty-float-service:hover .service-toolbar {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.beauty-float-service .service-toolbar .tool-item {
    background: white;
    border-radius: 25px;
    padding: 8px 15px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    transform: translateX(20px);
    opacity: 0;
}

.beauty-float-service:hover .service-toolbar .tool-item {
    transform: translateX(0);
    opacity: 1;
}

.beauty-float-service .service-toolbar .tool-item:nth-child(1) {
    transition-delay: 0.1s;
}

.beauty-float-service .service-toolbar .tool-item:nth-child(2) {
    transition-delay: 0.2s;
}

.beauty-float-service .service-toolbar .tool-item:nth-child(3) {
    transition-delay: 0.3s;
}

.beauty-float-service .service-toolbar .tool-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.beauty-float-service .service-toolbar .tool-item.qq-item {
    color: #12b7f5;
    border-left: 4px solid #12b7f5;
}

.beauty-float-service .service-toolbar .tool-item.wechat-item {
    color: #09bb07;
    border-left: 4px solid #09bb07;
}

.beauty-float-service .service-toolbar .tool-item.phone-item {
    color: #ff9800;
    border-left: 4px solid #ff9800;
}

.beauty-float-service .service-toolbar .tool-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.beauty-float-service .service-toolbar .qq-item .tool-icon {
    background: #e6f7ff;
}

.beauty-float-service .service-toolbar .wechat-item .tool-icon {
    background: #e8f5e8;
}

.beauty-float-service .service-toolbar .phone-item .tool-icon {
    background: #fff3e0;
}

.beauty-float-service .service-toolbar .tool-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* 客服对话气泡 */
.beauty-float-service .speech-bubble {
    position: absolute;
    bottom: 85px;
    right: 85px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s;
    z-index: 1;
}

.beauty-float-service .speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.beauty-float-service:hover .speech-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.beauty-float-service .speech-bubble .bubble-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.beauty-float-service .speech-bubble .bubble-time {
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* 关闭按钮 */
.beauty-float-service .close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    background: #ff4081;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 2;
    font-size: 12px;
    box-shadow: 0 3px 10px rgba(255, 64, 129, 0.3);
}

.beauty-float-service:hover .close-btn {
    opacity: 1;
}

.beauty-float-service .close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: #f50057;
}

/* 动画效果 */
@keyframes avatarPulse {
    0% {
        box-shadow: 0 5px 20px rgba(255, 107, 182, 0.4);
    }
    100% {
        box-shadow: 0 5px 25px rgba(255, 107, 182, 0.7), 0 0 0 10px rgba(255, 107, 182, 0.1);
    }
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 移动端浮动客服 */
.beauty-float-service.mobile-service {
    animation: floatUpDown 3s ease-in-out infinite;
}

.beauty-float-service.mobile-service .service-avatar {
    width: 60px;
    height: 60px;
}

/* === 微信弹窗样式 === */
#wechatModal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

#wechatModal .modal-header {
    background: #09bb07;
    color: white;
    border-bottom: none;
}

#wechatModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* === QQ弹窗样式 === */
#qqModal .modal-content {
    border-radius: 10px;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

#qqModal .modal-header {
    background: #12b7f5;
    color: white;
    border-bottom: none;
}

#qqModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 联系信息卡片样式 */
.contact-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-card.qq-card {
    border-left: 4px solid #12b7f5;
}

.contact-card.wechat-card {
    border-left: 4px solid #09bb07;
}

.contact-card.phone-card {
    border-left: 4px solid #f8b500;
}

.contact-card .contact-icon {
    font-size: 24px;
    margin-bottom: 15px;
    display: inline-block;
}

.contact-card.qq-card .contact-icon {
    color: #12b7f5;
}

.contact-card.wechat-card .contact-icon {
    color: #09bb07;
}

.contact-card.phone-card .contact-icon {
    color: #f8b500;
}

.contact-card .contact-number {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.contact-card .contact-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 10px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 响应式设计 === */
@media (max-width: 991.98px) {
    /* 导航栏移动端样式 */
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-menu .dropdown-menu {
        margin-left: 1rem;
    }
    
    /* 顶部栏移动端样式 */
    .top-bar .row {
        text-align: center;
    }
    
    .top-bar .col-md-6 {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .top-bar .col-md-6.text-end {
        text-align: center !important;
    }
    
    .top-bar .social-links {
        justify-content: center;
    }
    
    .top-bar .contact-info span {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .top-bar .qq-contact {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .top-bar .separator {
        display: none;
    }
    
    .top-bar .login-link,
    .top-bar .admin-link,
    .top-bar .logout-link {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    /* 移动端美女客服样式 */
    .beauty-float-service {
        right: 15px;
        bottom: 80px;
    }
    
    .beauty-float-service .service-avatar {
        width: 60px;
        height: 60px;
    }
    
    .beauty-float-service .service-toolbar {
        right: 75px;
    }
    
    .beauty-float-service .service-toolbar .tool-item {
        padding: 6px 12px;
        margin-left: 8px;
    }
    
    .beauty-float-service .service-toolbar .tool-text {
        font-size: 13px;
    }
    
    .beauty-float-service .speech-bubble {
        max-width: 200px;
        right: 75px;
    }
}

@media (max-width: 768px) {
    .navbar-brand h2 {
        font-size: 22px;
    }
    
    .contact-card {
        padding: 15px;
    }
    
    .contact-card .contact-number {
        font-size: 16px;
    }
    
    /* 平板端美女客服样式 */
    .beauty-float-service {
        bottom: 70px;
    }
    
    .beauty-float-service .service-toolbar .tool-item {
        display: none; /* 平板端只显示图标 */
    }
    
    .beauty-float-service .service-toolbar .tool-item.show-text {
        display: flex;
    }
}

@media (max-width: 576px) {
    .navbar-brand h2 {
        font-size: 18px;
    }
    
    .navbar-brand p {
        font-size: 11px;
    }
    
    .top-bar {
        font-size: 12px;
        padding: 5px 0;
    }
    
    .top-bar .social-links a {
        margin-left: 10px;
    }
    
    .admin-footer-section {
        padding: 10px;
    }
    
    .admin-footer-section .btn {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .contact-card {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .contact-card .contact-number {
        font-size: 14px;
    }
    
    .contact-card .contact-hint {
        font-size: 11px;
    }
    
    /* 手机端美女客服样式 */
    .beauty-float-service {
        right: 10px;
        bottom: 60px;
    }
    
    .beauty-float-service .service-avatar {
        width: 55px;
        height: 55px;
        animation: floatUpDown 3s ease-in-out infinite;
    }
    
    .beauty-float-service .service-toolbar {
        display: none; /* 手机端点击才显示工具条 */
    }
    
    .beauty-float-service.mobile-active .service-toolbar {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%);
    }
    
    .beauty-float-service .speech-bubble {
        display: none; /* 手机端不显示气泡 */
    }
    
    .beauty-float-service .close-btn {
        opacity: 1; /* 手机端一直显示关闭按钮 */
        top: -5px;
        right: -5px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 375px) {
    .beauty-float-service {
        right: 5px;
        bottom: 50px;
    }
    
    .beauty-float-service .service-avatar {
        width: 50px;
        height: 50px;
    }
}