/* ============================================================
   Layout - Header & Footer styles
   Extracted from home.css for views/layouts/header.tpl & footer.tpl
   ============================================================ */

/* ============================================================
   Navbar
   ============================================================ */
/* ============================================================
   CSS Variables
   ============================================================ */
:root {
    --navbar-height: 3.333vw;
    --navbar-bg: rgba(255, 255, 255, 0.7);
    --navbar-shadow: 0 0.104vw 0.625vw rgba(0, 0, 0, 0.06);
    /* 全站使用浏览器/系统默认字体，不额外指定字体族 */
    --font-family: inherit;
    --font-nav: inherit;
    --color-text: #333;
    --color-text-dark: #1F212C;
    --color-active: rgba(0, 140, 255, 1);
    --font-title: inherit;
}

/* PC 顶栏整体缩放（logo、字高、间距、下拉等与 --navbar-height 联动） */
.is-pc {
    --nav-s: 1.375;
    --navbar-height: calc(3.333vw * var(--nav-s));
    --navbar-shadow: 0 calc(0.104vw * var(--nav-s)) calc(0.625vw * var(--nav-s)) rgba(0, 0, 0, 0.06);
}



.is-pc .site-navbar {
    padding: 0 4.167vw;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    -webkit-backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    box-shadow: var(--navbar-shadow);
    overflow: visible; /* 避免任意 overflow 与下拉层叠冲突，在子级出现纵向滚动条 */
}

.is-pc .navbar-inner {
    /* 宽屏时限制最大宽度，保证左右始终有足够白边 */
    max-width: 64vw;
    width: min(80%, calc(100% - 8.333vw));
    margin: 0 auto;
    /* 跟 hero 内容的视觉边界对齐（hero 左侧内容有 2.5vw 的 left offset） */
    padding: 0 calc(4.167vw * var(--nav-s, 1));
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

/* PC: 顶栏版心与首页 icon 对齐（--pc-icon-width-px）；顶栏不在此裁切 overflow，见 .pc-frame-shell 注释 */
.is-pc .site-navbar {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* 宽度由首页脚本写入 --pc-icon-width-px（与 icon-section 版心一致）；其它页无脚本时回退与 .icon-inner 相同 */
.is-pc .pc-frame-shell {
    width: var(--pc-icon-width-px, var(--pc-frame-width, min(80vw, calc(100vw - 8.333vw))));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    min-width: 0;
    /*
     * 勿用 overflow-x:hidden：一侧非 visible 时，另一侧的 visible 会按 auto 计算，
     * 顶栏绝对定位下拉向下超出时，会在本容器右侧出现极短的纵向滚动条。
     * 版心横向外溢由区块父级处理（如 .hero-section 为 overflow:hidden）；顶栏仅此处使用 .pc-frame-shell。
     */
    overflow: visible;
    flex: 0 0 auto;
}

.is-pc .navbar-inner {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    /* 与 --navbar-height 一致：单行、按比例缩放，不扩展高度、不出现内部滚动条 */
    min-height: var(--navbar-height);
    max-height: var(--navbar-height);
    overflow: visible;
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    height: var(--navbar-height);
}

.navbar-logo img {
    height: var(--navbar-height);
    width: auto;
    display: block;
    object-fit: contain;
}


.navbar-right {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.navbar-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.883vw;
}

.nav-item > a {
    font-family: var(--font-nav);
    font-weight: 400;
    font-size: 0.833vw;
    color: var(--color-text);
    text-decoration: none;
    line-height: var(--navbar-height);
    display: inline-block;
    position: relative;
    white-space: nowrap;
}

.nav-item.nav-active > a {
    color: var(--color-active);
    font-weight: 700;
}

.nav-item.nav-active > a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(0.104vw * var(--nav-s, 1));
    background: var(--color-active);
    border-radius: calc(0.052vw * var(--nav-s, 1));
}

.lang-dropdown {
    position: relative;
    margin-left: 1.075vw;
    display: flex;
    align-items: center;
}

.lang-dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: calc(0.208vw * var(--nav-s, 1));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lang-dropdown-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-globe-icon {
    width: calc(1.546vw * var(--nav-s, 1));
    height: auto;
    display: block;
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: calc(-2.6vw * var(--nav-s, 1));
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    -webkit-backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    border-radius: calc(0.833vw * var(--nav-s, 1));
    box-shadow: 0 calc(0.208vw * var(--nav-s, 1)) calc(1.25vw * var(--nav-s, 1)) rgba(0, 0, 0, 0.08);
    padding: calc(0.625vw * var(--nav-s, 1)) 0;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-0.208vw * var(--nav-s, 1)));
    transition: opacity 0.7s ease, transform 0.3s ease, visibility 0.5s ease;
    z-index: 1001;
}

/* 填补触发器与菜单之间的空隙，避免鼠标经过空隙时误触 mouseleave 导致菜单收起 */
.lang-dropdown-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: calc(1.4vw * var(--nav-s, 1));
}

.lang-dropdown:hover .lang-dropdown-menu,
.lang-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    display: block;
    padding: calc(0.9vw * var(--nav-s, 1)) calc(0.833vw * var(--nav-s, 1));
    font-family: var(--font-nav);
    font-size: 0.833vw;
    font-weight: 400;
    color: #555;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text-dark);
}

