/* ─── CSS VARIABLES ─────────────────────────────────── */
:root {
    /* Brand colors — editable via Journal Settings */
    --hf-primary:       #ab2738;
    --hf-primary-dark:  #7b1322;
    --hf-primary-rgb:   171, 39, 56;
    --hf-bg:            #f5f6fa;
    --hf-bg-gradient:   #ffe6ea;

    /* Text — fixed */
    --hf-text-rgb:      15, 23, 42;

    /* Cover / graphical tints — derived from primary */
    --hf-cover-start:   #ffe8ed;
    --hf-cover-end:     #fbd2da;
}

/* ─── BASE ───────────────────────────────────────────── */
body {
    background: radial-gradient(circle at top left, var(--hf-bg-gradient) 0, var(--hf-bg) 38%, var(--hf-bg) 100%);
    min-height: 100vh;
}

h2 { font-size: 1.25rem; }

h3 {
    color: var(--hf-primary);
    font-size: 1.25rem;
    font-weight: bold;
}

a {
    text-decoration: none;
    color: var(--hf-primary);
}

.breadcrumb a {
    color: #2a2a2a;
    text-decoration: none;
}

.link-secondary { text-decoration: none; }

/* ─── NAVBAR ─────────────────────────────────────────── */
.hf-navbar {
    background: linear-gradient(90deg, var(--hf-primary-dark), var(--hf-primary));
}

.hf-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .9rem;
}

.hf-navbar .nav-link {
    font-weight: 500;
    font-size: .9rem;
}

.hf-navbar .icon-btn {
    border-radius: 999px;
    padding: .35rem .7rem;
}

/* ─── SHELL / LAYOUT ─────────────────────────────────── */
.hf-shell {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.hf-breadcrumb { font-size: .8rem; }

/* ─── HERO ───────────────────────────────────────────── */
.hf-hero {
    border-radius: 16px;
    background: #ffffffcc;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--hf-text-rgb), 0.04);
    box-shadow: 0 18px 45px rgba(var(--hf-text-rgb), 0.09);
}

.hf-hero-gradient {
    /*
    background: radial-gradient(circle at top right, rgba(var(--hf-primary-rgb), .18), transparent 60%);
     */
}

.hf-hero-label {
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(var(--hf-text-rgb), .5);
}

/* ─── ISSUE CHIP ─────────────────────────────────────── */
.hf-issue-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: rgba(var(--hf-primary-rgb), 0.07);
    color: var(--hf-primary-dark);
    font-size: .8rem;
}

/* ─── ARTICLE CARDS ──────────────────────────────────── */
.hf-article-card {
    border-radius: 1rem;
    border: 1px solid rgba(var(--hf-text-rgb), 0.06);
    background: #fff;
    transition: transform .08s ease-out, box-shadow .1s ease-out, border-color .1s ease-out;
}

.hf-article-card:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--hf-primary-rgb), 0.3);
    box-shadow: 0 14px 30px rgba(var(--hf-text-rgb), 0.12);
}

.hf-article-type {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(var(--hf-text-rgb), 0.55);
}

.hf-section-title {
    font-size: .9rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(var(--hf-text-rgb), 0.55);
    font-weight: 600;
}

/* ─── CHIPS & BADGES ─────────────────────────────────── */
.hf-soft-chip {
    font-size: .7rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: rgba(var(--hf-text-rgb), 0.7);
}

.hf-open-access {
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
}

/* ─── GRAPHICAL ABSTRACT ─────────────────────────────── */
.hf-graphical-thumb-wrapper {
    border-radius: .85rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hf-cover-start), var(--hf-cover-end));
    position: relative;
    cursor: zoom-in;
}

.hf-graphical-thumb-wrapper img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.hf-graphical-tag {
    position: absolute;
    bottom: .35rem;
    right: .45rem;
    padding: .18rem .4rem;
    border-radius: 999px;
    font-size: .65rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--hf-primary-dark);
    display: inline-flex;
    align-items: center;
    gap: .15rem;
}

.hf-graphical-wrapper {
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hf-cover-start), var(--hf-cover-end));
    cursor: zoom-in;
    max-width: 500px;
    margin: 0 auto;
}

.hf-graphical-wrapper img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-width: 500px;
    margin: 0 auto;
}

.hf-graphical-label {
    font-size: .8rem;
    color: rgba(var(--hf-text-rgb), .7);
}

/* ─── JOURNAL COVER ──────────────────────────────────── */
.hf-cover-image {
    border-radius: .75rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hf-cover-start), var(--hf-cover-end));
    max-width: 200px;
    margin: 0 auto;
}

