/* ====================================================================
 * 出行网 - 公共样式（所有页面引用）
 *
 * 该文件包含首页、实时路况列表页等都用到的 CSS。
 * 命名空间约定：
 *   - #mardiv / .marquee-track  ：顶部滚动公告（仅此处定义，别处勿用同名）
 *   - .footer                    ：页脚（仅此处定义，别处勿用同名）
 *   - .hotlink                   ：友情链接（仅此处定义，别处勿用同名）
 * 任何新增共享规则都应明确前缀（如 .cx-*），避免与 r/cms/front.css、
 * layout.css 或 ligurUI 自带样式发生冲突。
 * ==================================================================== */

/* ----- 全局字体 / 链接过渡 ----- */
body {
    font-family: "Microsoft YaHei", "SimSun", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a {
    -webkit-transition: color .2s ease;
    transition: color .2s ease;
}

/* ----- 顶部滚动通知条 ----- */
/* 父容器在 header.html 里宽 868px；让 #mardiv 撑满父容器，避免溢出导致右侧背景被切 */
#mardiv {
    height: 23px;
    line-height: 23px;
    padding: 0 6px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    width: 100%;
}
#mardiv a {
    text-decoration: none;
    color: #0348b2;
}
#mardiv a:hover {
    text-decoration: underline;
}
/* div + CSS 动画模拟 marquee（HTML5 <marquee> 已弃用）*/
#mardiv .marquee-track {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: cx-marquee-scroll 160s linear infinite;
    padding-top: 4px;
}
#mardiv:hover .marquee-track {
    animation-play-state: paused;
}
@keyframes cx-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* ----- 友情链接（强化布局，对 layout.css 中的 dl.hotlink 做美化补强）-----

   layout.css 中的 dl.hotlink 只有 1px 绿色边框，视觉上太单薄。
   这里在不修改 layout.css 的前提下做细节增强：
     - 与整站绿色主题一致的更厚边框 + 浅绿背景
     - 圆角与阴影，让其与 .lk-wrapper 卡片风格统一
     - select 加圆角、内边距
*/
.hotlink {
    max-width: 960px;     /* 用 max-width 替代固定 width，避免覆盖 layout.css 的 .page2 */
    width: auto;
    margin: 14px auto 0;
    padding: 8px 14px;
    line-height: 35px;
    border: 2px solid #b0f000;
    border-radius: 4px;
    background: #f4faf0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(34, 110, 48, .08);
    box-sizing: border-box;
}
.hotlink dt {
    float: left;
    width: 110px;
    height: 32px;
    line-height: 32px;
    padding: 0 8px;
    margin-right: 8px;
    /* 优先显示 CSS 背景图，但当 layout.css 旧版没图或图片加载失败时，
       用 CSS 文字兜底，避免空标签 */
    background: url(../r/cms/www/red/img/hotlink1.jpg) center no-repeat #43a552;
    background-size: contain;
    border-radius: 3px;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    text-indent: 0; /* 覆盖 layout.css 的 -9999px，让 fallback 文字可见 */
    overflow: hidden;
}
.hotlink dd {
    float: left;
    height: 32px;
    line-height: 32px;
    margin: 0 6px 0 0;
    overflow: hidden;
}
.hotlink select {
    height: 26px;
    border: 1px solid #b9c6d9;
    border-radius: 3px;
    background-color: #fff;
    color: #333;
    padding: 2px 6px;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease;
}
.hotlink select:hover {
    border-color: #226e30;
    box-shadow: 0 0 0 2px rgba(34, 110, 48, .1);
}
.hotlink select option {
    color: #333;
}

/* ----- 页脚 ----- */
/* 使用 min-width:100% 配合 max-width 通栏，配合 body 的 box-sizing 实现真正的通栏效果，
   但 .footer 内部文本框受 .page2 约束仍可居中。直接 width:100% 在 box-sizing:content-box 下会撑破 */
.footer {
    width: 100%;
    min-width: 960px;
    margin-top: 12px;
    padding: 16px 0 18px;
    background-color: #2f8c3e; /* 兼容旧浏览器的纯色回退 */
    background-image: linear-gradient(180deg, #43a552 0%, #226e30 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(
                startColorstr='#43a552',
                endColorstr='#226e30',
                GradientType=0); /* IE6-8 */
    border-top: 3px solid #b0f000;
    color: #e8f6e3;
    font-size: 12px;
    line-height: 1.9;
    text-align: center;
    letter-spacing: .5px;
    clear: both;
}
.footer a { color: #dff3b8; }
.footer a:hover { color: #ffffff; text-decoration: underline; }