.lang-dropdown-item.lang-dropdown-active {
    color: var(--color-text-dark);
    font-weight: 500;
    background: #f0f0f0;
}

.navbar-hamburger {
    display: none;
}

/* ============================================================
   Nav Dropdown (Discover)
   ============================================================ */
.nav-has-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.99);
    backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    -webkit-backdrop-filter: blur(calc(0.625vw * var(--nav-s, 1)));
    border-radius: 1.25vw;
    box-shadow: 0 calc(0.208vw * var(--nav-s, 1)) calc(1.25vw * var(--nav-s, 1)) calc(-0.625vw * var(--nav-s, 1)) rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 0.125vw;
    width: 8.542vw;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-0.208vw * var(--nav-s, 1)));
    transition: opacity 0.7s ease, transform 0.3s ease, visibility 0.5s ease;
    z-index: 1001;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: calc(0.5vw * var(--nav-s, 1));
}

.nav-has-dropdown:hover .nav-dropdown-menu,
.nav-has-dropdown.dropdown-open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    min-width: calc(8vw * var(--nav-s, 1));
    padding: calc(0.9vw * var(--nav-s, 1)) calc(0.833vw * var(--nav-s, 1));
    font-family: var(--font-nav);
    font-size: 0.833vw;
    font-weight: 400;
    line-height: 2;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text-dark);
}

.overlay {
    display: none;
}

.lang-switcher-mobile {
    display: none;
}

/* ============================================================
   Back to Top Button (footer.tpl)
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 2.917vw;
    left: 83%;
    transform: translateX(-50%);
    width: 5.208vw;
    max-width: none;
    z-index: 999;
    cursor: pointer;
    text-decoration: none;
    line-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top img {
    display: block;
    pointer-events: auto;
    width: 4.167vw;
}

/* ============================================================
   Footer (views/layouts/footer.tpl) — PC base styles
   ============================================================ */
footer.site-footer {
    background: #202E3D;
    color: #fff;
    margin: 0;
    padding: 0;
}

footer.site-footer .footer-main {
    padding: 2.5vw 0 1.667vw;
}

footer.site-footer .footer-inner {
    max-width: 56.25vw;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}


footer.site-footer .footer-main .footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1.563vw;
}

footer.site-footer .footer-brand {
    flex: 0 0 18vw;
    min-width: 23vw;

    /* margin-left: 1.563vw; */
}

footer.site-footer .footer-logo {
    height: 1.042vw;
    width: auto;
    display: block;
    margin-bottom: 1.667vw;
}

footer.site-footer .footer-slogan {
    font-family: var(--font-family);
    font-size: 0.625vw;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.417vw;
}

footer.site-footer .footer-company {
    font-family: var(--font-family);
    font-size: 0.625vw;
    color: rgba(255, 255, 255, 0.5);
}

footer.site-footer .footer-company a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer.site-footer .footer-company a:hover {
    color: #fff;
}

footer.site-footer .footer-links {
    display: flex;
    gap: 3.125vw;
    flex: 1;
}

footer.site-footer .footer-col {
    min-width: 8.813vw;
}

footer.site-footer .footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer.site-footer .footer-col-title {
    font-family: var(--font-family);
    font-size: 0.729vw;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.833vw;
    margin-top: 0;
}

footer.site-footer .footer-col-title-gap {
    margin-top: 1.25vw;
    margin-bottom: 0;
    font-family: var(--font-family);
    font-size: 0.729vw;
    font-weight: 700;
    color: #fff;
}

footer.site-footer .footer-col li {
    /* margin-bottom: 0.221vw; */
    max-height: 1.233vw;
    list-style: none;
}


footer.site-footer .footer-col a {
    font-family: var(--font-family);
    font-size: 0.625vw;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer.site-footer .footer-col a:hover {
    color: #fff;
}

footer.site-footer .footer-bottom {
    border-top: 0.052vw solid rgba(255, 255, 255, 0.1);
    padding: 1.042vw 0;
}

footer.site-footer .footer-copyright {
    font-family: var(--font-family);
    font-size: 0.573vw;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    text-decoration: none;
    display: inline-block;
}

footer.site-footer .footer-copyright:hover {
    color: #fff;
}

/* ============================================================
   Breadcrumb Navigation
   Overlaps on top of hero section, no background.
   Uses .discover-breadcrumb to avoid Bootstrap .breadcrumb clash.
   ============================================================ */
.discover-breadcrumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    padding: 0.521vw 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    list-style: none;
}

.breadcrumb-inner {
    width: min(68vw, calc(100vw - 4.167vw));
    max-width: none;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.313vw;
    font-family: var(--font-family);
    font-size: 0.573vw;
}

.breadcrumb-link {
    color: #000;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s ease;
}

.breadcrumb-link:hover {
    color: var(--color-active);
}

.breadcrumb-sep {
    color: #ccc;
    font-size: 0.521vw;
    user-select: none;
    /* padding: 0 0.26vw; */
}

.breadcrumb-text {
    color: #000;
    font-weight: 400;
}

.breadcrumb-current {
    color: #888;
    font-weight: 400;
}

/* H5: hide breadcrumb on all mobile pages */
.is-h5 .discover-breadcrumb {
    display: none;
}


