/**
 * info-detail.css - Styles for the knowledge article detail page
 */

/* 主内容区域 */
.info-detail-content {
    padding: 60px 0;
    background-color: var(--background-secondary);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 文章标题和日期 */
.info-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.info-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 15px;
}

.info-date {
    font-size: 16px;
    color: var(--text-primary);
}

/* 主图 */
.info-main-image {
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
}

.info-main-image img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 4px; /* Optional: slight radius for images */
}

/* 文章内容 */
.info-content {
    margin-bottom: 50px;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
}

.info-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 35px 0 20px;
    line-height: 1.4; /* Added for better spacing */
}

.info-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 25px 0 15px;
    line-height: 1.4; /* Added for better spacing */
}

.info-content p {
    margin-bottom: 20px;
}

.info-content ul, .info-content ol {
    margin-bottom: 20px;
    padding-left: 25px; /* Slightly more padding for lists */
}

.info-content li {
    margin-bottom: 10px;
}

.info-content strong {
    font-weight: 700;
    color: var(--text-dark);
}

.info-content img { /* Ensure images within content are responsive */
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px; /* Optional */
}

/* 社交分享 - 更新样式使用网站主配色 */
.social-share-container {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.social-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.social-share span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 5px; /* Add some space if icons wrap next to it */
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue); /* 使用网站主配色 */
    color: var(--text-light); /* 文字颜色为白色，确保可见性 */
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease; /* 保持过渡动画 */
}

.share-icon i {
    font-size: 18px;
}

.share-icon:hover {
    background-color: var(--primary-dark-blue); /* 悬停时使用深色变体 */
    color: var(--text-light);
}

.share-icon.copied {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
}

/* 上一篇/下一篇导航 */
.info-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    margin-bottom: 20px;
    gap: 20px; /* Add gap for when they are side-by-side */
}

.prev-info, .next-info {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center text for when they stack */
    padding: 10px 15px; /* Adjust padding */
    background-color: var(--neutral-light-gray);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 4px; /* Optional: slight radius for buttons */
    flex-grow: 1; /* Allow buttons to grow if space allows, or distribute space when stacked */
    text-align: center; /* Ensure text is centered */
}

.prev-info i, .next-info i {
    font-size: 18px;
}

.prev-info i {
    margin-right: 8px;
}

.next-info i {
    margin-left: 8px;
}

.prev-info:hover, .next-info:hover {
    background-color: var(--primary-blue);
    color: var(--text-light);
}

.prev-info.disabled, .next-info.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--neutral-light-gray) !important; /* Ensure disabled style overrides hover */
    color: var(--text-primary) !important;
}

/* Tablet adjustments */
@media (max-width: 991px) {
    .info-detail-content {
        padding: 50px 0;
    }

    .info-title {
        font-size: 32px;
        line-height: 1.35;
    }

    .info-date {
        font-size: 15px;
    }

    .info-main-image {
        margin-bottom: 30px;
    }

    .info-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .info-content h3 {
        font-size: 22px;
        margin: 30px 0 18px;
    }

    .info-content h4 {
        font-size: 19px;
        margin: 22px 0 12px;
    }
    
    .social-share-container {
        padding: 25px 0;
        margin-bottom: 25px;
    }
}

/* Mobile adjustments (enhancing existing 768px breakpoint) */
@media (max-width: 768px) {
    .info-detail-content {
        padding: 40px 0;
    }
    .container {
        padding: 0 10px; /* Reduce container padding */
    }

    .info-title {
        font-size: 26px; /* Adjusted from your 28px for a bit more reduction */
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .info-date {
        font-size: 14px;
    }
    
    .info-header {
        margin-bottom: 25px;
    }

    .info-main-image {
        margin-bottom: 25px;
    }

    .info-content {
        font-size: 15px; /* Keep readable */
        line-height: 1.7;
        margin-bottom: 30px;
    }

    .info-content h3 {
        font-size: 20px; /* Adjusted from your 22px */
        margin: 25px 0 15px;
    }
    
    .info-content h4 {
        font-size: 17px; /* Adjusted from your 18px */
        margin: 20px 0 10px;
    }
    
    .social-share-container {
        padding: 20px 0;
        margin-bottom: 20px;
    }

    .social-share {
        flex-wrap: wrap; /* Existing */
        justify-content: flex-start; /* Align to start when wrapped */
        gap: 10px; /* Reduce gap slightly */
    }
    .social-share span {
        width: 100%; /* Make span full width if it's the first item */
        margin-bottom: 10px; /* Add margin if icons wrap below */
        text-align: center; /* Center the "Share:" text */
        margin-right: 0;
    }

    .info-navigation {
        margin-top: 30px;
        /* flex-direction will be column at 576px, here they might still be row or wrap */
    }
    .prev-info, .next-info {
        padding: 10px; /* Further adjust padding */
        font-size: 15px;
    }
}

/* Smaller Mobile adjustments (enhancing existing 576px breakpoint) */
@media (max-width: 576px) {
    .info-detail-content {
        padding: 30px 0;
    }

    .info-title {
        font-size: 22px; /* Adjusted from your 24px */
        line-height: 1.45;
    }

    .info-date {
        font-size: 13px;
    }
    
    .info-header {
        margin-bottom: 20px;
    }

    .info-main-image {
        margin-bottom: 20px;
    }

    .info-content {
        font-size: 14px;
        line-height: 1.65;
    }
    
    .info-content h3 {
        font-size: 19px;
        margin: 20px 0 12px;
    }
    
    .info-content h4 {
        font-size: 16px;
        margin: 18px 0 10px;
    }

    .social-share span { /* Ensure it's centered and has space */
        margin-bottom: 10px;
    }
    
    .social-share {
        justify-content: center; /* Center icons if they wrap */
    }

    .info-navigation {
        flex-direction: column; /* Existing */
        gap: 10px; /* Adjusted from your 15px for tighter spacing */
        margin-top: 25px;
    }
    
    .prev-info, .next-info {
        justify-content: center; /* Existing */
        width: 100%; /* Make buttons full width when stacked */
        flex-grow: 0; /* Reset flex-grow as they are stacked */
    }

    .prev-info i {
        margin-right: 5px; /* Reduce icon margin slightly */
    }

    .next-info i {
        margin-left: 5px; /* Reduce icon margin slightly */
    }
}
