/* =========================================================
   CIJAR theme: dark blue and dark red, after the
   striped arches of Córdoba.
   ========================================================= */
:root {
    --cj-navy: #13284B;
    --cj-navy-deep: #0B1830;
    --cj-navy-soft: #22406F;
    --cj-red: #8B1E2D;
    --cj-red-deep: #6C1521;
    --cj-sand: #E2CFAE;
    --cj-mist: #EEF1F6;
    --cj-ink: #1E2433;
    --cj-muted: #566074;
    --cj-line: #D5DBE5;
    --cj-display: 'Marcellus', Georgia, 'Times New Roman', serif;
    --cj-text: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.cj-skip { position: absolute; left: -9999px; top: 0; z-index: 2000; background: #fff; color: var(--cj-navy); padding: 10px 16px; }
.cj-skip:focus { left: 12px; top: 12px; }
.cj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cj-header a:focus-visible, .cj-header button:focus-visible,
.cj a:focus-visible, .cj button:focus-visible, .cj input:focus-visible, .cj summary:focus-visible,
.cj-footer a:focus-visible {
    outline: 2px solid var(--cj-red);
    outline-offset: 3px;
}

/* Striped band: red and sandstone, like the arch voussoirs */
.cj-stripe {
    height: 6px;
    background: repeating-linear-gradient(90deg, var(--cj-red) 0 18px, var(--cj-sand) 18px 36px);
}

/* ---------- Buttons ---------- */
.cj-btn {
    display: inline-block;
    padding: 12px 22px;
    font: 600 15px/1.2 var(--cj-text);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.cj-btn:hover { text-decoration: none; }
.cj-btn--sm { padding: 8px 14px; font-size: 14px; }
/* Doubled class beats link colours set elsewhere (.cj a, Mobirise, Bootstrap) */
.cj-btn.cj-btn--red { background: var(--cj-red); color: #fff; }
.cj-btn.cj-btn--red:hover { background: var(--cj-red-deep); color: #fff; }
.cj-btn.cj-btn--outline { background: transparent; color: var(--cj-navy); border-color: var(--cj-navy); }
.cj-btn.cj-btn--outline:hover { background: var(--cj-navy); color: #fff; }
.cj-btn.cj-btn--ghost { background: transparent; color: #fff; border-color: rgba(226, 207, 174, .7); }
.cj-btn.cj-btn--ghost:hover { background: #fff; color: var(--cj-navy); border-color: #fff; }
.cj-btn.cj-btn--light { background: #fff; color: var(--cj-red-deep); }
.cj-btn.cj-btn--light:hover { background: var(--cj-sand); color: var(--cj-red-deep); }

/* ---------- Header ---------- */
.cj-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    font-family: var(--cj-text);
}
.cj-header__bar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.cj-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    text-decoration: none;
    color: var(--cj-navy);
}
.cj-brand:hover { text-decoration: none; color: var(--cj-navy); }
.cj-brand__logo { width: 56px; height: 56px; object-fit: contain; }
.cj-brand__short {
    display: block;
    font-family: var(--cj-display);
    font-size: 28px;
    line-height: 1;
    letter-spacing: .04em;
    color: var(--cj-navy);
}
.cj-brand__full {
    display: block;
    max-width: 250px;
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--cj-muted);
}

.cj-nav { display: flex; align-items: center; gap: 18px; }
.cj-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.cj-nav__link {
    display: block;
    padding: 10px 11px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    font: 500 15px/1.2 var(--cj-text);
    color: var(--cj-navy);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.cj-nav__link:hover, .cj-nav__link.active {
    color: var(--cj-red);
    border-bottom-color: var(--cj-red);
    text-decoration: none;
}
.cj-nav__trigger::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    position: relative;
    top: -3px;
}
.cj-nav__group { position: relative; }
.cj-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--cj-line);
    border-top: 3px solid var(--cj-red);
    box-shadow: 0 14px 30px rgba(11, 24, 48, .14);
}
.cj-nav__group:hover > .cj-nav__menu,
.cj-nav__group:focus-within > .cj-nav__menu,
.cj-nav__group.is-open > .cj-nav__menu { display: block; }
.cj-nav__menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14.5px;
    color: var(--cj-ink);
    text-decoration: none;
}
.cj-nav__menu a:hover { background: var(--cj-mist); color: var(--cj-red); text-decoration: none; }

.cj-nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: none;
    border: 1.5px solid var(--cj-navy);
    border-radius: 3px;
    color: var(--cj-navy);
    font: 600 14px/1 var(--cj-text);
    cursor: pointer;
}
.cj-nav-toggle__bars, .cj-nav-toggle__bars::before, .cj-nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.cj-nav-toggle__bars::before, .cj-nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.cj-nav-toggle__bars::before { top: -6px; }
.cj-nav-toggle__bars::after { top: 6px; }

@media (max-width: 1140px) {
    .cj-nav-toggle { display: inline-flex; }
    .cj-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        background: #fff;
        border-top: 1px solid var(--cj-line);
        box-shadow: 0 16px 30px rgba(11, 24, 48, .16);
    }
    .cj-nav.is-open { display: flex; }
    .cj-nav__list { flex-direction: column; gap: 0; }
    .cj-nav__list > li { border-bottom: 1px solid var(--cj-line); }
    .cj-nav__link { width: 100%; text-align: left; padding: 15px 24px; border-bottom: 0; }
    .cj-nav__link.active { border-bottom: 0; box-shadow: inset 4px 0 0 var(--cj-red); }
    .cj-nav__trigger { display: flex; justify-content: space-between; align-items: center; }
    .cj-nav__group:hover > .cj-nav__menu,
    .cj-nav__group:focus-within > .cj-nav__menu { display: none; }
    .cj-nav__group.is-open > .cj-nav__menu { display: block; }
    .cj-nav__menu { position: static; box-shadow: none; border: 0; border-top: 1px solid var(--cj-line); background: var(--cj-mist); padding: 0; }
    .cj-nav__menu a { padding: 13px 24px 13px 40px; }
    .cj-nav__cta { margin: 18px 24px 22px; text-align: center; }
}
@media (max-width: 560px) {
    .cj-brand__full { display: none; }
    .cj-brand__logo { width: 46px; height: 46px; }
    .cj-nav-toggle__label { display: none; }
}

/* ---------- Page base ---------- */
.cj {
    font-family: var(--cj-text);
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--cj-ink);
}
.cj h1, .cj h2, .cj h3, .cj h4, .cj h5 {
    font-family: var(--cj-display);
    font-weight: 400;
    color: var(--cj-navy);
    line-height: 1.2;
    margin: 0 0 .5em;
}
.cj p { margin: 0 0 1em; }
.cj a { color: var(--cj-red); }
.cj a:hover { color: var(--cj-red-deep); }
.cj-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.cj-section { padding: 76px 0; }
.cj-section--mist { background: var(--cj-mist); }
.cj .cj-h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 18px; }
.cj .cj-lede { max-width: 62ch; color: var(--cj-muted); font-size: 17px; }
.cj-center { text-align: center; margin-top: 36px; }
.cj .cj-link {
    font-weight: 600;
    color: var(--cj-red);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

/* ---------- Hero ---------- */
.cj-hero { background: var(--cj-navy); color: #DCE3EF; padding-top: 64px; overflow: hidden; }
.cj-hero__grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 48px;
    align-items: end;
}
.cj-hero__text { padding-bottom: 76px; }
.cj .cj-hero__title {
    font-size: clamp(38px, 5.2vw, 66px);
    line-height: 1.06;
    color: #fff;
    margin-bottom: 22px;
    max-width: 16ch;
}
.cj .cj-hero__pub { color: var(--cj-sand); font-size: 17px; margin-bottom: 18px; max-width: 52ch; }
.cj .cj-hero__desc { max-width: 54ch; color: #C3CDDF; }
.cj-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cj-hero__arch svg { display: block; width: 100%; max-width: 420px; height: auto; margin-left: auto; }

.cj-v { opacity: 0; animation: cjRise .55s ease-out forwards; }
@keyframes cjRise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cj-v { opacity: 1; animation: none; }
}

/* ---------- At a glance ---------- */
.cj-glance { display: grid; grid-template-columns: 1.3fr 1fr .75fr; gap: 28px; align-items: start; }
.cj-panel { background: #fff; padding: 30px; border-top: 4px solid var(--cj-navy); border-radius: 3px; }
.cj-panel--red { border-top-color: var(--cj-red); }
.cj .cj-panel__title { font-size: 24px; margin-bottom: 18px; }
.cj-facts {
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    margin: 0;
    font-size: 15px;
}
.cj-facts dt, .cj-facts dd { padding: 9px 0; border-bottom: 1px solid var(--cj-line); margin: 0; }
.cj-facts dt { font-weight: 600; color: var(--cj-navy); padding-right: 12px; }
.cj-facts--tight { margin-bottom: 22px; }
.cj-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cj-quick { padding-top: 4px; }
.cj-quick ul { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--cj-navy); }
.cj-quick li { border-bottom: 1px solid var(--cj-line); }
.cj-quick a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 2px;
    color: var(--cj-navy);
    font-weight: 500;
    text-decoration: none;
}
.cj-quick a::after {
    content: "";
    width: 7px;
    height: 7px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}
