/* ==========================================================================
   CRYSTAL KNOWLEDGE (水晶知识) - knowledge.css
   ========================================================================== */

.knowledge-page *,
.knowledge-page *::before,
.knowledge-page *::after {
    box-sizing: border-box;
}

.knowledge-page {
    background-color: #ffffff;
    font-family: var(--font-family, 'Inter', sans-serif);
    color: #333;
    overflow-x: hidden;
}

/* ---------- Shared Container ---------- */
.knowledge-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
}

/* ==========================================================================
   1. HERO BANNER (Centered, 670px Min Height, No Overlay)
   ========================================================================== */
.knowledge-hero {
    position: relative;
    width: 100%;
    min-height: 670px;
    background: url('/assets/images/knowledge/banner.png') center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    text-align: center;
}

/* Overlay removed as requested */

.knowledge-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.knowledge-hero-inner h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 25px 0;
    letter-spacing: 2px;
    /* Added text-shadow for readability without the overlay */
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
}

.knowledge-hero-inner p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto;
    font-weight: 300;
    max-width: 800px;
    /* Added text-shadow for readability without the overlay */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   2. ARTICLE LIST
   ========================================================================== */
.knowledge-list-section {
    padding: 60px 0 40px;
    background: #ffffff;
}

.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.knowledge-card {
    display: flex;
    background: #f1f2f6;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.knowledge-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.knowledge-card-img {
    width: 240px;
    min-width: 240px;
    height: 240px;
    overflow: hidden;
    background: #e5e7eb;
}

.knowledge-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.knowledge-card:hover .knowledge-card-img img {
    transform: scale(1.05);
}

.knowledge-card-body {
    flex: 1;
    padding: 35px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.knowledge-card-body h2 {
    font-size: 1.5rem;
    color: #171c3e;
    margin: 0 0 15px 0;
    font-weight: 700;
    line-height: 1.3;
}

.knowledge-card-body p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 25px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.btn-knowledge {
    display: inline-block;
    padding: 10px 32px;
    border: 1px solid #a3907f;
    color: #a3907f;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.2s;
    align-self: flex-start;
}

.btn-knowledge:hover {
    background: #a3907f;
    color: #ffffff;
}

/* ==========================================================================
   3. PAGINATION
   ========================================================================== */
.knowledge-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.knowledge-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.knowledge-pagination a:hover {
    border-color: #cdae77;
    color: #cdae77;
}

.knowledge-pagination a.active {
    background: #cdae77;
    border-color: #cdae77;
    color: #ffffff;
}

.knowledge-pagination a.next {
    font-weight: 700;
}

.no-articles {
    text-align: center;
    color: #6b7280;
    font-size: 1.05rem;
    padding: 60px 0;
}

/* ==========================================================================
   4. RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .knowledge-hero {
        min-height: 500px;
    }
    .knowledge-hero-inner h1 { font-size: 3rem; }
    .knowledge-hero-inner p { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .knowledge-hero {
        min-height: 400px;
    }
    .knowledge-hero-inner h1 { font-size: 2.2rem; margin-bottom: 15px; }
    .knowledge-hero-inner p { font-size: 0.95rem; line-height: 1.5; }

    .knowledge-list-section {
        padding: 40px 0 30px;
    }
    .knowledge-card {
        flex-direction: column;
    }
    .knowledge-card-img {
        width: 100%;
        min-width: 100%;
        height: 220px;
    }
    .knowledge-card-body {
        padding: 25px 20px;
    }
    .knowledge-card-body h2 { font-size: 1.25rem; }
    .knowledge-card-body p { font-size: 0.95rem; max-width: 100%; }
    .btn-knowledge { padding: 9px 26px; font-size: 0.85rem; }
}