.hf-cover-image img {
    width: 100%;
    display: block;
}

/* ─── SEARCH OFFCANVAS ───────────────────────────────── */
.offcanvas-hf-search {
    height: auto;
    max-height: 70vh;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 18px 40px rgba(var(--hf-text-rgb), 0.28);
}

.hf-search-input-group {
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(var(--hf-text-rgb), 0.15);
}

.hf-search-input-group .form-control {
    border: none;
    box-shadow: none;
}

.hf-search-shortcuts span {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: rgba(var(--hf-text-rgb), 0.75);
}

/* ─── MOST READ OFFCANVAS ────────────────────────────── */
.offcanvas-hf-mostread {
    width: min(380px, 100vw);
}

.hf-most-list-item {
    padding: .5rem 0;
    border-bottom: 1px dashed rgba(148, 163, 184, .4);
}

.hf-most-list-item:last-child { border-bottom: none; }

.hf-most-chip {
    font-size: .7rem;
    color: rgba(var(--hf-text-rgb), .55);
}

/* ─── ARTICLE DETAIL ─────────────────────────────────── */
.hf-article-header {
    border-radius: 16px;
    background: #ffffffdd;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--hf-text-rgb), 0.04);
    box-shadow: 0 18px 45px rgba(var(--hf-text-rgb), 0.08);
}

.hf-aside-card { border-radius: 1rem; }

.hf-toc {
    border-left: 2px solid rgba(148, 163, 184, 0.4);
    padding-left: .75rem;
}

.hf-toc a { font-size: .85rem; }

.hf-content h2,
.hf-content h3,
.hf-content h4 { margin-bottom: .75rem; }

.hf-content p  { margin-bottom: .75rem; }
.hf-content li { margin-bottom: .35rem; }

.article-fulltext p { font-size: .875em; }

/* ─── ARCHIVE ────────────────────────────────────────── */
.hf-archive-year {
    font-size: .9rem;
    font-weight: 600;
}

.hf-archive-year small {
    font-weight: 400;
    color: rgba(var(--hf-text-rgb), .6);
}

.hf-archive-card {
    border-radius: 1rem;
    border: 1px solid rgba(var(--hf-text-rgb), 0.06);
    background: #fff;
    transition: box-shadow .1s ease-out, transform .08s ease-out, border-color .1s ease-out;
}

.hf-archive-card:hover {
    box-shadow: 0 14px 30px rgba(var(--hf-text-rgb), 0.12);
    transform: translateY(-1px);
    border-color: rgba(var(--hf-primary-rgb), .28);
}

.hf-archive-issue-badge {
    font-size: .75rem;
    border-radius: 999px;
}

.hf-archive-issue-meta {
    font-size: .8rem;
    color: rgba(var(--hf-text-rgb), .6);
}

/* ─── PAGINATION ─────────────────────────────────────── */
.pagination {
    gap: .2rem;
    flex-wrap: wrap;
}

.page-item .page-link {
    border-radius: 6px !important;
    border: 1px solid rgba(var(--hf-text-rgb), 0.1);
    color: rgba(var(--hf-text-rgb), 0.7);
    font-size: .82rem;
    padding: .35rem .65rem;
    line-height: 1.4;
    background: #fff;
    transition: background .12s, border-color .12s, color .12s;
}

.page-item .page-link:hover {
    background: rgba(var(--hf-primary-rgb), 0.06);
    border-color: rgba(var(--hf-primary-rgb), 0.3);
    color: var(--hf-primary);
}

.page-item.active .page-link {
    background: var(--hf-primary);
    border-color: var(--hf-primary);
    color: #fff;
    font-weight: 600;
}

.page-item.disabled .page-link {
    background: transparent;
    border-color: rgba(var(--hf-text-rgb), 0.07);
    color: rgba(var(--hf-text-rgb), 0.28);
    pointer-events: none;
}

/* ─── CARDS & MODALS ─────────────────────────────────── */
.card {
    border: 1px solid rgba(17, 24, 39, .10);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
    box-shadow: 0 10px 28px rgba(17, 24, 39, .08);
    overflow: unset;
    margin-bottom: 16px;
}

.card .card-body {
    padding: 18px 18px 16px;
    position: relative;
}

.cite-modal .modal-header {
    background: linear-gradient(135deg, var(--hf-primary), var(--hf-primary));
    color: white;
    padding: 20px;
    position: relative;
}

