/* ============================================================
   OJS-UK Theme — Portal homepage
   Hero banner (v2 board) + journal directory rows (v2 "Journal
   directory" board: cover left, meta, actions right).
   ============================================================ */

/* ---------- Hero banner ---------- */
.uk-hero {
    background: transparent;
    border-bottom: 1px solid var(--uk-border);
}

.uk-hero-inner {
    padding-top: 52px;
    padding-bottom: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 52px;
    align-items: center;
}

.uk-hero-copy h1 {
    margin: 0 0 26px;
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 44px;
    line-height: 1.2;
    color: var(--uk-ink);
    letter-spacing: 0.005em;
}

.uk-hero-rule {
    display: block;
    width: 76px;
    height: 3px;
    background: var(--uk-teal);
    margin: 0 0 26px;
}

.uk-hero-copy p {
    margin: 0;
    font-family: var(--uk-serif);
    font-size: 19px;
    line-height: 1.75;
    color: #33415c;
    max-width: 34em;
}

.uk-hero-art {
    text-align: center;
}

.uk-hero-art img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* ---------- Explore our journals (directory rows) ---------- */
.uk-journals-section {
    background: transparent;
    padding: 44px 0 56px;
}


.uk-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.uk-section-heading h2 {
    margin: 0;
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 28px;
    color: var(--uk-ink);
}

.uk-arrow-link {
    font-family: var(--uk-sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--uk-red);
    white-space: nowrap;
}

.uk-arrow-link:hover {
    color: var(--uk-red-dark);
    text-decoration: underline;
}

.uk-arrow-link b {
    font-weight: 400;
    margin-left: 4px;
}

/* One journal per row */
/* Two journals per row */
.uk-journal-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

/* Compact card: cover left, main column right (title on its own full
   width row, then meta + actions side by side below) */
.uk-dir-card {
    background: transparent;
    border: 1px solid var(--uk-border);
    padding: 22px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.uk-dir-cover {
    display: block;
    flex: 0 0 104px;
    width: 104px;
    height: 139px;
    overflow: hidden;
    background: var(--uk-navy);
    border: 1px solid var(--uk-border);
}

.uk-dir-main {
    flex: 1;
    min-width: 0;
}

/* Title spans the full width of the main column — not squeezed by the
   right-hand action buttons */
.uk-dir-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.uk-dir-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uk-journal-cover-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #10405c 0%, #0a2e46 60%, #072338 100%);
    color: #fff;
    padding: 14px 12px;
}

.uk-journal-cover-placeholder span {
    font-family: var(--uk-serif);
    font-size: 14px;
    line-height: 1.4;
}

.uk-dir-title {
    margin: 0 0 10px;
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 19px;
    line-height: 1.3;
}

.uk-dir-title a {
    color: var(--uk-ink);
}

.uk-dir-title a:hover {
    color: var(--uk-red);
}

.uk-dir-meta {
    font-family: var(--uk-sans);
    font-size: 13px;
    color: var(--uk-navy);
    margin-bottom: 9px;
}

.uk-dir-meta-label {
    font-weight: 700;
    color: var(--uk-ink);
    margin-right: 10px;
}

/* The description rich text is used only as the metadata source on
   the homepage: show its ul list (ISSN / Frequency / Language /
   E-mail) two items per row, hide its prose */
.uk-dir-desc {
    font-family: var(--uk-sans);
    font-size: 13px;
    line-height: 1.6;
    color: var(--uk-navy);
    overflow-wrap: break-word;
    margin-top: 2px;
}

/* Hide all non-metadata content at any depth (prose, headings like
   "Aim and Scope", tables, images, scope lists) — the card shows ONLY
   the structured metadata list. The ilists may be nested inside a div,
   so hide by element type rather than direct-child. */
.uk-dir-desc p,
.uk-dir-desc h1,
.uk-dir-desc h2,
.uk-dir-desc h3,
.uk-dir-desc h4,
.uk-dir-desc h5,
.uk-dir-desc h6,
.uk-dir-desc table,
.uk-dir-desc img,
.uk-dir-desc blockquote,
.uk-dir-desc ol,
.uk-dir-desc ul:not(.ilists) {
    display: none;
}

