/* ==========================================================================
   RTL（阿拉伯语）方向适配层
   --------------------------------------------------------------------------
   说明：<html dir="rtl"> 已自动处理文字方向、flex 主轴、text-align:start/end。
   本文件针对「物理方向属性」做镜像覆盖：
   1) 头部整屏抽屉菜单（从右侧滑入、箭头/返回键/关闭按钮镜像）
   2) 内页侧栏（移到大屏右侧 + 箭头方向 + 圆点/缩进换边）
   3) 返回顶部、页脚热线（left/right 互换）
   4) 首页轮播箭头、八大系列箭头、查看更多箭头（图标水平翻转）
   5) 策略屏 tab 悬停位移、背景渐变镜像
   本文件须在所有其他 CSS 之后加载，故置于 head.html 末尾。
   ========================================================================== */

/* ==========================================================================
   一、全局兜底
   ========================================================================== */
body {
    direction: rtl;
    text-align: right;
}
/* 横向溢出兜底：RTL 下绝对定位浮层向左溢出会撑大 scrollWidth，产生水平滚动条 */
html,
body {
    overflow-x: hidden;
}
/* 通用：左右箭头字形统一水平翻转（icon-left/right/right1） */
.icon-left,
.icon-right,
.icon-right1 {
    transform: scaleX(-1);
}

/* ==========================================================================
   二、头部整屏抽屉菜单
   ========================================================================== */
/* 抽屉改为从右侧滑入 */
.eh-menu {
    left: auto;
    right: 0;
    transform: translateX(100%);
}
.eh-menu.on {
    transform: translateX(0);
}

/* 关闭按钮：贴到抽屉左边缘 */
.eh-close {
    right: auto;
    left: -2rem;
}
@media (max-width: 991px) {
    .eh-close {
        right: auto;
        left: 0.5rem;
    }
}

/* 一级面板切二级时：向右淡出 */
.eh-panel-main.is-slid {
    transform: translateX(40%);
}
/* 二级面板默认藏在左侧，进入时滑到 0 */
.eh-panel-sub {
    transform: translateX(-100%);
}
.eh-panel-sub.is-active {
    transform: translateX(0);
}

/* 一级菜单「序号 em」与文字间距换边 */
.eh-menu-main .eh-link em {
    margin-right: 0;
    margin-left: 12px;
}
@media (max-width: 991px) {
    .eh-menu-main .eh-link em {
        margin-right: 0;
        margin-left: 8px;
    }
}
/* 菜单项悬停：向左位移改为向右位移 */
.eh-menu-main .eh-link {
    transition: color .25s, padding-right .25s;
}
.eh-menu-main .eh-link:hover {
    padding-left: 0;
    padding-right: .4rem;
}
.eh-sub-list a {
    transition: color .25s, padding-right .25s;
}
.eh-sub-list a:hover {
    padding-left: 0;
    padding-right: .6rem;
}

/* 一级菜单右侧小箭头：翻转为指向左 */
.eh-arrow {
    margin-left: 16px;
    margin-right: auto;
    border-top: 1px solid currentColor;
    border-left: 1px solid currentColor;
    border-right: none;
    transform: rotate(-45deg);
}
.eh-menu-main .eh-link:hover .eh-arrow {
    transform: translateX(-3px) rotate(-45deg);
}

/* 二级面板「返回」箭头：翻转为指向右 */
.eh-back-arrow {
    border-left: none;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(-45deg);
}

/* ==========================================================================
   三、内页侧栏
   --------------------------------------------------------------------------
   说明：.inner-grid 原始为 grid-template-columns: 218px minmax(0,1fr)，
   <html dir="rtl"> 会自动反转 CSS Grid 的列方向（侧栏自动落到右侧），
   因此这里无需再改 grid-template-columns 或显式 grid-column。
   ========================================================================== */

/* 侧栏箭头：翻转为指向左 */
.side-caret {
    margin-left: 16px;
    margin-right: auto;
    border-right: none;
    border-left: 1.5px solid #c9c9c9;
    border-bottom: 1.5px solid #c9c9c9;
    transform: rotate(-45deg);
}
.side-list li.on .side-caret,
.side-list li.open .side-caret {
    transform: rotate(135deg);
    margin-top: calc(0.72em + 5px);
}

/* 一级/二级圆点与文字间距换边 */
.side-list li a::before,
.side-sub li a::before {
    margin-right: 0;
    margin-left: 8px;
}

