/* 自定义样式 */
body {
    font-family: 'Noto Serif SC', serif;
}

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

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

/* 隐藏滚动条 */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* 图片悬停效果 */
.art-image {
    transition: transform 0.5s ease;
}

.art-card:hover .art-image {
    transform: scale(1.1);
}

/* Banner 响应式样式 */
.banner-img {
    width: 100%;
    max-width: 1920px;
}

/* 桌面端：保持原始比例展示 */
@media (min-width: 768px) {
    .banner-img {
        object-fit: contain;
        max-height: 350px;
    }
}

/* 移动端：平铺填充 + 居中裁剪 */
@media (max-width: 767px) {
    .banner-img {
        object-fit: cover;
        object-position: center center;
        max-height: 200px;
        min-height: 150px;
    }
}

/* 导航栏样式 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 桌面端：保持原始比例展示 */
@media (min-width: 768px) {
    .banner-img {
        object-fit: contain;
        max-height: 350px;
    }
}

/* 移动端：平铺填充 + 居中裁剪 */
@media (max-width: 767px) {
    .banner-img {
        object-fit: cover;
        object-position: center center;
        max-height: 200px;
        min-height: 150px;
    }
}

/* 桌面端：保持原始比例展示 */
/* 移动端导航栏统一深灰背景 */
@media (max-width: 1279px) {
    .navbar {
        background-color: #1f2937;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
}

/* 按钮样式 */
.btn-primary {
    background-color: #8b0000;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #6b0000;
}

/* 导航菜单激活状态 */
.nav-item {
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    color: #333;
}

@media (min-width: 1280px) {
    .nav-item:hover {
        background-color: #8b0000;
        color: white;
    }

    .nav-item.active {
        background-color: #8b0000;
        color: white;
    }

    .nav-item:hover,
    .nav-item.active {
        color: white;
    }

    .group:hover .nav-item {
        background-color: #8b0000;
        color: white;
    }
}

/* 1280px - 1536px 分辨率范围内的导航优化 */
@media (min-width: 1280px) and (max-width: 1535px) {
    .nav-item {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.875rem;
    }
}

/* 桌面端下拉菜单激活状态 */
@media (min-width: 1280px) {
    .group:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}



.dropdown-menu a:hover {
    background-color: #8b0000;
    color: white;
}

/* 桌面端下拉菜单项居中显示 */
@media (min-width: 1280px) {
    .absolute.top-full.left-0.mt-0.bg-white.shadow-lg.rounded-md.py-2 a {
        text-align: center;
    }
    
    /* 下拉菜单宽度与父栏目同宽 */
    .relative.group.flex.items-stretch .absolute.top-full.left-0.mt-0.bg-white.shadow-lg.rounded-md.py-2 {
        width: 100%;
        min-width: max-content;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 767px) {
    .flex.items-center.gap-3 h1 {
        font-size: 1rem;
    }
    .flex.items-center.gap-3 p {
        font-size: 0.6rem;
    }
    .flex.items-center.gap-3 img {
        height: 48px;
    }
}

/* 小屏幕移动端 logo 文字适配 */
@media (max-width: 360px) {
    .flex.items-center.gap-3 h1 {
        font-size: 0.8rem;
    }
    .flex.items-center.gap-3 p {
        font-size: 0.5rem;
    }
    .flex.items-center.gap-3 img {
        height: 40px;
    }
}

/* 移动端 banner 图片高度调整 */
@media (max-width: 767px) {
    .banner-slider {
        min-height: 300px;
    }
    .banner-slider img {
        height: 300px;
        object-fit: cover;
    }
}

/* 小屏幕移动端 banner 图片高度调整 */
@media (max-width: 360px) {
    .banner-slider {
        min-height: 250px;
    }
    .banner-slider img {
        height: 250px;
        object-fit: cover;
    }
}

/* 移动端菜单激活样式 */
#mobile-menu .nav-item {
    transition: background-color 0.3s ease, color 0.3s ease;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#mobile-menu .nav-item:active,
#mobile-menu .nav-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

#mobile-menu .nav-item.active {
    background-color: #8b0000;
    color: white;
    border-bottom-color: #8b0000;
}

/* 移动端菜单滑入动画 */
#mobile-menu:not(.hidden) {
    animation: slideDown 0.25s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端下拉箭头旋转动画 */
#mobile-menu .fa-caret-down,
#mobile-menu .fa-caret-up {
    transition: transform 0.3s ease;
}

/* 移动端下拉子项样式 */
#mobile-menu .mobile-dropdown {
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

#mobile-menu .mobile-dropdown a {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border-left: 3px solid transparent;
    color: #aaa;
}

#mobile-menu .mobile-dropdown a:hover {
    background-color: #8b0000;
    color: white;
    border-left-color: #ffd700;
}

#mobile-menu .mobile-dropdown a:active {
    background-color: #a00000;
    color: white;
}

/* 移动端菜单滚动条样式 */
#mobile-menu .max-h-\\[70vh\\]::-webkit-scrollbar {
    width: 4px;
}

#mobile-menu .max-h-\\[70vh\\]::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* 卡片样式 */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 资讯列表样式 */
.news-item {
    transition: all 0.3s ease;
}

.news-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #f9f9f9;
}

/* 阅读更多链接右对齐 */
.news-item > div > a:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 桌面端新闻列表图片样式 */
@media (min-width: 768px) {
    .news-item > div.flex > div:first-child {
        padding: 20px 0;
        padding-left: 20px;
    }
    
    .news-item > div.flex > div:first-child img {
        height: 192px !important;
    }
}

/* 移动端新闻列表样式统一 */
@media (max-width: 767px) {
    /* 有图片的新闻项 */
    .news-item > div.flex {
        flex-direction: row !important;
        align-items: flex-start;
    }
    
    .news-item > div.flex > div:first-child {
        width: 30% !important;
        flex-shrink: 0;
        padding: 0;
        margin-top: 16px;
    }
    
    .news-item > div.flex > div:first-child img {
        width: 100% !important;
        height: 100px !important;
        object-fit: cover;
    }
    
    .news-item > div.flex > div:last-child {
        width: 70% !important;
        padding-left: 12px;
    }
    
    /* 所有新闻标题字体大小统一 */
    .news-item h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        margin-top: 0;
    }
    
    .news-item h3 a {
    }
    
    .news-item h3 a:hover {
    }
    
    /* 新闻摘要样式 */
    .news-item .news-excerpt {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* 底部信息样式 */
    .news-item .flex.justify-between {
        font-size: 0.7rem;
    }
}

.news-date {
    color: #999;
    font-size: 0.875rem;
}

.news-excerpt {
    color: #666;
    line-height: 1.6;
}

.news-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background-color: #f5f5f5;
    color: #666;
    transition: all 0.3s ease;
}

.news-tag:hover,
.news-tag.active {
    background-color: #8b0000;
    color: white;
}

/* ========================================
   文章内容样式自定义
   ======================================== */
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block !important;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    float: none !important;
}

/* 正文字体、大小、行高调整 */
.article-content {
    font-size: 1.25rem;
    line-height: 2.2;
    color: #333;
    font-family: 'Noto Serif SC', 'Microsoft YaHei', serif;
}

.article-content p {
    margin-bottom: 1.75rem;
    text-align: justify;
}

.article-content h2, .article-content h3, .article-content h4 {
    color: #1a1a1a;
    font-weight: bold;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
