/* Custom utilities for Tailwind CSS */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .transition-smooth {
        transition: all 0.3s ease;
    }
    .shadow-hover {
        transition: box-shadow 0.3s ease;
    }
    .shadow-hover:hover {
        box-shadow: 0 10px 25px -5px rgba(15, 76, 129, 0.1), 0 10px 10px -5px rgba(15, 76, 129, 0.04);
    }
    .display-line-clamp-5 {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
    }
}

/* Base styles */
@font-face { 
font-family: 'Open Sans'; 
src: url('../webfonts/opensans.ttf');
}
@font-face {
  font-family: 'aliPuhuiLight';
  src: url('../webfonts/AlibabaPuHuiTi-3-45-Light.otf');
}
@font-face {
  font-family: 'aliPuhuiRegular';
  src: url('../webfonts/AlibabaPuHuiTi-3-55-Regular.otf');
}
@font-face {
  font-family: 'aliPuhuiMedium';
  src: url('../webfonts/AlibabaPuHuiTi-3-65-Medium.otf');
}
@font-face {
  font-family: 'aliPuhuiBold';
  src: url('../webfonts/AlibabaPuHuiTi-3-85-Bold.otf'); 
}

body {
    font-family: 'aliPuhuiRegular', 'Noto Sans SC', 'Open Sans', 'PingFang SC', 'Microsoft YaHei', 'STHeiti', 'SimHei', 'Heiti SC', 'SimSun', 'Inter', 'Roboto', 'Montserrat', 'Lato', 'Source Sans Pro', system-ui, Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0D1B3B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* 确保Font Awesome图标能够正常显示的基础样式 */
.fa {
    display: inline-block !important;
    font: normal normal normal inherit/1 FontAwesome !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Font Awesome 6.x 兼容性支持 */
.fa, .fas, .far, .fab {
    display: inline-block !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* 手机端导航菜单样式优化 */
.mobile-dropdown-content {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 减少手机端子菜单间距 */
.mobile-dropdown-content a {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* 二级菜单样式优化 - 移除左侧边框 */
.mobile-dropdown-content {
    border-left: none !important;
}

/* 二级菜单项字体样式 */
.mobile-dropdown-content a {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
}

/* 三级菜单样式优化 */
.mobile-dropdown-content h4 {
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #0D1B3B !important;
    background-color: rgba(184, 155, 58, 0.1);
    border-radius: 4px;
}

/* 三级菜单项字体样式 */
.mobile-dropdown-content .pl-6 a {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
}

/* 三级菜单项选中/悬停状态样式 */
.mobile-dropdown-content .pl-6 a:hover {
    color: white !important;
}

/* 移除三级菜单部分的左侧边框 */
.mobile-dropdown-content .pl-6 {
    border-left: none !important;
}

/* 手机端子菜单滚动条样式 */
.mobile-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.mobile-dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mobile-dropdown-content::-webkit-scrollbar-thumb {
    background: #B89B3A;
    border-radius: 3px;
}

.mobile-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #a08432;
}

/* Carousel styles */
.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 400px; /* 默认高度，适合手机端 */
    position: relative;
}

/* 桌面端使用更大的高度 */
@media (min-width: 768px) {
    .carousel-slide {
        height: 650px;
    }
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background-color: white;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}
.why-hap {
    clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
}

/* 选项卡滚动条样式 */
.uni-tabs-scrollbar {
    padding-bottom: 10px;
}

.uni-tabs-scrollbar::-webkit-scrollbar {
    height: 5px;
}

.uni-tabs-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.uni-tabs-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.uni-tabs-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 文章内容专用样式 */
/* 确保article-content不受Tailwind影响 */
.article-content {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
    max-width: 100% !important;
}

/* 重置Tailwind prose样式影响 */
.article-content,
.article-content * {
    all: revert !important;
}

/* 重新设置文章内容基本样式 */
.article-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333333 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: justify !important;
}

/* 段落样式 */
.article-content p {
    margin-bottom: 1.2em !important;
}

/* 标题样式 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 600 !important;
    margin: 1.5em 0 0.8em 0 !important;
    line-height: 1.3 !important;
    color: #1a1a1a !important;
}

.article-content h1 {
    font-size: 2em !important;
}

.article-content h2 {
    font-size: 1.7em !important;
}

.article-content h3 {
    font-size: 1.5em !important;
}

/* 列表样式 */
.article-content ul,
.article-content ol {
    margin: 1em 0 !important;
    padding-left: 2em !important;
}

.article-content li {
    margin-bottom: 0.5em !important;
}

/* 图片样式 */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    margin: 1em 0 !important;
    display: block !important;
}

/* 链接样式 */
.article-content a {
    color: #1e3a8a !important;
    text-decoration: none !important;
}

.article-content a:hover {
    text-decoration: underline !important;
}

/* 引用样式 */
.article-content blockquote {
    margin: 1.5em 0 !important;
    padding: 0.5em 1em !important;
    border-left: 4px solid #ddd !important;
    background-color: #f9f9f9 !important;
    font-style: italic !important;
}

/* 表格样式 */
.article-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 1.5em 0 !important;
}

.article-content th,
.article-content td {
    padding: 0.8em !important;
    border: 1px solid #ddd !important;
    text-align: left !important;
}

.article-content th {
    background-color: #f5f5f5 !important;
    font-weight: 600 !important;
}

/*分页样式*/
#page{display:inline-block;padding-top:10px;padding-bottom:10px;text-align: center;margin:0 auto; overflow:hidden;clear: both;font-size: 1rem;}
#page li{background-color:#fff;border:1px solid #E5E7EB;margin-right:3px;list-style:none;float:left;color:#374151;line-height: 20px;border-radius: 0.5rem;}
#page li a{line-height: 20px;color: #374151;}
#page li.pagecount{padding:0.75rem 1.25rem;}
#page li.pre{background:#0D1B3B;border:1px solid #0D1B3B;color:#fff;padding:0.75rem 1.25rem;}
#page li.liclass{padding:0.75rem 1.25rem;cursor: not-allowed;}
#page li.uli:hover{background:#0D1B3B;border:1px solid #0D1B3B;color:#fff;cursor:pointer;display: block;}
#page li.uli a{text-decoration:none;padding:0.75rem 1.25rem;display: block;}
#page li.uli:hover a{color:#fff;text-decoration:none;padding:0.75rem 1.25rem;display: block;}