/* 二级栏目缩进换到右侧 */
.side-sub li a {
    padding-left: 5px;
    padding-right: 16px;
}

/* ==========================================================================
   四、公共元素（返回顶部 / 页脚热线）
   ========================================================================== */
/* 返回顶部按钮：移到左下角 */
.back-top {
    right: auto;
    left: 20px;
}

/* 页脚热线：竖排 HOTLINE 文字与内边距换边 */
.foot-hotline {
    padding-left: 0;
    padding-right: 48px;
}
.hotline-vert {
    left: auto;
    right: 8px;
}
.hotline-label i {
    margin-right: 0;
    margin-left: 6px;
}
/* 微信二维码浮层：RTL 下 footer-tools 在左侧，改用 left:0 向右弹出，避免向左溢出 */
.wechat-pop {
    left: 0;
    right: auto;
}

/* ==========================================================================
   五、首页（整屏单页）
   ========================================================================== */
/* 首屏底部控制条：分隔线与箭头区的左右内边距换边 */
.eh-barsep {
    margin-left: 0;
    margin-right: clamp(24px, 3.8vw, 73px);
}
.eh-bar-arrows {
    padding-left: 0;
    padding-right: clamp(12px, 1.1vw, 21px);
}

/* 策略屏背景遮罩渐变：镜像方向 */
.eh-strategy-bgs::after {
    background: linear-gradient(-90deg, rgba(15, 12, 10, .80) 0%, rgba(15, 12, 10, .58) 46%, rgba(15, 12, 10, .34) 100%);
}

/* 策略屏 tab 悬停：向左位移改为向右位移 */
.eh-tab:hover,
.eh-tab.on {
    transform: translateX(6px);
}

/* 八大系列左右箭头：位置互换 + 图标已全局翻转 */
.eh-cate-prev {
    left: auto;
    right: max(6px, calc((100% - var(--cate-w)) / 2 - 62px));
}
.eh-cate-next {
    right: auto;
    left: max(6px, calc((100% - var(--cate-w)) / 2 - 62px));
}

/* 资讯中心分隔线与上下箭头：镜像到另一侧 */
.eh-news-arrows,
.eh-news-vline {
    left: auto;
    right: 53%;
}

/* 「查看更多」文字后的箭头：全局已翻转 icon-right1 */
/* （无需额外处理） */

/* ==========================================================================
   六、内页（产品详情 / 团队轮播 / 招聘手风琴）
   ========================================================================== */
/* 产品详情大图左右切换箭头：位置互换（箭头字符在模板里已互换） */
.pd-prev {
    left: auto;
    right: 15px;
}
.pd-next {
    right: auto;
    left: 15px;
}

/* 团队轮播左右箭头：位置互换 + 三角形方向镜像 */
.team-prev {
    left: auto;
    right: max(2px, calc(8.33% - 62px));
}
.team-next {
    right: auto;
    left: max(2px, calc(8.33% - 62px));
}
.team-prev::after {
    transform: rotate(45deg) translate(-0.5px, -2px);
}
.team-next::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* 荣誉页年份选择箭头：RTL 下方向镜像 + 三角形居中补偿（与团队箭头一致） */
.social-prev::before {
    transform: rotate(45deg) translate(-2px, -2px);
}
.social-next::before {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* 招聘手风琴箭头：镜像为指向左 */
.job-arrow::before {
    left: auto;
    right: 2px;
    border-right: none;
    border-left: 1.5px solid #b3936b;
    border-bottom: 1.5px solid #b3936b;
    transform: rotate(-45deg);
}

/* 发展历程时间线：RTL 下 padding 方向镜像，避免图片/文字紧贴中间线 */
.h-txt {
    padding-right: 0;
    padding-left: 64px;
    text-align: left;
}
.h-img {
    padding-left: 0;
    padding-right: 64px;
}
.h-row:nth-child(even) .h-img {
    padding-right: 0;
    padding-left: 64px;
}
.h-row:nth-child(even) .h-txt {
    padding-left: 0;
    padding-right: 64px;
    text-align: right;
}
@media (max-width: 1399px) and (min-width: 992px) {
    .h-txt {
        padding-left: 40px;
    }
    .h-img {
        padding-right: 40px;
    }
    .h-row:nth-child(even) .h-img {
        padding-left: 40px;
    }
    .h-row:nth-child(even) .h-txt {
        padding-right: 40px;
    }
}