.cite-modal .modal-header .btn-close {
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}

.cite-modal .tab-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.journal-format {
    background-color: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.journal-format h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.journal-details {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

/* ─── INFO STACK ─────────────────────────────────────── */
.hf-info-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hf-info-row {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    background: #fff;
}

.hf-info-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .04);
    flex: 0 0 auto;
}

.hf-info-ico i { font-size: 18px; }

.hf-info-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: rgba(0, 0, 0, .55);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.hf-info-text {
    font-size: 14px;
    color: rgba(0, 0, 0, .86);
}

.hf-info-text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 0, 0, .25);
}

.hf-info-text a:hover { border-bottom-color: rgba(0, 0, 0, .55); }

.hf-publisher-logo {
    max-width: 190px;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: .92;
}

/* ─── GRAPHICAL ABSTRACT SWIPER ──────────────────────── */
.hf-ga-swiper {
    padding: 12px 36px;
    width: 100%;
}

.hf-ga-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    padding: 8px;
    height: 190px;
}

@media (min-width: 768px)  { .hf-ga-item { height: 240px; } }
@media (min-width: 992px)  { .hf-ga-item { height: 260px; } }

.hf-ga-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hf-ga-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    transition: transform .12s ease, box-shadow .12s ease;
}

.hf-ga-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
}

.hf-ga-btn i { font-size: 18px; line-height: 1; }

.hf-ga-btn.swiper-button-disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hf-ga-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #111;
    opacity: .35;
    transition: opacity .2s ease;
    z-index: 5;
}

.hf-ga-prev { left: 8px; }
.hf-ga-next { right: 8px; }
.hf-ga-arrow i { font-size: 1.25rem; line-height: 1; }
.hf-ga-swiper:hover .hf-ga-arrow { opacity: .85; }

@media (max-width: 767.98px) {
    .hf-ga-arrow { opacity: .7; }
    .hf-ga-item  { height: 220px; }
}

/* ─── SOCIAL LINKS ───────────────────────────────────── */
.hf-social-link {
    padding: 6px 12px;
    border-radius: 6px;
    color: #212529;
    transition: all 0.25s ease;
}

.hf-social-link i {
    transition: transform 0.25s ease;
    color: #6c757d;
}

.hf-social-link:hover {
    background-color: #f8f9fa;
    color: #000;
}

