/* =====================================================================
   矩匣科技官网 - 主题补充样式
   用途：site.css 为静态主题样式，本文件补充由后台动态渲染部分的适配样式
   ===================================================================== */

/* ---------- 语言切换：带国旗下拉菜单（点击展开） ---------- */
.navbar .lang-switch {
    position: relative;
    margin-left: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}
.lang-switch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 20px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all .3s;
    -webkit-appearance: none;
    appearance: none;
}
.navbar.scrolled .lang-switch-toggle {
    border-color: var(--brand-light);
    background: transparent;
    color: var(--text-primary);
}
.lang-switch-toggle:hover,
.navbar .lang-switch.open .lang-switch-toggle {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, .16);
}
.navbar.scrolled .lang-switch-toggle:hover,
.navbar.scrolled .lang-switch.open .lang-switch-toggle {
    background: var(--brand-lighter);
    color: var(--brand-primary);
}
.lang-switch-toggle .flag-icon {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
}
.lang-arrow {
    font-size: 9px;
    opacity: .7;
    transition: transform .25s ease;
}
.navbar .lang-switch.open .lang-arrow { transform: rotate(180deg); }

/* 下拉菜单 */
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 176px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(17, 40, 36, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    z-index: 1300;
}
.navbar .lang-switch.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--font-small);
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
}
.lang-dropdown-item:hover {
    background: var(--brand-lighter);
    color: var(--brand-primary);
}
.lang-dropdown-item .flag-icon { border-radius: 2px; }

/* ---------- 移动端语言菜单：抽屉内默认展开为两个选项按钮 ---------- */
@media (max-width: 991px) {
    .navbar .lang-switch {
        display: block;
        margin: 26px 0 0;
        padding: 0;
        border: 0;
        width: 100%;
    }
    .lang-switch-toggle {
        justify-content: center;
        width: 100%;
        color: #fff;
        border-color: rgba(255, 255, 255, .35);
        background: rgba(255, 255, 255, .08);
    }
    .lang-dropdown-menu {
        position: static;
        display: flex;
        gap: 10px;
        margin-top: 12px;
        padding: 0;
        min-width: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .lang-dropdown-item {
        flex: 1;
        justify-content: center;
        padding: 11px 8px;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .28);
        background: rgba(255, 255, 255, .06);
    }
    .lang-dropdown-item:hover {
        color: #fff;
        border-color: var(--accent-gold);
        background: rgba(212, 175, 55, .22);
    }
}

/* ---------- 导航 Logo：统一使用透明彩色 Logo（无白色底块） ---------- */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.navbar-brand .brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

/* ---------- 导航 Logo 旁品牌文字（中英上下排列） ---------- */
.navbar-brand .brand-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 10px;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}
.navbar-brand .brand-cn {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    transition: color .3s ease;
}
.navbar-brand .brand-en {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    letter-spacing: 2.6px;
    text-transform: uppercase;
    margin-top: 2px;
    transition: color .3s ease;
}
.navbar.scrolled .navbar-brand .brand-cn { color: var(--text-primary); }
.navbar.scrolled .navbar-brand .brand-en { color: var(--text-secondary); }

@media (max-width: 480px) {
    .navbar-brand .brand-cn { font-size: 16px; letter-spacing: 1px; }
    .navbar-brand .brand-en { font-size: 8px; letter-spacing: 1.8px; }
    .navbar-brand .brand-logo { height: 36px; }
    .navbar-brand .brand-text { margin-left: 8px; }
}

/* ---------- 页脚 Logo（统一使用透明彩色 Logo） ---------- */
.footer-brand img {
    opacity: .95;
}

/* ---------- 页脚品牌标题（与顶部导航一致） ---------- */
.footer-brand-title .brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}

.footer-brand-title .brand-cn {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.footer-brand-title .brand-en {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    letter-spacing: 2.6px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ---------- 动态图片自适应 ---------- */
.team-card-img img,
.article-card-img img,
.solution-detail-img img,
.matrix-card-img img,
.business-block-img img,
.featured-article-img img,
.article-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- 卡片链接间距 ---------- */
.article-card .card-link,
.matrix-card-content .card-link {
    display: inline-block;
    margin-top: 12px;
}

/* ---------- 团队头像：聚焦人物头部 ----------
   团队成员图片为竖幅海报（顶部含 Logo、人物头像偏上部）。
   .team-card-img 是横向容器 + object-fit:cover，默认居中裁切会裁掉头部。
   这里单独为团队头像设置竖向对齐到上部，避免“看不见人头”。 */
.team-card-img img {
    object-fit: cover;
    object-position: center 18%;
}

/* ---------- 核心团队：5 人排版（3 + 2 居中） ---------- */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.team-grid .team-card {
    flex: 0 1 calc((100% - 60px) / 3);
    min-width: 280px;
}
@media (max-width: 991px) {
    .team-grid .team-card {
        flex: 0 1 calc((100% - 30px) / 2);
        min-width: 240px;
    }
}
@media (max-width: 767px) {
    .team-grid .team-card {
        flex: 0 1 100%;
        min-width: 0;
    }
}

/* ---------- 移动端语言开关：居中置顶显示 ---------- */
@media (max-width: 991px) {
    .navbar .lang-switch {
        justify-content: center;
        margin: 22px auto 0;
        width: fit-content;
        padding: 6px 14px;
    }
}

/* =============================================================
   联系我们 · 办公地点位置示意图切换（南京总部 / 淮安财税事业部）
   说明：使用 static/images 下的静态示意图；切换逻辑见 web.js 区块 12
   ============================================================= */
.map-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.map-tab {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    background: var(--bg-white);
    border: 1px solid var(--brand-light);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(45, 74, 62, .06);
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all .3s var(--anim-ease);
}
.map-tab:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}
.map-tab.active {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
    border-color: var(--brand-dark);
    color: #fff;
    box-shadow: 0 10px 24px rgba(45, 74, 62, .28);
}
.map-tab-icon i {
    font-size: 22px;
    color: var(--accent-gold);
    transition: color .3s;
}
.map-tab.active .map-tab-icon i { color: var(--accent-gold-light); }
.map-tab-label {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.map-tab-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}
.map-tab-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-secondary);
}
.map-tab.active .map-tab-sub { color: rgba(255, 255, 255, .85); }

.map-panels {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(17, 40, 36, .12);
}
.map-panel { display: none; }
.map-panel.active {
    display: block;
    animation: fadeIn .5s var(--anim-ease);
}
.map-panel iframe,
.map-panel img {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    object-fit: contain;
    background: var(--bg-white);
}
.map-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
}
.map-address {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: var(--font-small);
    color: var(--text-primary);
    line-height: 1.6;
}
.map-address i { color: var(--accent-gold); }
.map-open-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: var(--font-small);
    font-weight: 600;
    color: var(--accent-gold);
    text-decoration: none;
    white-space: nowrap;
    transition: color .25s;
}
.map-open-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

@media (max-width: 767px) {
    .map-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
    }
    .map-panel iframe,
    .map-panel img { height: 320px; }
    .map-meta { flex-direction: column; align-items: flex-start; }
}

/* =============================================================
   团队介绍 · 成员卡：简介文字靠左对齐
   site.css .team-card 默认 text-align:center，这里仅将介绍段落
   调整为左对齐，姓名与职位仍居中
   ============================================================= */
.team-card-info p {
    text-align: left;
}
