/* 圣宠宠物培训学校 - 新闻详情页样式（优化版） */

/* 全局样式 */
* {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
}



/* 文章容器优化 */
article {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* 文章标题优化 */
#newsTitle {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    letter-spacing: -0.5px;
    font-weight: 800;
}

/* 文章信息栏优化 */
.flex.flex-wrap.items-center.gap-4 {
    position: relative;
    padding-bottom: 24px;
}

.flex.flex-wrap.items-center.gap-4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 分类标签优化 */
#newsCategory {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 特色图片优化 */
.news-featured-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    position: relative;
}

.news-featured-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

/* 图片占位符优化 */
img[src*="statics/images"] {
    position: relative;
}

img[src*="statics/images"]::after {
    content: '🐾';
    font-size: 4rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 文章内容样式优化 */
.news-content {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
    letter-spacing: 0.2px;
}

.news-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.news-content h2 {
    position: relative;
    padding-left: 20px;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 28px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.news-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.news-content ul, .news-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.news-content li {
    margin-bottom: 0.75rem;
    position: relative;
}

.news-content li::marker {
    color: #667eea;
    font-weight: 700;
}

.news-content strong {
    color: #667eea;
    font-weight: 700;
}

/* 引用块优化 */
.news-content .bg-blue-50 {
    position: relative;
    border-left: 4px solid #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    border-radius: 0 8px 8px 0;
}

.news-content .bg-blue-50::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -10px;
    left: 15px;
    color: #667eea;
    opacity: 0.15;
    font-family: Georgia, serif;
    font-weight: 700;
}

.news-content .bg-blue-50 p {
    font-style: italic;
    color: #475569;
    position: relative;
    z-index: 1;
}

/* 关于学校卡片优化 */
.news-content .bg-gradient-to-r {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.news-content .bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.news-content .bg-gradient-to-r > * {
    position: relative;
    z-index: 1;
}

/* 标签样式优化 */
.rounded-full {
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.rounded-full:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

/* 分享按钮优化 */
.share-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.share-btn:hover::before {
    width: 300px;
    height: 300px;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.share-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.share-btn.bg-blue-600 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.share-btn.bg-green-600 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.share-btn.bg-gray-700 {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* 相关新闻卡片优化 */
.group {
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 12px;
    margin: 0 -12px;
}

.group:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    transform: translateX(8px);
}

.group img {
    transition: all 0.4s ease;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.group:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 侧边栏卡片优化 */
.lg\:col-span-1 .bg-white {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.lg\:col-span-1 .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* 搜索框优化 */
input[type="text"] {
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 2px solid transparent;
    font-weight: 500;
}

input[type="text"]:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 热门新闻列表优化 */
.space-y-4 li {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 8px;
    border-radius: 8px;
    margin: 0 -8px;
    margin-bottom: 2px !important;
}

.space-y-4 li:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
    transform: translateX(8px);
}

/* 排名徽章优化 */
.space-y-4 li span.flex-shrink-0 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    transition: all 0.3s ease;
}

.space-y-4 li:hover span.flex-shrink-0 {
    transform: scale(1.1) rotate(5deg);
}

/* 排名各不同背景色（覆盖 Tailwind bg-red-600） */
.space-y-4 li:nth-child(1) span.flex-shrink-0 { background-color: #ef4444; }
.space-y-4 li:nth-child(2) span.flex-shrink-0 { background-color: #f97316; }
.space-y-4 li:nth-child(3) span.flex-shrink-0 { background-color: #eab308; }
.space-y-4 li:nth-child(4) span.flex-shrink-0 { background-color: #3b82f6; }
.space-y-4 li:nth-child(5) span.flex-shrink-0 { background-color: #8b5cf6; }
.space-y-4 li:nth-child(6) span.flex-shrink-0 { background-color: #06b6d4; }
.space-y-4 li:nth-child(n+7) span.flex-shrink-0 { background-color: #9ca3af; }

/* 新闻分类链接优化 */
.border-b {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0 -12px;
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.border-b:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
    border-left: 4px solid #667eea;
    padding-left: 20px;
    transform: translateX(4px);
}

/* 联系方式卡片优化 */
.bg-gradient-to-br {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.bg-gradient-to-br > * {
    position: relative;
    z-index: 1;
}

.bg-gradient-to-br button {
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

.bg-gradient-to-br button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 返回顶部按钮优化 */
#backToTop {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    bottom: 80px;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#backToTop:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.6);
}

#backToTop:active {
    transform: translateY(-2px) scale(0.95);
}



/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 移动端菜单动画 */
#mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.active {
    max-height: 500px;
}

/* PC端容器padding */
@media (min-width: 768px) {
    main.container {
        padding-left: 111px;
        padding-right: 111px;
        max-width: none;
        margin-top: 16px;
    }

    .nav-crumbs-warp{
        padding-left: 111px;
        padding-right: 111px;
    }

}

/* 响应式优化 */
@media (max-width: 768px) {
    .news-content {
        font-size: 16px;
    }

    .news-featured-image {
        min-height: 250px;
    }

    #newsTitle {
        font-size: 1.75rem;
    }
}

/* 滚动条使用浏览器默认样式 */

/* 打印样式 */
@media print {
    nav, footer, .share-btn, #backToTop, aside {
        display: none;
    }

    body {
        background: white;
    }

    .news-content {
        font-size: 12pt;
        line-height: 1.6;
    }

    article::before {
        display: none;
    }
}

/* 通知提示优化 */
.notification {
    animation: slideInRight 0.4s ease-out;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 图片lightbox优化 */
.lightbox {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.lightbox button {
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lightbox button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}