/* Shared site shell: footer and document-level floating UI. */
:root {
    --shell-brand: #ee3231;
    --shell-brand-deep: #c92321;
    --shell-accent: #ff9a78;
    --shell-ink: #27313d;
    --shell-muted: #697586;
    --shell-line: #edf0f3;
    --shell-surface: #fff;
    --shell-footer: #f7f8fa;
    --shell-shadow: 0 2px 5px rgba(22, 27, 35, .1), 0 16px 40px rgba(22, 27, 35, .14);
}

/* Footer */
footer.site-footer {
    position: relative;
    margin-top: 36px;
    overflow: hidden;
    background: var(--shell-footer);
    color: var(--shell-muted);
}

footer.site-footer:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, var(--shell-brand), var(--shell-accent));
}

.foot-service {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    border-bottom: 1px solid var(--shell-line);
    background: var(--shell-surface);
}

.foot-service .fs-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 74px;
    padding: 14px 12px;
    border-right: 1px solid var(--shell-line);
    box-sizing: border-box;
}

.foot-service .fs-item:last-child { border-right: 0; }
.foot-service .fs-item .iconfont { color: var(--shell-brand); font-size: 28px; }
.foot-service .fs-text b { display: block; color: var(--shell-ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.foot-service .fs-text small { display: block; margin-top: 2px; color: #9aa0a8; font-size: 12px; line-height: 1.4; }

footer.site-footer .footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 24px;
    box-sizing: border-box;
}

.endnav { float: none; max-width: 900px; padding-top: 0; padding-left: 10px; }
.endnav b { color: var(--shell-ink); font-size: 18px; }
.endnav p { color: var(--shell-muted); line-height: 1.9; }
.endnav p a { color: var(--shell-muted); transition: color .2s ease; }
.endnav p a:hover { color: var(--shell-brand); text-decoration: none; }
.endnav-contact span { display: inline-block; margin-right: 18px; white-space: nowrap; }

.wxbox { float: none; padding-top: 0; }
.wxbox ul { display: flex; gap: 12px; margin: 0; padding: 0; }
.wxbox li { display: grid; justify-items: center; padding: 9px 10px 6px; border: 1px solid var(--shell-line); border-radius: 8px; background: #fff; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .15); }
.wxbox img { width: 112px; height: 112px; border-radius: 6px; object-fit: cover; }
.wxbox span { color: var(--shell-muted); font-size: 13px; line-height: 2; }

/* Document floating ad: stays in the page flow context instead of covering the viewport. */
.site-float-ad {
    position: fixed;
    top: 150px;
    left: 0;
    z-index: 80;
    width: 168px;
    padding: 28px 8px 8px;
    border: 1px solid rgba(238, 50, 49, .14);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(36, 43, 53, .14);
    box-sizing: border-box;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.site-float-ad.is-paused { cursor: default; }

.site-float-ad-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 27px;
    padding: 0 10px;
    overflow: hidden;
    color: var(--shell-brand-deep);
    font-size: 12px;
    font-weight: 600;
    line-height: 27px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: linear-gradient(90deg, #fff4f2, #fffafa);
    border-radius: 10px 10px 0 0;
}

.site-float-ad-media {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    background: #f7f8fa;
}

.site-float-ad-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 168px;
    object-fit: cover;
}

.site-float-ad-close {
    position: absolute;
    top: 4px;
    right: 5px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #9b5a55;
    background: rgba(255, 255, 255, .76);
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.site-float-ad-close:hover { color: #fff; background: var(--shell-brand); transform: rotate(90deg); }
.site-float-ad-close:focus-visible { outline: 2px solid rgba(238, 50, 49, .45); outline-offset: 2px; }
.site-float-ad-close .iconfont { font-size: 20px; line-height: 1; }
.site-float-ad-close:hover .iconfont { color: #fff; }

@media (max-width: 900px) {
    .foot-service { width: calc(100% - 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-service .fs-item { border-bottom: 1px solid var(--shell-line); }
    footer.site-footer .footer { width: calc(100% - 24px); flex-wrap: wrap; padding: 24px 0; }
    .site-float-ad { top: 120px; width: 132px; padding: 25px 6px 6px; }
    .site-float-ad-media img { max-height: 132px; }
}

@media (max-width: 600px) {
    .site-float-ad { width: 124px; padding: 24px 5px 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .endnav p a, .site-float-ad-close { transition: none !important; }
}