.cj-quick a:hover { color: var(--cj-red); text-decoration: none; }

/* ---------- About ---------- */
.cj-two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.cj-two p { max-width: 62ch; }

/* ---------- Recent publications ---------- */
.cj-pubs__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.cj-pubs__head .cj-h2 { margin: 0; }
.cj-search { display: flex; width: 100%; max-width: 440px; }
.cj-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1.5px solid var(--cj-navy);
    border-right: 0;
    border-radius: 3px 0 0 3px;
    background: #fff;
    font: 400 15px var(--cj-text);
    color: var(--cj-ink);
}
.cj-search button {
    padding: 12px 20px;
    border: 0;
    border-radius: 0 3px 3px 0;
    background: var(--cj-navy);
    color: #fff;
    font: 600 15px var(--cj-text);
    cursor: pointer;
}
.cj-search button:hover { background: var(--cj-navy-deep); }

.cj-entries { background: #fff; padding: 0 32px; border-radius: 3px; }
.cj-entry {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;
    padding: 30px 0;
    border-bottom: 1px solid var(--cj-line);
}
.cj-entry:last-child { border-bottom: 0; }
.cj-entry__meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--cj-muted); padding-top: 4px; }
.cj-entry__vol { color: var(--cj-red); font-weight: 600; }
.cj .cj-entry__title { font-size: 23px; line-height: 1.3; margin-bottom: 14px; }
.cj .cj-entry__title a { color: var(--cj-navy); text-decoration: none; }
.cj .cj-entry__title a:hover { color: var(--cj-red); text-decoration: underline; text-underline-offset: 4px; }
.cj .cj-entry__doi { font-size: 14px; color: var(--cj-muted); word-break: break-all; margin: 12px 0 0; }
.cj-entry__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }

/* Author blocks rendered by includes/authors.php */
.cj .rp-authors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.cj .rp-authors > .rp-author:only-child { grid-column: 1 / -1; }
.cj .rp-author { min-width: 0; }
.cj .rp-author-name, .cj .rp-author-line { display: flex; align-items: flex-start; gap: 7px; line-height: 1.45; }
.cj .rp-author-name { font-weight: 600; color: var(--cj-ink); font-size: 15.5px; margin-bottom: 2px; }
.cj .rp-author-line { color: var(--cj-muted); font-size: 14px; }
.cj .rp-author .rp-ai { flex-shrink: 0; margin-top: 3px; fill: var(--cj-navy-soft); }
.cj .rp-author .rp-ai-person { fill: var(--cj-red); }

.cj-empty { background: #fff; padding: 44px 32px; text-align: center; border-radius: 3px; border-top: 4px solid var(--cj-red); }
.cj-empty p { color: var(--cj-muted); font-size: 17px; }

/* Abstract modal */
.rp-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.rp-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 24, 48, .7); }
.rp-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-top: 5px solid var(--cj-red);
    border-radius: 3px;
    box-shadow: 0 20px 50px rgba(11, 24, 48, .35);
}
.rp-modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 26px 16px; border-bottom: 1px solid var(--cj-line); }
.cj .rp-modal-header h4 { font-size: 21px; margin: 0; }
.rp-modal-body { padding: 20px 26px 26px; overflow-y: auto; font-size: 15.5px; }
.cj .rp-modal-body h5 { font-family: var(--cj-text); font-weight: 600; font-size: 14px; color: var(--cj-red); margin-bottom: 8px; }
.rp-modal-body p { white-space: pre-wrap; line-height: 1.75; margin: 0; }
.rp-modal-close { background: none; border: 0; font-size: 30px; line-height: 1; color: var(--cj-muted); cursor: pointer; padding: 0; }
.rp-modal-close:hover { color: var(--cj-red); }