/* Metadata list (ISSN / Frequency / Language / E-mail) — one per line */
.uk-dir-desc ul.ilists {
    display: block;
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.uk-dir-desc li {
    margin: 0 0 4px;
    font-size: 12.5px;
    color: var(--uk-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uk-dir-desc li strong {
    color: var(--uk-ink);
}

/* Homepage cards show only the structured meta — the long rich-text
   description is not shown here (kept for the journal home page). */
.uk-dir-prose {
    display: none;
}

.uk-dir-prose img {
    display: none;
}

/* Linearize fixed-width tables pasted from the rich-text editor
   (Chinese journals keep their whole description in a table) */
.uk-dir-prose table,
.uk-dir-prose tbody,
.uk-dir-prose tr,
.uk-dir-prose td {
    display: block;
    width: auto !important;
    height: auto !important;
    padding: 0;
    border: none;
    text-align: left !important;
}

/* Metadata list already shown above the prose — hide the duplicate */
.uk-dir-prose ul.ilists {
    display: none;
}

/* Scope/topic lists flow into responsive columns; overflow:hidden
   makes the grid box narrow beside the floated cover instead of
   sliding underneath it */
.uk-dir-prose ul {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 5px 26px;
    overflow: hidden;
}

.uk-dir-prose ul.ilists {
    display: none;
}

.uk-dir-prose li {
    margin: 0;
}

.uk-dir-prose [class*="col-"] {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
}

/* Neutralize Bootstrap grid classes pasted inside rich-text content */
.uk-dir-desc [class*="col-"] {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
}

.uk-dir-desc .ml15 {
    margin-left: 0 !important;
}

.uk-dir-desc strong {
    color: var(--uk-ink);
    font-weight: 600;
}

/* Actions as a right-hand column: View Journal on top, Current Issue below */
.uk-dir-actions {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.uk-dir-actions .uk-btn-outline {
    padding: 8px 22px;
    font-size: 13px;
    white-space: nowrap;
}

.uk-dir-actions .uk-arrow-link {
    white-space: nowrap;
}

.uk-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--uk-sans);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--uk-navy);
    border: 1px solid var(--uk-navy);
    background: transparent;
    padding: 9px 18px;
    transition: background 0.15s ease, color 0.15s ease;
}

.uk-btn-outline:hover {
    background: var(--uk-navy);
    color: #fff;
}

/* ---------- Generic site pages (submissions / custom / website / 404) ---------- */
.uk-page-container {
    padding-top: 40px;
    padding-bottom: 56px;
}

.page-title {
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 38px;
    color: var(--uk-ink);
    margin: 0 0 10px;
    padding-bottom: 18px;
    position: relative;
}

.page-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 76px;
    height: 3px;
    background: var(--uk-teal);
}

.panel.panel-default,
.journal-item {
    background: transparent;
    border: 1px solid var(--uk-border);
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 24px;
}

.panel.panel-default .panel-body {
    padding: 28px 30px;
}

.journals-list .journal-item,
.journal-item {
    padding: 26px 30px;
}

.journal-item h2,
.journal-item .journal-title {
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.35;
    margin: 0 0 12px;
}

.journal-item h2 a,
.journal-item .journal-title a {
    color: var(--uk-ink);
}

.journal-item h2 a:hover,
.journal-item .journal-title a:hover {
    color: var(--uk-red);
}

.journal-meta {
    font-family: var(--uk-sans);
    font-size: 13.5px;
    color: var(--uk-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 12px;
}

.journal-description {
    font-family: var(--uk-serif);
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--uk-text);
}

.journal-actions,
.journal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.journal-actions .btn,
.journal-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--uk-sans);
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 22px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.journal-actions .btn-primary,
.journal-links a:first-child {
    background: var(--uk-red);
    border: 1px solid var(--uk-red);
    color: #fff;
}

.journal-actions .btn-primary:hover,
.journal-links a:first-child:hover {
    background: var(--uk-red-dark);
    border-color: var(--uk-red-dark);
    color: #fff;
}

.journal-actions .btn-default,
.journal-links a:not(:first-child) {
    background: transparent;
    border: 1px solid var(--uk-navy);
    color: var(--uk-navy);
}

.journal-actions .btn-default:hover,
.journal-links a:not(:first-child):hover {
    background: var(--uk-navy);
    color: #fff;
}

.section-block {
    background: transparent;
    border: 1px solid var(--uk-border);
    padding: 24px 28px;
}

/* 404 — v2 board: centered serif 404, two-line note, paired buttons */
.uk-error-page {
    text-align: center;
    padding: 64px 15px 90px;
}

.uk-error-code {
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 88px;
    line-height: 1;
    color: var(--uk-ink);
    margin: 0 0 18px;
}

.uk-error-title {
    font-family: var(--uk-serif);
    font-weight: 400;
    font-size: 30px;
    color: var(--uk-ink);
    margin: 0 0 16px;
}

.uk-error-message {
    font-family: var(--uk-sans);
    font-size: 14px;
    line-height: 1.9;
    color: var(--uk-text-muted);
    margin: 0 0 34px;
}

.uk-error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
}

.uk-error-btn-primary,
.uk-error-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--uk-sans);
    font-size: 14px;
    font-weight: 500;
    padding: 11px 28px;
    transition: background 0.15s ease, color 0.15s ease;
}

.uk-error-btn-primary {
    background: var(--uk-red);
    border: 1px solid var(--uk-red);
    color: #fff;
}

.uk-error-btn-primary:hover {
    background: var(--uk-red-dark);
    border-color: var(--uk-red-dark);
    color: #fff;
}

.uk-error-btn-outline {
    background: transparent;
    border: 1px solid var(--uk-navy);
    color: var(--uk-navy);
}

.uk-error-btn-outline:hover {
    background: var(--uk-navy);
    color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .uk-journal-directory {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .uk-hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 40px 16px 36px;
    }

    .uk-hero-copy h1 {
        font-size: 38px;
    }

    .uk-hero-art {
        order: -1;
    }

    .uk-hero-art img {
        max-width: 480px;
        width: 100%;
    }

    /* One journal per row on tablets/phones */
    .uk-journal-directory {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .uk-hero-copy h1 {
        font-size: 31px;
    }

    .uk-hero-copy p {
        font-size: 16.5px;
    }

    .page-title {
        font-size: 29px;
    }

    .uk-dir-card {
        padding: 18px 16px;
        gap: 16px;
    }

    .uk-dir-cover {
        flex-basis: 92px;
        width: 92px;
        height: 123px;
    }
}
