:root {
    --primary: #1f3d2c;
    --primary-dark: #163020;
    --accent: #37624a;
    --accent-ink: #2f5540;
    --paper: #e9efe6;
    --text: #28302a;
    --text-light: #6a726b;
    --bg: #fffefb;
    --white: #ffffff;
    --border: #dde5da;
    --shadow: rgba(31, 61, 44, 0.10);
    /* Footer palette. Kept separate from --primary-dark: the footer is a large
       block (roughly a third of the viewport), and at that size the masthead
       green reads as a saturated slab. This is the same hue desaturated to an
       ink, with a LIGHT sage for headings — the old dark accent-on-dark-green
       managed only 2.04:1, which is unreadable as well as muddy. */
    --footer-bg: #1b211d;
    --footer-accent: #9db8a6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', 'Georgia', serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--paper);
    color: var(--primary);
    padding: 2rem 0;
    border-bottom: 4px double var(--accent);
}

.site-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.site-description {
    font-size: 1rem;
    opacity: 0.9;
    font-style: italic;
}

/* Navigation */
nav {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    position: relative;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: var(--accent);
    color: var(--white);
}

/* Main Content */
main {
    min-height: calc(100vh - 400px);
    padding: 3rem 0;
}

.page-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.content-box {
    background: var(--white);
    padding: 2.5rem;
    margin: 2rem 0;
    border-radius: 3px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px var(--shadow);
}

/* Editor-supplied prose inside .content-box (about, policy, guidelines, contact).
   The global `* { margin:0; padding:0 }` reset strips spacing from headings and
   lists, so restore it here rather than in each page's own <style> block. */
.content-box h2,
.content-box h3,
.content-box h4 {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--primary);
    line-height: 1.3;
    margin: 1.9rem 0 0.7rem;
}

.content-box h2 { font-size: 1.5rem; }
.content-box h3 { font-size: 1.25rem; }
.content-box h4 { font-size: 1.08rem; }

.content-box p { margin-bottom: 1rem; }

.content-box ul,
.content-box ol {
    margin: 0 0 1.1rem 1.5rem;
}

.content-box li { margin-bottom: 0.4rem; }

.content-box a { color: var(--accent-ink); }

.content-box strong { color: var(--primary); }

.content-box blockquote {
    margin: 1.2rem 0;
    padding: 0.8rem 1.2rem;
    background: var(--bg);
    border-left: 3px solid var(--accent);
}

.content-box > *:first-child { margin-top: 0; }
.content-box > *:last-child  { margin-bottom: 0; }

/* Classes the editors already use in CKEditor content but which had no styles,
   so they rendered as plain text. Defining them here honours the existing
   markup — no content rewrite needed, and it fixes live and local together. */
.content-box .subsection-title {
    /* Editors mark section headings with this; give it the same treatment the
       bare h3 gets, plus a rule so sections separate clearly on long pages. */
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.35rem;
}

.content-box .info-box,
.content-box .contact-info {
    background: var(--paper);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 3px;
    padding: 1.2rem 1.4rem;
    margin: 1.4rem 0;
}

/* Inside a callout the heading should not carry the section rule as well. */
.content-box .info-box .subsection-title,
.content-box .contact-info .subsection-title,
.content-box .info-box h3,
.content-box .contact-info h3 {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}

.content-box .info-box > *:last-child,
.content-box .contact-info > *:last-child { margin-bottom: 0; }

/* Cross-reference callout. Lives here rather than in a page's own <style> block
   because editor-supplied content uses it too — a class defined per-page can't
   reach CMS content on pages that don't define it. */
.oa-callout {
    display: flex;
    align-items: center;
    gap: 1rem 1.6rem;
    flex-wrap: wrap;
    background: var(--paper);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: 3px;
    padding: 1.4rem 1.6rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px var(--shadow);
}

.oa-callout-text { flex: 1 1 340px; }

.oa-callout-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 0.35rem;
}

.oa-callout h3,
.content-box .oa-callout h3 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0 0 0.45rem;
}

.oa-callout p,
.content-box .oa-callout p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.65;
}

.oa-callout .btn { white-space: nowrap; }

@media (max-width: 560px) {
    .oa-callout { padding: 1.15rem 1.2rem; }
    .oa-callout .btn { width: 100%; text-align: center; }
}

/* Articles */
.article-item {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 10px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px var(--shadow);
}

.article-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.article-authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-abstract {
    margin: 1rem 0;
    line-height: 1.8;
    text-align: justify;
}

.keywords {
    margin: 1rem 0;
}

.keyword {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-download {
    background: var(--accent);
    color: var(--white);
}

.btn-download:hover {
    background: var(--primary);
    color: var(--white);
}

/* Issue Info */
.issue-info {
    background: var(--primary);
    color: var(--white);
    padding: 2rem;
    border-radius: 3px;
    border-left: 4px solid var(--accent);
    margin-bottom: 2rem;
}

.issue-info h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Archive List */
.archive-list {
    list-style: none;
}

.archive-item {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px var(--shadow);
    transition: all 0.3s ease;
}

.archive-item:hover {
    border-left-color: var(--accent);
    transform: translateX(5px);
}

.archive-item a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 1.8rem 0 0;
    margin-top: 3rem;
    border-top: 3px solid var(--accent);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col {}

.footer-journal-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--footer-accent);
}

.footer-desc {
    opacity: 0.75;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--footer-accent);
    margin-bottom: 1rem;
}

.footer-links-list {
    list-style: none;
}

/* The Quick Links column sets the footer's height — five stacked links were
   168px while the other two columns needed under 90px. Tightening the row
   spacing here shortens the whole footer; the other columns were only being
   stretched to match. */
.footer-links-list li {
    margin-bottom: 0.25rem;
}

.footer-links-list a {
    line-height: 1.45;
}

.footer-links-list a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links-list a:hover {
    color: var(--footer-accent);
}

.footer-col p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.footer-bottom {
    text-align: center;
    padding: 0.8rem 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--white);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #e8eef6;
    color: #1b3a5b;
    border-color: #2f6db0;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav a {
        padding: 0.8rem 1rem;
    }
    
    .content-box {
        padding: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