/* ---------- Benefits ---------- */
.cj-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; margin-top: 12px; }
.cj-benefit { padding-top: 18px; border-top: 2px solid var(--cj-navy); }
.cj .cj-benefit h3 { font-size: 21px; margin-bottom: 8px; }
.cj .cj-benefit p { color: var(--cj-muted); margin: 0; }

/* ---------- Call to action ---------- */
.cj-cta { background: var(--cj-red); color: #F6E9EB; padding: 60px 0; }
.cj-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cj .cj-cta h2 { color: #fff; font-size: clamp(28px, 3.2vw, 40px); }
.cj .cj-cta p { max-width: 60ch; margin: 0; }
.cj-cta .cj-btn { flex-shrink: 0; }

/* ---------- Submission types ---------- */
.cj-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 30px 0 36px; }
.cj-type { background: var(--cj-mist); padding: 24px; border-radius: 3px; }
.cj .cj-type h3 { font-size: 21px; margin-bottom: 4px; }
.cj .cj-type__words { font-weight: 600; color: var(--cj-red); font-size: 15px; margin-bottom: 10px; }
.cj .cj-type p:last-child { color: var(--cj-muted); font-size: 15px; margin: 0; }
.cj .cj-note { max-width: 90ch; padding: 16px 20px; border-left: 4px solid var(--cj-red); background: #fff; box-shadow: inset 0 0 0 1px var(--cj-line); font-size: 15px; margin: 0; }

/* ---------- Process (a real sequence, so numbered) ---------- */
.cj-steps { list-style: none; counter-reset: cjstep; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; margin: 40px 0 0; padding: 0; }
.cj-steps li { counter-increment: cjstep; position: relative; padding-top: 74px; }
.cj-steps li::before {
    content: counter(cjstep);
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 58px;
    border-radius: 25px 25px 0 0;   /* arch-shaped marker */
    background: var(--cj-navy);
    color: #fff;
    font: 400 22px/62px var(--cj-display);
    text-align: center;
    box-shadow: inset 0 -5px 0 var(--cj-red);
}
.cj-steps li::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 64px;
    right: -16px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--cj-red) 0 8px, transparent 8px 14px);
}
.cj-steps li:last-child::after { display: none; }
.cj .cj-steps h3 { font-size: 21px; margin-bottom: 6px; }
.cj .cj-steps p { color: var(--cj-muted); font-size: 15px; margin: 0; }
.cj .cj-free { margin: 36px 0 0; font-weight: 600; color: var(--cj-navy); }