.hf-social-link:hover i.bi-chevron-right { transform: translateX(4px); }
.hf-social-link:hover i.bi-linkedin,
.hf-social-link:hover i.bi-twitter-x     { color: #000; }

/* ─── JATS ───────────────────────────────────────────── */
.jats-title        { font-size: 1.6rem; line-height: 1.25; margin-bottom: .5rem; }
.jats-meta         { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.jats-pill         { font-size: .85rem; padding: .25rem .5rem; border: 1px solid #e9ecef; border-radius: 999px; background: #f8f9fa; }
.jats-authors      { margin-bottom: .75rem; color: #343a40; }
.jats-affiliations { margin-bottom: 1.25rem; font-size: .9rem; color: #6c757d; }
.jats-abstract     { padding: 1rem; border: 1px solid #e9ecef; border-radius: .75rem; background: #fbfcfd; margin: 1rem 0; }
.jats-sec          { margin: 1.25rem 0; }
.jats-sec-title    { font-size: 1.2rem; margin-bottom: .5rem; }
.jats-fig          { margin: 1rem 0; padding: 1rem; border: 1px solid #e9ecef; border-radius: .75rem; }
.jats-fig-img      { text-align: left; margin-bottom: .75rem; }
.jats-fig-img img  { border-radius: .5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); object-fit: contain; background: #f8f9fa; }
.jats-fig-thumb    { max-height: 180px; width: auto; cursor: zoom-in; transition: transform .2s ease; }
.jats-fig-thumb:hover { transform: scale(1.02); }
.jats-fig figcaption { font-size: .875rem; color: #495057; }
.jats-table        { margin: 1rem 0; font-size: .8rem; }
.jats-table .table-responsive { overflow-x: auto; border: 1px solid #e9ecef; border-radius: .5rem; max-height: 520px; }
.jats-table table        { margin: 0 !important; border-collapse: collapse; width: 100%; }
.jats-table thead th     { background: #f8f9fa; font-weight: 600; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.jats-table tbody tr:nth-child(even) { background: #fbfcfd; }
.jats-table tbody td     { vertical-align: middle; }
.jats-refs ol      { padding-left: 1.2rem; font-size: .875em; }

/* ─── TOC ────────────────────────────────────────────── */
.toc-card   { position: sticky; top: 90px; }
.toc-scroll { max-height: 55vh; overflow: auto; padding-right: 6px; }

.toc-link {
    padding: 8px 10px;
    border-radius: 8px;
    color: #212529;
    transition: all .2s ease;
}

.toc-link:hover { background: #f8f9fa; color: #000; }
.toc-link:hover i { transform: translateX(3px); transition: transform .2s ease; }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer-ai-note       { opacity: .72; max-width: 900px; }
.footer-ai-note small { font-size: .72rem; letter-spacing: .1px; }

/* ─── ARTICLE STATISTICS ─────────────────────────────── */
.article-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: .75rem;
}

.article-stats-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(var(--hf-text-rgb), 0.05);
}

.article-stats-item i {
    font-size: .85rem;
    color: var(--hf-primary);
    flex-shrink: 0;
}

.article-stats-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.article-stats-value {
    font-size: .88rem;
    font-weight: 700;
    color: rgba(var(--hf-text-rgb), 0.85);
}

.article-stats-name {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(var(--hf-text-rgb), 0.45);
}

/* ─── SHORTCODE: [[index_list]] ──────────────────────── */
.hf-index-grid { margin-top: .5rem; }

.hf-index-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem .75rem;
    border: 1px solid rgba(var(--hf-text-rgb), 0.07);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    text-decoration: none;
    color: rgba(var(--hf-text-rgb), 0.75);
    transition: border-color .12s, box-shadow .12s, transform .1s;
    height: 100%;
    min-height: 90px;
}

a.hf-index-item:hover {
    border-color: rgba(var(--hf-primary-rgb), 0.25);
    box-shadow: 0 4px 16px rgba(var(--hf-text-rgb), 0.08);
    transform: translateY(-1px);
    color: rgba(var(--hf-text-rgb), 0.85);
}

.hf-index-item img {
    max-height: 40px;
    max-width: 110px;
    width: auto;
    object-fit: contain;
}

.hf-index-item span {
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.3;
}

.hf-index-item span small {
    display: block;
    font-size: .68rem;
    color: rgba(var(--hf-text-rgb), 0.4);
    font-weight: 400;
    margin-top: .1rem;
}

/* ─── SHORTCODE: [[editorial_board]] ────────────────── */
.editorial-section       { margin-bottom: 1rem; }

.editorial-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hf-primary);
    border-bottom: 2px solid rgba(var(--hf-primary-rgb), 0.15);
    padding-bottom: .45rem;
    margin-bottom: 1rem;
}

.editorial-card {
    border: 1px solid rgba(var(--hf-text-rgb), 0.08);
    border-radius: 10px;
    box-shadow: none;
    transition: box-shadow .12s;
}

.editorial-card:hover { box-shadow: 0 2px 12px rgba(var(--hf-text-rgb), 0.07); }

.editor-photo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(var(--hf-text-rgb), 0.08);
}

.editor-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(var(--hf-primary-rgb), 0.09);
    color: var(--hf-primary);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.editor-body    { flex: 1; min-width: 0; }

.editor-name {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: rgba(var(--hf-text-rgb), 0.9);
}

.editor-name a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.editor-name a:hover { color: var(--hf-primary); }

.orcid-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.editor-role {
    font-size: .78rem;
    color: var(--hf-primary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem;
}

.editor-institution {
    font-size: .82rem;
    color: rgba(var(--hf-text-rgb), 0.6);
    margin-bottom: .25rem;
    font-weight: normal;
}

.editor-meta {
    font-size: .82rem;
    color: rgba(var(--hf-text-rgb), 0.7);
    margin-bottom: .2rem;
    font-weight: normal;
}

.editor-meta a { color: var(--hf-primary); }

.editor-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .55rem;
}

.editor-links .btn-outline-secondary {
    font-size: .73rem;
    padding: .2rem .55rem;
    border-color: rgba(var(--hf-text-rgb), 0.2);
    color: rgba(var(--hf-text-rgb), 0.6);
    border-radius: 5px;
}

.editor-links .btn-outline-secondary:hover {
    background: rgba(var(--hf-text-rgb), 0.06);
    border-color: rgba(var(--hf-text-rgb), 0.35);
    color: rgba(var(--hf-text-rgb), 0.9);
}

@media (max-width: 575px) {
    .editor-photo,
    .editor-avatar { width: 52px; height: 52px; font-size: 1rem; }
}
