/* =============================================
   Article Library — Frontend Styles
   Matches the provided HTML layout exactly
   ============================================= */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Inter:wght@400;500;600&display=swap');

/* ── Section Wrapper ── */
.articlesection {
    font-family: 'Inter', sans-serif;
    color: #1e2a3a;
    padding: 40px 0;
}

.articlewrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Individual Article Box ── */
.articlebox {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 28px 28px 22px;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.articlebox:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* ── Title ── */
.article-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 18px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.article-title a {
    color: #1e2a3a;
    text-decoration: none;
    transition: color 0.15s;
    flex: 1;
}

.article-title a:hover {
    color: #1a5fa8;
}

/* Badge */
.al-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 3px 9px;
    white-space: nowrap;
    vertical-align: middle;
    flex-shrink: 0;
    margin-top: 4px;
}

.al-badge-new {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* ── Description row ── */
.articledescription {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

/* ── Thumbnail ── */
.articleimg {
    flex-shrink: 0;
    width: 160px;
    height: 120px;
    border-radius: 7px;
    overflow: hidden;
    background: #f0f2f5;
}

.articleimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.articlebox:hover .articleimg img {
    transform: scale(1.04);
}

.articleimg-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8ecf0;
    color: #9eacba;
    font-size: 2rem;
}

/* ── Article data ── */
.articedata {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.article-excerpt {
    font-size: 0.94rem;
    line-height: 1.7;
    color: #4a5568;
    margin: 0;
}

.article-excerpt p {
    margin: 0;
}

/* ── Download button ── */
.downloadbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a5fa8;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    align-self: flex-start;
}

.downloadbtn:hover {
    background: #154e8c;
    transform: translateY(-1px);
    color: #fff !important;
}

.downloadbtn i {
    font-size: 0.9em;
}

.al-free-tag {
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 0.75em;
    font-weight: 700;
}

/* ── Login / Members button ── */
.loginbtn,
.al-members-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #4a5568 !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 18px;
    border-radius: 6px;
    border: 2px solid #d1d9e0;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.loginbtn:hover,
.al-members-btn:hover {
    background: #e8ecf0;
    border-color: #b0bec5;
    color: #1e2a3a !important;
    transform: translateY(-1px);
}

.loginbtn i,
.al-members-btn i {
    color: #8895a7;
    font-size: 0.9em;
}

/* ── Post meta ── */
.postmeta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #8895a7;
    padding-top: 6px;
    border-top: 1px solid #f0f2f5;
}

.postmeta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.postmeta i {
    font-size: 0.85em;
    color: #b0bec5;
}

.al-meta-access {
    font-weight: 500;
}

/* ── Empty state ── */
.al-no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #8895a7;
    font-size: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #d1d9e0;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    color: #4a5568;
    background: #fff;
    border: 1px solid #d1d9e0;
    transition: all 0.15s;
}

.pagination a:hover {
    background: #1a5fa8;
    color: #fff;
    border-color: #1a5fa8;
}

.pagination a.active {
    background: #1a5fa8;
    color: #fff;
    border-color: #1a5fa8;
    font-weight: 700;
    pointer-events: none;
}

.pagination span {
    background: transparent;
    border: none;
    color: #8895a7;
    pointer-events: none;
}

.pagination a.prev,
.pagination a.next {
    font-size: 1rem;
}

/* ── Responsive ── */
@media ( max-width: 600px ) {
    .articledescription {
        flex-direction: column;
    }

    .articleimg {
        width: 100%;
        height: 180px;
    }

    .articlebox {
        padding: 20px 16px 18px;
    }

    .article-title {
        font-size: 1.05rem;
    }
}
