/* 码域科技企业官网样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: #333; font-size: 15px; background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
ul { list-style: none; }
.container { width: 1200px; max-width: 96%; margin: 0 auto; }
.center { text-align: center; margin-top: 30px; }

/* 顶栏 */
.topbar { background: #16283e; color: #cfd8e3; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; padding: 7px 0; }
.topbar b { color: #fff; }
.topbar-right span { margin-right: 16px; }
.topbar a { color: #4d94ff; }

/* 主导航 */
.header-main { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 99; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.logo-mark { width: 48px; height: 48px; background: #1657c1; color: #fff; font-size: 26px; font-weight: bold; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.logo-text strong { display: block; font-size: 20px; color: #16283e; }
.logo-text em { font-style: normal; font-size: 12px; color: #999; letter-spacing: 2px; }
.nav { display: flex; }
.nav li a { display: block; padding: 26px 20px; font-size: 16px; font-weight: 500; color: #333; }
.nav li a:hover, .nav li.curr a { color: #1657c1; }
.nav li.curr a { border-bottom: 3px solid #1657c1; }

/* 轮播 */
.banner { position: relative; height: 460px; overflow: hidden; background: #16283e; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.banner-slide.show { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-default { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #1657c1, #16283e); }
.banner-default h2 { font-size: 40px; letter-spacing: 4px; margin-bottom: 14px; }
.banner-default p { font-size: 18px; color: #cfe0f7; margin-bottom: 30px; }

/* 按钮 */
.btn { display: inline-block; background: #1657c1; color: #fff; padding: 11px 36px; border-radius: 4px; font-size: 15px; border: 1px solid #1657c1; transition: .3s; cursor: pointer; }
.btn:hover { background: #0f4296; }
.btn-line { background: transparent; color: #1657c1; }
.btn-line:hover { background: #1657c1; color: #fff; }

/* 区块 */
.section { padding: 50px 0; }
.section-gray { background: #f5f7fa; }
.sec-title { text-align: center; margin-bottom: 36px; }
.sec-title h2 { font-size: 28px; color: #16283e; }
.sec-title span { display: block; color: #b6c2d2; font-size: 13px; letter-spacing: 4px; margin-top: 6px; }

/* 服务卡片 */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card { background: #fff; border: 1px solid #e8edf4; border-radius: 8px; padding: 30px 22px; text-align: center; transition: .3s; }
.service-card:hover { box-shadow: 0 10px 28px rgba(22,87,193,.14); transform: translateY(-4px); border-color: #1657c1; }
.service-icon { width: 60px; height: 60px; margin: 0 auto 16px; background: #eaf1fd; color: #1657c1; font-size: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.service-card h3 { font-size: 18px; margin-bottom: 10px; }
.service-card p { color: #888; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.more-link { color: #1657c1; font-size: 13px; }

/* 案例卡片 */
.case-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.case-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: .3s; }
.case-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.12); }
.case-card img { width: 100%; height: 190px; object-fit: cover; }
.case-info { padding: 14px 16px; }
.case-info h3 { font-size: 16px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-info p { color: #999; font-size: 13px; }

/* 资讯板块 */
.news-block { margin-bottom: 44px; }
.news-block-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eef2f8; padding-bottom: 12px; margin-bottom: 20px; }
.news-block-head h2 { font-size: 21px; color: #16283e; display: flex; align-items: center; }
.news-block-head .bar { display: inline-block; width: 5px; height: 20px; background: #1657c1; margin-right: 10px; }
.news-block-head .more { color: #1657c1; font-size: 14px; }
.news-block-body { display: grid; grid-template-columns: 380px 1fr; gap: 28px; }
.news-headline { display: block; border: 1px solid #eef2f8; border-radius: 8px; overflow: hidden; }
.news-headline img { width: 100%; height: 215px; object-fit: cover; }
.headline-info { padding: 14px 16px; }
.headline-info h3 { font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
.headline-info .date { color: #999; font-size: 12px; margin-bottom: 6px; }
.headline-info .summary { color: #777; font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px dashed #e5eaf2; }
.news-list li a { flex: 1; margin-right: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.news-list li a:hover { color: #1657c1; }
.news-list li span { color: #999; font-size: 13px; }

/* 内页 banner */
.page-banner { background: linear-gradient(135deg, #1657c1, #16283e); color: #fff; padding: 60px 0; text-align: center; }
.page-banner h1 { font-size: 32px; letter-spacing: 3px; }

/* 详情布局 */
.detail-layout { display: grid; grid-template-columns: 260px 1fr; gap: 34px; align-items: start; }
.detail-main { min-height: 300px; }
.detail-title { font-size: 24px; color: #16283e; margin-bottom: 12px; line-height: 1.5; }
.detail-meta { color: #999; font-size: 13px; display: flex; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid #eef2f8; margin-bottom: 24px; }
.detail-meta a { color: #1657c1; }
.detail-cover { margin: 0 auto 24px; border-radius: 8px; }
.article-op { margin-top: 34px; text-align: center; }
.side-title { font-size: 18px; color: #16283e; padding-left: 12px; border-left: 4px solid #1657c1; margin-bottom: 18px; }
.side-nav { background: #f5f7fa; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.side-nav li a { display: block; padding: 13px 18px; border-bottom: 1px solid #e8edf4; font-size: 15px; }
.side-nav li.curr a { background: #1657c1; color: #fff; }
.side-contact { background: #f5f7fa; border-radius: 8px; padding: 20px; text-align: center; }
.side-contact h4 { font-size: 14px; color: #888; margin-bottom: 8px; }
.side-contact .big { font-size: 22px; color: #1657c1; font-weight: bold; margin-bottom: 16px; }
.side-news li { padding: 9px 0; border-bottom: 1px dashed #e5eaf2; font-size: 14px; }
.side-news li a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-news li a:hover { color: #1657c1; }

/* 文章行 */
.article-row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid #eef2f8; }
.article-row img { width: 220px; height: 130px; object-fit: cover; border-radius: 6px; }
.article-row h3 { font-size: 17px; margin-bottom: 8px; }
.article-row:hover h3 { color: #1657c1; }
.article-row .summary { color: #888; font-size: 13px; line-height: 1.7; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-row .date { color: #aaa; font-size: 12px; }

/* 分类tab */
.cat-tabs { display: flex; gap: 12px; margin-bottom: 10px; }
.cat-tabs a { padding: 9px 22px; background: #f0f4fa; border-radius: 20px; font-size: 14px; }
.cat-tabs a.curr, .cat-tabs a:hover { background: #1657c1; color: #fff; }

/* 分页 */
.pager { text-align: center; margin-top: 34px; }
.pager a, .pager span { display: inline-block; min-width: 36px; height: 36px; line-height: 36px; padding: 0 10px; margin: 0 4px; background: #f0f4fa; border-radius: 4px; font-size: 14px; }
.pager span.curr a { color: #fff; }
.pager span.curr { background: #1657c1; color: #fff; }
.pager a:hover { background: #1657c1; color: #fff; }

/* 富文本 */
.rich { font-size: 15px; line-height: 2; color: #444; }
.rich p { margin: 12px 0; }
.rich img { margin: 14px auto; border-radius: 6px; }
.rich h2, .rich h3 { margin: 20px 0 10px; color: #16283e; }
.rich ul, .rich ol { padding-left: 24px; margin: 10px 0; }
.rich table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.rich td, .rich th { border: 1px solid #e0e6ef; padding: 8px 12px; }

/* 联系页 */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info p { margin: 12px 0; color: #555; }
.form-row { margin-bottom: 16px; }
.form-row input, .form-row textarea { width: 100%; padding: 12px 14px; border: 1px solid #d9e2ee; border-radius: 6px; font-size: 14px; font-family: inherit; }
.form-row textarea { height: 150px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: #1657c1; }

/* 页脚 */
.p-footer { background: #16283e; color: #aebccd; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding: 46px 0 30px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid p { margin: 8px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.f-desc { line-height: 1.8; color: #8fa1b8; }
.copyright { border-top: 1px solid #24384f; padding: 18px 0; text-align: center; font-size: 13px; color: #7a8ba3; }
.copyright p { margin: 5px 0; }
.copyright a { margin: 0 6px; }
.flinks a { margin: 0 8px; }

/* 响应式 */
@media (max-width: 1000px) {
  .container { width: 100%; padding: 0 16px; }
  .nav { flex-wrap: wrap; }
  .nav li a { padding: 16px 12px; font-size: 14px; }
  .header-flex { flex-direction: column; }
  .service-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .news-block-body, .detail-layout, .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .banner { height: 300px; }
}

/* ===== 案例卡片特效（仿参考站：慢放大+遮罩+旋转虚线圈） ===== */
.case-card .case-pic { position: relative; overflow: hidden; }
.case-card .case-pic img { width: 100%; height: 190px; object-fit: cover; display: block; transition: all 2s ease; }
.case-card:hover .case-pic img { transform: scale(1.15); }
.case-mask { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(22, 40, 62, 0.55); opacity: 0; transition: all 0.5s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.case-card:hover .case-mask { opacity: 1; }
.mask-ring { width: 58px; height: 58px; border: 2px dashed rgba(255, 255, 255, 0.9); border-radius: 50%; position: relative; animation: caseRotate 10s linear infinite; }
.mask-arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 22px; color: #fff; }
.mask-text { margin-top: 10px; color: #fff; font-size: 13px; letter-spacing: 2px; opacity: 0.9; }
@keyframes caseRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ===== 采集内容通用布局修正（参考站结构残留：flex_space/li/.pic/.txt） ===== */
.rich img { max-width: 100%; height: auto; }
.rich .flex_space, .rich .flex_start { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.rich .flex_start { justify-content: flex-start; }
.rich ul.flex_space > li, .rich ul.flex_start > li, .rich div.flex_space > li, .rich div.flex_start > li { flex: 1 1 22%; min-width: 200px; list-style: none; }
.rich .pic { overflow: hidden; border-radius: 8px; }
.rich .pic img { width: 100%; height: auto; display: block; border-radius: 8px; }
.rich .txt { padding: 10px 2px 0; }
.rich .txt h3 { font-size: 17px; color: #16283e; margin-bottom: 6px; }
.rich .txt p { color: #777; font-size: 13px; line-height: 1.8; }
.rich .main_tit { text-align: center; margin: 40px 0 26px; }
.rich .main_tit h3 { font-size: 24px; color: #16283e; }
.rich .ico { text-align: center; color: #1657c1; font-size: 34px; margin-bottom: 10px; }
.rich .item { background: #f8fafd; border-radius: 10px; padding: 24px 18px; }
@media (max-width: 1000px) {
  .rich ul.flex_space > li, .rich div.flex_space > li, .rich ul.flex_start > li, .rich div.flex_start > li { flex: 1 1 46%; }
}

/* ===== 采集图片尺寸收紧（防过大/拉伸） ===== */
.rich .about_qyyj { justify-content: center; }
.rich .about_qyyj > li { flex: 0 1 300px; }
.rich .pic img { max-height: 220px; object-fit: cover; }
.rich img { max-height: 520px; object-fit: contain; }

/* ===== Banner 特效升级：Ken Burns + 文字滑入 + 箭头/圆点 ===== */
.banner .banner-slide { opacity: 0; transition: opacity .9s ease; z-index: 1; }
.banner .banner-slide.show { opacity: 1; z-index: 2; }
.banner-slide.show img { animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.banner-caption { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); text-align: center; color: #fff; width: 80%; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.banner-caption h2 { font-size: 42px; letter-spacing: 5px; margin-bottom: 14px; }
.banner-caption p { font-size: 17px; color: #e8f0fc; margin-bottom: 28px; letter-spacing: 1px; }
.banner-btn { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.7); backdrop-filter: blur(2px); padding: 12px 42px; border-radius: 30px; }
.banner-btn:hover { background: #fff; color: #1657c1; }
/* 文字逐条滑入 */
.banner-slide.show .banner-caption h2 { animation: capUp .8s .15s ease both; }
.banner-slide.show .banner-caption p { animation: capUp .8s .35s ease both; }
.banner-slide.show .banner-caption .banner-btn { animation: capUp .8s .55s ease both; }
@keyframes capUp { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }
/* 箭头 */
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 46px; height: 46px; line-height: 44px; text-align: center; color: #fff; font-size: 22px; background: rgba(0,0,0,.25); border-radius: 50%; opacity: 0; transition: all .4s; }
.banner:hover .banner-arrow { opacity: 1; }
.banner-arrow:hover { background: #1657c1; }
.banner-arrow.prev { left: 26px; }
.banner-arrow.next { right: 26px; }
/* 圆点 */
.banner-dots { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; z-index: 5; }
.banner-dots .dot { display: inline-block; width: 26px; height: 5px; margin: 0 5px; background: rgba(255,255,255,.45); border-radius: 3px; cursor: pointer; transition: all .4s; }
.banner-dots .dot.curr { background: #fff; width: 40px; }
@media (max-width: 1000px) { .banner-caption h2 { font-size: 26px; } .banner-caption p { font-size: 14px; } }
