/* ============================================================
   base.css — 全局基础样式
   ============================================================ */

/* =========================
   全局 Reset
   ========================= */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 400;
}

h1 {
    font-weight: 700;
}

h2 {
    font-weight: 600;
}


a {
    text-decoration: none;
    color: inherit;
}

/*img {*/
/*    max-width: 100%;*/
/*    height: auto;*/
/*}*/


/* =========================
   顶部导航栏
   ========================= */
.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-weight: 700;
    font-size: 1.2rem;
    padding-left: 12px;
    padding-right: 12px;
    color: #222 !important;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: #198754 !important;
}

.dropdown-menu h6 {
    font-weight: 600;
}

/* =========================
   顶部导航栏（Logo 防截断）
   ========================= */
.navbar-brand {
    flex-shrink: 0 !important;      /* ✅ 禁止被压缩 */
    min-width: max-content !important; /* ✅ 保证完整显示 */
    overflow: visible !important;
    white-space: nowrap !important;
}

.navbar-brand img {
    max-height: 40px;
    width: auto !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

/* ✅ 强制下拉菜单可点击（手机端） */
.dropdown-menu {
    z-index: 1050 !important;
    pointer-events: auto !important;
}

.dropdown-menu .card a,
.dropdown-menu .card h6 {
    pointer-events: auto;
}


/* =========================
   右侧悬浮工具栏
   ========================= */

/* 1. 容器：固定在屏幕右侧中间 */
#fixed-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* 2. 单个图标容器 */
.sidebar-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

/* 3. 图标样式 */
.sidebar-item img {
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border: 1px solid #eee;
    object-fit: contain;
}

.sidebar-item img:hover {
    transform: scale(1.1);
}

/* 4. 回到顶部按钮（绿色背景） */
.sidebar-item:last-child img {
    background-color: #28a745;
    border-color: #28a745;
}

/* 5. 二维码弹出框 */
.qr-code-popup {
    position: absolute;
    left: -220px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10000;
    width: 220px;
    text-align: center;
}

.qr-code-popup img {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.sidebar-item:hover .qr-code-popup {
    display: block;
}

/* 6. Tooltip（备用，如有需要） */
.sidebar-tooltip {
    display: none;
    position: absolute;
    left: -160px;
    top: 0;
    width: 150px;
    height: 150px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    padding: 5px;
    z-index: 10000;
}

.sidebar-tooltip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-item:hover .sidebar-tooltip {
    display: block;
}

/* ============================================================
   首页优势卡片（Why Choose Us）
   ============================================================ */
.advantage-card {
    background-color: #fff;
    border: 1px solid #ffc107;      /* 金色边框 */
    border-radius: 12px;
    padding: 2rem 1rem;
    height: 100%;                   /* ✅ 强制等高 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border: 1px solid #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    font-size: 1.5rem;
}

/* ✅ 标题高度统一（可选，字数差异大时建议保留） */
.advantage-card h6 {
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ 描述文字舒适排版 */
.advantage-card p {
    line-height: 1.6;
    margin-bottom: 0;
}


/* =========================
   底部区域
   ========================= */
.site-footer {
    background: linear-gradient(135deg, #198754 0%, #0d6efd 100%);
}

.site-footer a:hover {
    color: #ffc107 !important;
    text-decoration: underline;
}


/* =========================
   底部社交媒体图标
   ========================= */
.social-bar {
    background-color: #111;
    padding: 10px 20px;
    border-radius: 999px;
    display: inline-flex;
    gap: 12px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    background-color: transparent;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.social-icon.youtube i { color: #FF0000; }
.social-icon.facebook i { color: #1877F2; }

.social-icon.instagram i {
    background: radial-gradient(
        circle at 30% 107%,
        #fdf497 0%, #fdf497 5%,
        #fd5949 45%, #d6249f 60%, #285AEB 90%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-icon.x i { color: #ffffff; }
.social-icon.linkedin i { color: #0A66C2; }


/* =========================
   移动端适配
   ========================= */
@media (max-width: 768px) {
    /* 导航字体缩小 */
    .navbar-nav .nav-link {
        font-size: 1rem;
    }

    /* 悬浮栏调整 */
    #fixed-sidebar {
        right: 10px;
        gap: 10px;
    }

    .sidebar-item img {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    /* 二维码弹窗调整 */
    .qr-code-popup {
        left: -160px;
        width: 160px;
    }

    /* 底部社交图标 */
    .social-bar {
        padding: 8px 14px;
        gap: 8px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }
}


