/* ============================================================
 * by 诗航软件-凯哥 2026.6.16
 * ============================================================ */

/* ============================================================
 * detail.css - 案例/文章详情页样式
 * ============================================================ */

.detail-section {
    padding: 50px 0 80px;
    background: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.detail-main {
    min-width: 0;
}

.detail-content {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.detail-title {
    font-size: 1.8rem;
    color: #1a56db;
    margin-bottom: 15px;
    line-height: 1.4;
}

.detail-meta {
    display: flex;
    gap: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #64748b;
    flex-wrap: wrap;
}

.detail-meta span {
    position: relative;
}

.detail-cover {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.detail-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-body {
    line-height: 1.8;
    color: #333;
    font-size: 1rem;
}

.detail-body h3 {
    font-size: 1.3rem;
    color: #1a56db;
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid #1a56db;
}

.detail-body p {
    margin-bottom: 18px;
    text-align: justify;
}

.detail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.detail-nav > div,
.detail-nav a {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    display: block;
}

.detail-nav a:hover {
    background: #e0ebff;
    border-color: #1a56db;
}

.detail-nav .nav-prev {
    text-align: left;
}

.detail-nav .nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommend-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.recommend-item:hover {
    background: #f8fafc;
    border-color: #1a56db;
}

.recommend-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
}

.recommend-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recommend-info h4 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-info p {
    font-size: 0.8rem;
    color: #64748b;
}

.hot-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-list li {
    counter-increment: hot;
    position: relative;
    padding-left: 25px;
}

.hot-list li::before {
    content: counter(hot);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #1a56db;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-list a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.hot-list a:hover {
    background: #e0ebff;
    color: #1a56db;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-content {
        padding: 25px 20px;
    }

    .detail-title {
        font-size: 1.4rem;
    }

    .detail-meta {
        gap: 15px;
        font-size: 0.85rem;
    }

    .detail-nav {
        grid-template-columns: 1fr;
    }

    .detail-nav .nav-next {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .detail-content {
        padding: 20px 15px;
        border-radius: 8px;
    }

    .detail-title {
        font-size: 1.2rem;
    }

    .detail-body h3 {
        font-size: 1.1rem;
        margin: 20px 0 10px;
    }

    .detail-body {
        font-size: 0.95rem;
    }

    .detail-meta {
        flex-direction: column;
        gap: 8px;
    }
}
