/* solar_storage theme helpers */
html {
    scroll-behavior: smooth;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.05);
}

.text-gradient-primary {
    background: linear-gradient(135deg, #001e40 0%, #003366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-card-hover:hover {
    transform: translateY(-8px);
    transition: transform 0.3s ease-in-out;
}

/* 主导航当前页样式 */
#site-nav a.is-active,
#site-nav a.active {
    color: #001e40;
    font-weight: 700;
    border-bottom: 2px solid #006e1c;
    padding-bottom: 2px;
}

#mobile-nav a.is-active,
#mobile-nav a.active {
    color: #001e40;
    font-weight: 700;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

/* 章节标题 */
.article-content h3 {
    font-family: Montserrat, sans-serif;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    color: #001e40;
    margin: 2rem 0 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid #006e1c;
}

.article-content h3:first-child {
    margin-top: 0.5rem;
}

/* 产品特点列表：多列 + 勾选 */
.article-content ul {
    list-style: none;
    margin: 0 0 2rem;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    background: #f2f4f6;
    border: 1px solid #e0e3e5;
    border-radius: 0.5rem;
}

.article-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.625rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: #43474f;
}

.article-content ul li::before {
    font-family: "Material Symbols Outlined";
    content: "check_circle";
    color: #006e1c;
    font-size: 1.25rem;
    line-height: 1.2;
    flex-shrink: 0;
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

@media (max-width: 1024px) {
    .article-content ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .article-content ul {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* 文章正文表格：覆盖 Tailwind preflight 的 border-width:0 */
#article_content.article-content table,
.article-content table {
    width: 100% !important;
    margin: 1rem 0;
    border-collapse: collapse !important;
    border-spacing: 0;
}

#article_content.article-content table th,
#article_content.article-content table td,
.article-content table th,
.article-content table td {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #c3c6d1 !important;
    padding: 0.625rem 0.75rem !important;
    text-align: left;
    vertical-align: top;
}

#article_content.article-content table th,
.article-content table th {
    background: #f2f4f6 !important;
    font-weight: 600;
    color: #001e40;
}

#article_content.article-content table tr:nth-child(even) td,
.article-content table tr:nth-child(even) td {
    background: #fafafb;
}

/* 新闻列表 */
.news-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.08);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 新闻列表分页（Bootstrap：直接输出 li.page-item，无外层 ul） */
.news-pagination {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 1.5rem 0 2rem;
    list-style: none;
}

.news-pagination > .page-item,
.news-pagination .page-item {
    display: block;
    float: none !important;
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.news-pagination .page-item::marker,
.news-pagination .page-item::before {
    content: none !important;
    display: none !important;
}

.news-pagination .page-item .page-link,
.news-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.9rem;
    border-radius: 0.25rem;
    border: 1px solid #c3c6d1;
    background: #fff;
    color: #191c1e;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.news-pagination .page-item.active .page-link,
.news-pagination .page-item.active > span.page-link {
    background: #001e40;
    border-color: #001e40;
    color: #fff;
}

.news-pagination .page-item.disabled .page-link {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f2f4f6;
    pointer-events: none;
}

.news-pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    border-color: #001e40;
    color: #001e40;
}

/* img 安全约束 */
img {
    max-width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

