/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #881337; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #500724; }

/* 放大镜效果类 */
.zoom-container { overflow: hidden; }
.zoom-img { transition: transform 0.5s ease; cursor: zoom-in; }
.zoom-img:hover { transform: scale(1.5); }

/* 侧边栏子菜单激活样式 */
.nav-link-active {
    color: #881337;
    font-weight: bold;
    background-color: #fdf2f3;
    border-right: 3px solid #881337;
}

/* 旋转动画 */
.rotate-180-deg {
    transform: rotate(180deg);
}
.icon-transition {
    transition: transform 0.3s ease;
}

/* 专家头像重叠效果 */
.expert-overlap-img {
    margin-bottom: 12px; 
    z-index: 20; 
    position: relative;
}
@media (min-width: 768px) {
    .expert-overlap-img {
        margin-bottom: 0;
        margin-right: -30px;
    }
}

/* 首页轮播图动画 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 1s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* 滚动淡入动画 */
.scroll-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 智能客服动画 --- */
.chat-avatar-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid #881337;
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.5;
    z-index: -1;
}
.chat-bubble {
    animation: bounce-slight 3s infinite;
}

/* 动画关键帧 */
@keyframes ping-slow {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes bounce-slight {
    0%, 100% { transform: translateY(-5%); }
    50% { transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 淡入上升动画类 */
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* 聊天窗口过渡 */
.fade-in-up-enter-active {
    animation: fadeInUp 0.3s ease-out;
}
.fade-in-up-leave-active {
    animation: fadeInUp 0.3s ease-out reverse;
}

/* SEO Footer Text: keep heading semantics but render like normal text */
.seo-footer-text {
    line-height: 1.8;
    --seo-img-gap: 16px;
    --seo-img-radius: 12px;
    --seo-img-aspect: 4 / 3;
    --seo-hero-aspect: 16 / 9;
    --seo-img-fit: cover;
}

.seo-footer-text h1,
.seo-footer-text h2,
.seo-footer-text h3,
.seo-footer-text h4,
.seo-footer-text h5,
.seo-footer-text h6 {
    font-size: 36px;
    font-weight: bold;
    line-height: inherit;
    margin: 0;
    margin-top: 14px;
}

.seo-footer-text h1:first-child,
.seo-footer-text h2:first-child,
.seo-footer-text h3:first-child,
.seo-footer-text h4:first-child,
.seo-footer-text h5:first-child,
.seo-footer-text h6:first-child {
    margin-top: 0;
}

.seo-footer-text p {
    margin: 0.5rem 0;
}

.seo-footer-text ul,
.seo-footer-text ol {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.seo-footer-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem auto;
    border-radius: var(--seo-img-radius, 12px);
}

.seo-footer-text img.seo-img-left {
    margin-left: 0;
    margin-right: auto;
}

.seo-footer-text img.seo-img-right {
    margin-left: auto;
    margin-right: 0;
}

.seo-footer-text img.seo-img-small { max-width: var(--seo-img-small, 240px); }
.seo-footer-text img.seo-img-medium { max-width: var(--seo-img-medium, 480px); }
.seo-footer-text img.seo-img-large { max-width: var(--seo-img-large, 720px); }

.seo-footer-text p.seo-img-small img { max-width: var(--seo-img-small, 240px); }
.seo-footer-text p.seo-img-medium img { max-width: var(--seo-img-medium, 480px); }
.seo-footer-text p.seo-img-large img { max-width: var(--seo-img-large, 720px); }

.seo-footer-text p.seo-img-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--seo-img-gap, 16px);
    align-items: start;
    margin: 0.75rem 0;
}

.seo-footer-text p.seo-img-row img {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: var(--seo-img-aspect, 4 / 3);
    object-fit: var(--seo-img-fit, cover);
    border-radius: var(--seo-img-radius, 12px);
    display: block;
    margin: 0;
}

@media (max-width: 900px) {
    .seo-footer-text p.seo-img-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .seo-footer-text p.seo-img-row { grid-template-columns: 1fr; }
}

.seo-footer-text p.seo-img-row img.seo-img-hero {
    grid-column: 1 / -1;
    aspect-ratio: var(--seo-hero-aspect, 16 / 9);
}

.seo-footer-text p.seo-caption {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.95em;
    opacity: 0.9;
}

/* News body rich text styling */
.news-body {
    line-height: 1.8;
    --seo-img-gap: 16px;
    --seo-img-radius: 12px;
    --seo-img-aspect: 4 / 3;
    --seo-hero-aspect: 16 / 9;
    --seo-img-fit: cover;
}

.news-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem auto;
    border-radius: var(--seo-img-radius, 12px);
}

.news-body img.seo-img-left {
    margin-left: 0;
    margin-right: auto;
}

.news-body img.seo-img-right {
    margin-left: auto;
    margin-right: 0;
}

.news-body img.seo-img-small { max-width: var(--seo-img-small, 240px); }
.news-body img.seo-img-medium { max-width: var(--seo-img-medium, 480px); }
.news-body img.seo-img-large { max-width: var(--seo-img-large, 720px); }

.news-body p.seo-img-small img { max-width: var(--seo-img-small, 240px); }
.news-body p.seo-img-medium img { max-width: var(--seo-img-medium, 480px); }
.news-body p.seo-img-large img { max-width: var(--seo-img-large, 720px); }

.news-body p.seo-img-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--seo-img-gap, 16px);
    align-items: start;
    margin: 0.75rem 0;
}

.news-body p.seo-img-row img {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: var(--seo-img-aspect, 4 / 3);
    object-fit: var(--seo-img-fit, cover);
    border-radius: var(--seo-img-radius, 12px);
    display: block;
    margin: 0;
}

@media (max-width: 900px) {
    .news-body p.seo-img-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .news-body p.seo-img-row { grid-template-columns: 1fr; }
}

.news-body p.seo-img-row img.seo-img-hero {
    grid-column: 1 / -1;
    aspect-ratio: var(--seo-hero-aspect, 16 / 9);
}

.news-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.25rem 0 0.75rem;
    color: #111827;
}

.news-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 1rem 0 0.5rem;
    color: #111827;
}

.news-body h4 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0.75rem 0 0.25rem;
    color: #111827;
}

.news-body h5 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0.75rem 0 0.25rem;
    color: #111827;
}

.news-body h6 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0.75rem 0 0.25rem;
    color: #111827;
}

.news-body p {
    margin: 0.5rem 0;
}

.news-body ul,
.news-body ol {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.news-body a {
    color: #881337;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
}

.news-body a:hover {
    color: #500724;
}
