/* ============================================
   INITIALISE Publications Styles
   Grant No. 101094099
   ============================================ */

/* ── Wrapper ─────────────────────────────── */
.initialise-publications {
    /* max-width: 900px; */
    margin: 0 auto;
    font-family: inherit;
}

/* ── Count bar ───────────────────────────── */
.pub-count-bar {
    background: #f0f4ff;
    border: 1px solid #d0d9f0;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pub-count {
    margin: 0;
    font-size: 0.95em;
    color: #333;
}

.pub-source {
    margin: 0;
    font-size: 0.80em;
    color: #888;
}

.pub-source a {
    color: #003399;
    text-decoration: none;
}

.pub-source a:hover {
    text-decoration: underline;
}

/* ── Page indicator ──────────────────────── */
.pub-page-indicator {
    text-align: right;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

/* ── List reset ──────────────────────────── */
.publications-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

/* ── Publication card ────────────────────── */
.publication-item {
    padding: 22px;
    margin-bottom: 20px;
    /* border-left: 5px solid #003399; */
    background: #ffffff;
    border-radius: 0 8px 8px 0;
    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07); */
    transition: box-shadow 0.2s ease;
}

/* .publication-item:hover {
    box-shadow: 0 4px 14px rgba(0, 51, 153, 0.15);
} */

/* ── Top row ─────────────────────────────── */
.pub-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* ── OA Badge ────────────────────────────── */
.oa-badge {
    display: inline-block;
    background: #28a745;
    color: #ffffff;
    font-size: 0.72em;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

/* ── Year ────────────────────────────────── */
.pub-year {
    font-size: 0.85em;
    color: #888;
    font-weight: bold;
}

/* ── Title ───────────────────────────────── */
.pub-title {
    font-size: 1.05em;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.pub-title a {
    color: #003399;
    text-decoration: none;
}

.pub-title a:hover {
    text-decoration: underline;
    color: #0055cc;
}

/* ── Authors ─────────────────────────────── */
.pub-authors {
    font-size: 0.88em;
    color: #444;
    margin: 0 0 5px 0;
    line-height: 1.5;
}

/* ── Journal ─────────────────────────────── */
.pub-journal {
    font-size: 0.88em;
    color: #666;
    margin: 0 0 5px 0;
}

/* ── DOI ─────────────────────────────────── */
.pub-doi {
    font-size: 0.82em;
    color: #999;
    margin: 0 0 10px 0;
}

.pub-doi a {
    color: #999;
    text-decoration: none;
}

.pub-doi a:hover {
    text-decoration: underline;
}

/* ── Abstract ────────────────────────────── */
.pub-abstract {
    font-size: 0.88em;
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* ── Full text button ────────────────────── */
.pub-fulltext-btn {
    display: inline-block;
    margin-top: 10px;
    background: #003399;
    color: #ffffff;
    font-size: 0.82em;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pub-fulltext-btn:hover {
    background: #0055cc;
    color: #ffffff;
    text-decoration: none;
}

/* ── Error / No results ──────────────────── */
.pub-error {
    padding: 15px;
    background: #fff3f3;
    border-left: 4px solid #cc0000;
    color: #cc0000;
    border-radius: 0 5px 5px 0;
}

.pub-no-results {
    padding: 20px;
    background: #fffbf0;
    border-left: 4px solid #ffaa00;
    border-radius: 0 5px 5px 0;
    list-style: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.pub-pagination {
    margin: 30px 0;
    text-align: center;
}

.pub-pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.pub-page-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #ffffff;
    color: #003399;
    border: 1px solid #003399;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pub-page-btn:hover {
    background: #003399;
    color: #ffffff;
    text-decoration: none;
}

.pub-page-btn.active {
    background: #003399;
    color: #ffffff;
    cursor: default;
    pointer-events: none;
}

.pub-page-btn.prev-btn,
.pub-page-btn.next-btn {
    padding: 8px 18px;
    background: #f0f4ff;
}

.pub-page-btn.prev-btn:hover,
.pub-page-btn.next-btn:hover {
    background: #003399;
    color: #ffffff;
}

.pub-page-dots {
    font-size: 1em;
    color: #aaa;
    padding: 0 5px;
}

/* ============================================
   LATEST PUBLICATIONS (FRONT PAGE)
   ============================================ */

/* Header row */
.latest-pub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #003399;
    padding-bottom: 10px;
}

.latest-pub-title {
    font-size: 1.4em;
    color: #003399;
    margin: 0;
}

/* View all button */
.view-all-btn {
    display: inline-block;
    background: #003399;
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.view-all-btn:hover {
    background: #0055cc;
    color: #ffffff;
    text-decoration: none;
}

/* Latest list - smaller cards */
.publications-list--latest .publication-item {
    border-left-width: 4px;
    padding: 16px 18px;
    margin-bottom: 15px;
}

.publications-list--latest .pub-abstract {
    display: none; /* hide abstract on front page */
}

/* Footer link */
.latest-pub-footer {
    text-align: center;
    margin-top: 10px;
}

.view-all-btn-footer {
    color: #003399;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95em;
}

.view-all-btn-footer:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {

    .pub-count-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .publication-item {
        padding: 15px;
    }

    .pub-title {
        font-size: 0.98em;
    }

    .pub-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .pub-pagination-list {
        gap: 4px;
    }

    .pub-page-btn {
        padding: 6px 10px;
        font-size: 0.82em;
    }

    .latest-pub-header {
        flex-direction: column;
        align-items: flex-start;
    }
}