/*
 * JNSPS Green V2.1.44
 * OJS 3.5 article-page refinements:
 *  - Similar Articles premium responsive cards
 *  - Keyword row polish (keyword data itself is fixed in article_details.tpl)
 */

/* ------------------------------
   Keywords
   ------------------------------ */
html body .obj_article_details .main_entry .item.keywords {
    margin-top: 18px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #dce9e1;
    border-left: 4px solid #0b7a3d;
    border-radius: 10px;
    background: #f8fcf9;
}

html body .obj_article_details .main_entry .item.keywords .label {
    display: inline;
    margin: 0 6px 0 0;
    color: #163d2b;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.55;
}

html body .obj_article_details .main_entry .item.keywords .value {
    color: #334a3d;
    font-size: 0.96rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* ------------------------------
   Recommend Similar Articles plugin
   Exact upstream wrapper: #articlesBySimilarityList
   ------------------------------ */
html body .page_article #articlesBySimilarityList {
    position: relative;
    clear: both;
    width: 100%;
    box-sizing: border-box;
    margin: 34px 0 10px;
    padding: 0;
    border: 1px solid #dbe7df;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(18, 62, 40, 0.08);
    overflow: hidden;
}

html body .page_article #articlesBySimilarityList > h2,
html body .page_article #articlesBySimilarityList > h2.label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 18px 22px !important;
    border: 0 !important;
    border-bottom: 1px solid #dce9e1 !important;
    background: linear-gradient(135deg, #075e31 0%, #0b7a3d 55%, #148a4b 100%);
    color: #ffffff !important;
    font-size: 1.28rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.01em;
}

html body .page_article #articlesBySimilarityList > h2::before {
    content: "\f1ea";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    font-family: "Font Awesome 5 Free";
    font-size: 15px;
    font-weight: 900;
}

html body .page_article #articlesBySimilarityList > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 !important;
    padding: 20px 22px 18px !important;
    list-style: none !important;
    background: linear-gradient(180deg, #fbfdfc 0%, #ffffff 100%);
}

html body .page_article #articlesBySimilarityList > ul > li {
    position: relative;
    min-width: 0;
    margin: 0 !important;
    padding: 16px 16px 16px 20px !important;
    border: 1px solid #e1eae5;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(26, 62, 42, 0.045);
    color: #435348;
    font-size: 0.91rem;
    line-height: 1.55;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow-wrap: anywhere;
}

html body .page_article #articlesBySimilarityList > ul > li::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #0b7a3d;
}

html body .page_article #articlesBySimilarityList > ul > li:hover {
    transform: translateY(-2px);
    border-color: #b9d7c5;
    box-shadow: 0 9px 22px rgba(15, 91, 49, 0.10);
}

/* First link is the article title. Put it on its own line and give it visual priority. */
html body .page_article #articlesBySimilarityList > ul > li > a:first-of-type {
    display: block;
    margin: 7px 0 8px;
    color: #075e31 !important;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    text-decoration: none !important;
}

html body .page_article #articlesBySimilarityList > ul > li > a:first-of-type:hover,
html body .page_article #articlesBySimilarityList > ul > li > a:first-of-type:focus {
    color: #0b8b47 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Last link is the journal/issue metadata. */
html body .page_article #articlesBySimilarityList > ul > li > a:last-of-type:not(:first-of-type) {
    display: inline-block;
    margin-top: 2px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef7f1;
    color: #35604a !important;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none !important;
}

html body .page_article #articlesBySimilarityList > ul > li > a:last-of-type:not(:first-of-type):hover,
html body .page_article #articlesBySimilarityList > ul > li > a:last-of-type:not(:first-of-type):focus {
    background: #dff0e5;
    color: #075e31 !important;
}

/* Pagination and advanced-search footer */
html body .page_article #articlesBySimilarityPages,
html body .page_article #articlesBySimilaritySearch {
    margin: 0 !important;
    padding-left: 22px;
    padding-right: 22px;
    color: #617067;
    font-size: 0.88rem;
}

html body .page_article #articlesBySimilarityPages {
    padding-top: 15px;
    border-top: 1px solid #e4ece7;
    background: #ffffff;
}

html body .page_article #articlesBySimilaritySearch {
    padding-top: 8px;
    padding-bottom: 18px;
    background: #ffffff;
}

html body .page_article #articlesBySimilarityPages a,
html body .page_article #articlesBySimilaritySearch a {
    color: #08743a !important;
    font-weight: 600;
    text-decoration: none;
}

html body .page_article #articlesBySimilarityPages a:hover,
html body .page_article #articlesBySimilaritySearch a:hover {
    color: #05572b !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html body .page_article #articlesBySimilarityPages .cmp_pagination {
    margin: 0;
}

/* Tablet/mobile: use a single readable column and tighter spacing. */
@media (max-width: 900px) {
    html body .page_article #articlesBySimilarityList > ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    html body .page_article #articlesBySimilarityList {
        margin-top: 26px;
        border-radius: 12px;
    }

    html body .page_article #articlesBySimilarityList > h2,
    html body .page_article #articlesBySimilarityList > h2.label {
        padding: 15px 16px !important;
        font-size: 1.08rem !important;
    }

    html body .page_article #articlesBySimilarityList > h2::before {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        font-size: 13px;
    }

    html body .page_article #articlesBySimilarityList > ul {
        gap: 11px;
        padding: 14px !important;
    }

    html body .page_article #articlesBySimilarityList > ul > li {
        padding: 14px 13px 14px 17px !important;
        font-size: 0.88rem;
    }

    html body .page_article #articlesBySimilarityPages,
    html body .page_article #articlesBySimilaritySearch {
        padding-left: 15px;
        padding-right: 15px;
    }

    html body .obj_article_details .main_entry .item.keywords {
        padding: 12px 13px;
        border-radius: 8px;
    }
}