/* ---------- FAQ ---------- */
.cj-faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.cj-faq { border-top: 2px solid var(--cj-navy); }
.cj-faq details { border-bottom: 1px solid var(--cj-line); }
.cj-faq summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 20px 48px 20px 0;
    font: 600 17px/1.4 var(--cj-text);
    color: var(--cj-navy);
}
.cj-faq summary::-webkit-details-marker { display: none; }
.cj-faq summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font: 400 28px/1 var(--cj-display);
    color: var(--cj-red);
}
.cj-faq details[open] summary::after { content: "\2013"; }
.cj-faq summary:hover { color: var(--cj-red); }
.cj-faq__body { padding: 0 0 22px; color: var(--cj-muted); }
.cj-faq__body ul { margin: 0 0 1em; padding-left: 1.2em; }
.cj-faq__body li { margin-bottom: .5em; }
.cj-faq__body p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.cj-footer { background: var(--cj-navy-deep); color: #B9C4D8; font: 400 15px/1.65 var(--cj-text); }
.cj-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr .8fr;
    gap: 40px;
}
.cj-footer__logo { display: inline-flex; padding: 8px; background: #fff; border-radius: 50%; margin-bottom: 16px; }
.cj-footer__logo img { width: 72px; height: 72px; object-fit: contain; }
.cj-footer__name { font-family: var(--cj-display); font-size: 21px; line-height: 1.3; color: #fff; margin: 0 0 8px; max-width: 26ch; }
.cj-footer__meta { margin: 0; }
.cj-footer__heading { font-family: var(--cj-display); font-weight: 400; font-size: 19px; color: var(--cj-sand); margin: 0 0 14px; }
.cj-footer p { margin: 0; }
.cj-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(226, 207, 174, .4); }
.cj-footer a:hover { color: var(--cj-sand); border-bottom-color: var(--cj-sand); text-decoration: none; }
.cj-footer__links { list-style: none; margin: 0; padding: 0; }
.cj-footer__links li { margin-bottom: 8px; }
.cj-footer__base { border-top: 1px solid rgba(255, 255, 255, .1); }
.cj-footer__base p { max-width: 1180px; margin: 0 auto; padding: 20px 24px; font-size: 13.5px; color: #8E9AB1; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
    .cj-glance { grid-template-columns: 1fr 1fr; }
    .cj-quick { grid-column: 1 / -1; }
    .cj-quick ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
    .cj-types { grid-template-columns: 1fr 1fr; }
    .cj-steps { grid-template-columns: 1fr 1fr 1fr; row-gap: 40px; }
    .cj-steps li::after { display: none; }
    .cj-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .cj-section { padding: 56px 0; }
    .cj-hero { padding-top: 44px; }
    .cj-hero__grid { grid-template-columns: 1fr; gap: 8px; }
    .cj-hero__text { padding-bottom: 20px; }
    .cj-hero__arch svg { max-width: 250px; margin: 0 auto; }
    .cj-glance, .cj-two, .cj-faq-grid { grid-template-columns: 1fr; }
    .cj-two, .cj-faq-grid { gap: 40px; }
    .cj-benefits { grid-template-columns: 1fr 1fr; }
    .cj-cta__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
    .cj-entry { grid-template-columns: 1fr; gap: 8px; }
    .cj-entry__meta { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
    .cj-entries { padding: 0 20px; }
}
@media (max-width: 560px) {
    .cj { font-size: 16px; }
    .cj-quick ul { grid-template-columns: 1fr; }
    .cj-types, .cj-benefits, .cj-steps { grid-template-columns: 1fr; }
    .cj .rp-authors { grid-template-columns: 1fr; }
    .cj-panel { padding: 22px; }
    .cj-facts { grid-template-columns: 1fr; }
    .cj-facts dt { border-bottom: 0; padding-bottom: 0; }
    .cj-footer__inner { grid-template-columns: 1fr; }
    .cj-search { max-width: none; }
}
