/*
 * JMCS Premium Theme — repaired production stylesheet
 * Replace: plugins/themes/jmcsPremium4/styles/index.css
 * Version: 2.4.0
 */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.jmcs-v2-page {
    margin: 0;
    background: var(--jmcs-paper, #f6f4ef);
    color: var(--jmcs-text, #26344a);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.jmcs-v2-page img { max-width: 100%; height: auto; }
body.jmcs-v2-page a { color: inherit; }

.jmcs-v2-skip {
    position: fixed;
    z-index: 9999;
    top: 12px;
    left: 12px;
    transform: translateY(-150%);
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    color: #07152b;
    font-weight: 800;
    transition: transform .2s ease;
}

.jmcs-v2-skip:focus { transform: translateY(0); }

/* Header */
.jmcs-v2-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    width: 100%;
    border-top: 4px solid var(--jmcs-gold-500, #c7a24d);
    border-bottom: 1px solid rgba(7, 21, 43, .1);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 8px 30px rgba(7, 21, 43, .06);
    backdrop-filter: blur(14px);
}

.jmcs-v2-header-inner {
    display: flex;
    width: min(var(--jmcs-container, 1240px), calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.jmcs-v2-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    color: var(--jmcs-navy-950, #07152b);
    text-decoration: none;
}

.jmcs-v2-brand img {
    width: 66px !important;
    height: 66px !important;
    max-width: 66px !important;
    object-fit: contain;
}

.jmcs-v2-brand-copy { display: grid; gap: 2px; min-width: 0; }
.jmcs-v2-brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.15;
    color: var(--jmcs-navy-950, #07152b);
}
.jmcs-v2-brand-copy small {
    color: var(--jmcs-gold-600, #b98c2e);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.jmcs-v2-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.jmcs-v2-navigation > a {
    padding: 10px 9px;
    border-radius: 8px;
    color: #334158;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
}

.jmcs-v2-navigation > a:hover,
.jmcs-v2-navigation > a:focus-visible {
    background: #eef2f7;
    color: var(--jmcs-navy-950, #07152b);
}

.jmcs-v2-navigation .jmcs-v2-nav-submit {
    margin-left: 8px;
    padding: 11px 17px;
    background: var(--jmcs-navy-950, #07152b);
    color: #fff;
}

.jmcs-v2-navigation .jmcs-v2-nav-submit:hover { background: var(--jmcs-gold-600, #b98c2e); color: #fff; }

.jmcs-v2-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: 1px solid var(--jmcs-border, #dce2ea);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.jmcs-v2-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    background: var(--jmcs-navy-950, #07152b);
}

.jmcs-v2-site, .jmcs-v2-main { width: 100%; }
.jmcs-home-container { width: min(var(--jmcs-container, 1240px), calc(100% - 40px)); margin: 0 auto; }

/* Hero */
.jmcs-home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 650px;
    padding: 96px 0 84px;
    background:
        radial-gradient(circle at 86% 12%, rgba(199,162,77,.20), transparent 32%),
        linear-gradient(135deg, #07152b 0%, #0b1c35 56%, #14284a 100%);
    color: #fff;
}

.jmcs-home-hero__background {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: .24;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom right, #000, transparent 82%);
}

.jmcs-home-hero__overlay { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(7,21,43,.12), rgba(7,21,43,.5)); }

.jmcs-home-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    align-items: center;
    gap: 72px;
}

.jmcs-home-eyebrow,
.jmcs-home-section-heading__eyebrow {
    margin: 0 0 18px;
    color: #e4c65e;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.jmcs-home-hero h1 {
    max-width: 820px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(46px, 6vw, 82px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.035em;
}

.jmcs-home-hero h1 span { display: block; margin-top: 10px; color: #e4c65e; font-style: italic; font-weight: 400; }

.jmcs-home-hero__description {
    max-width: 760px;
    margin: 30px 0 0;
    color: #d8e0ec;
    font-size: 17px;
    line-height: 1.8;
}

.jmcs-home-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.jmcs-home-button {
    display: inline-flex;
    min-height: 52px;
    padding: 14px 20px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .05em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.jmcs-home-button:hover { transform: translateY(-2px); }
.jmcs-home-button--gold { border-color: #e4c65e; background: #e4c65e; color: #07152b !important; }
.jmcs-home-button--gold:hover { background: #f0d873; }
.jmcs-home-button--outline { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.06); color: #fff !important; }
.jmcs-home-button--outline:hover { border-color: #e4c65e; }

.jmcs-home-profile {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--jmcs-radius-large, 24px);
    background: rgba(255,255,255,.07);
    box-shadow: 0 30px 70px rgba(0,0,0,.22);
    backdrop-filter: blur(12px);
}

.jmcs-home-profile__item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.jmcs-home-profile__item:last-child { border-bottom: 0; }
.jmcs-home-profile__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(228,198,94,.45);
    border-radius: 50%;
    color: #e4c65e;
    font-size: 10px;
    font-weight: 900;
}
.jmcs-home-profile__item div { display: grid; }
.jmcs-home-profile__item small { color: #aebbd0; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.jmcs-home-profile__item strong { color: #fff; font-size: 13px; line-height: 1.35; }

/* Quick links */
.jmcs-home-quick { position: relative; z-index: 2; margin-top: -42px; padding: 0 0 88px; }
.jmcs-home-quick__grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-radius: 18px; box-shadow: var(--jmcs-shadow, 0 20px 55px rgba(11,28,53,.10)); }
.jmcs-home-quick__card {
    display: flex;
    min-height: 290px;
    padding: 30px;
    flex-direction: column;
    border-right: 1px solid var(--jmcs-border, #dce2ea);
    background: #fff;
    color: var(--jmcs-text, #26344a);
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}
.jmcs-home-quick__card:first-child { border-radius: 18px 0 0 18px; }
.jmcs-home-quick__card:last-child { border-right: 0; border-radius: 0 18px 18px 0; }
.jmcs-home-quick__card:hover { z-index: 2; transform: translateY(-8px); background: #fbfaf5; }
.jmcs-home-quick__top { display: flex; align-items: center; justify-content: space-between; }
.jmcs-home-quick__number { color: var(--jmcs-gold-600, #b98c2e); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.jmcs-home-quick__icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: #edf1f6; color: #07152b; font-size: 11px; font-weight: 900; }
.jmcs-home-quick__card h3 { margin: 32px 0 10px; color: #07152b; font-family: Georgia, "Times New Roman", serif; font-size: 25px; line-height: 1.2; }
.jmcs-home-quick__card p { margin: 0; color: var(--jmcs-muted, #69758a); font-size: 14px; }
.jmcs-home-quick__more { margin-top: auto; padding-top: 24px; color: var(--jmcs-gold-600, #b98c2e); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

/* Shared sections */
.jmcs-home-about { padding: 100px 0; background: #fff; }
.jmcs-home-focus { padding: 100px 0 110px; background: var(--jmcs-paper, #f6f4ef); }
.jmcs-home-section-heading { max-width: 780px; margin-bottom: 48px; }
.jmcs-home-section-heading__eyebrow { display: block; color: var(--jmcs-gold-600, #b98c2e); }
.jmcs-home-section-heading h2 { margin: 0; color: #07152b; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 4vw, 54px); line-height: 1.1; }

.jmcs-home-about__grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); gap: 88px; align-items: start; }
.jmcs-home-about__content p { margin: 0 0 20px; color: #435169; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.85; }
.jmcs-home-about__content .jmcs-home-button { margin-top: 16px; }
.jmcs-home-about__stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid var(--jmcs-border, #dce2ea); border-radius: 18px; background: #fbfaf7; }
.jmcs-home-stat { display: grid; min-height: 130px; padding: 24px; align-content: center; border-right: 1px solid var(--jmcs-border, #dce2ea); border-bottom: 1px solid var(--jmcs-border, #dce2ea); }
.jmcs-home-stat:nth-child(2n) { border-right: 0; }
.jmcs-home-stat:nth-last-child(-n+2) { border-bottom: 0; }
.jmcs-home-stat strong { color: #07152b; font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.jmcs-home-stat span { margin-top: 4px; color: var(--jmcs-muted, #69758a); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.jmcs-home-focus__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.jmcs-home-focus__item { display: flex; min-height: 104px; padding: 22px; align-items: center; border: 1px solid var(--jmcs-border, #dce2ea); border-radius: 12px; background: #fff; color: #07152b; font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; box-shadow: 0 8px 24px rgba(11,28,53,.04); }
.jmcs-home-focus__item::before { width: 5px; height: 34px; margin-right: 14px; border-radius: 9px; background: var(--jmcs-gold-500, #c7a24d); content: ""; }

/* OJS fallback pages */
.pkp_structure_page { max-width: none !important; margin: 0 !important; box-shadow: none !important; }
.pkp_structure_content { width: min(var(--jmcs-container, 1240px), calc(100% - 40px)); margin: 48px auto !important; }
.pkp_structure_main { padding: 0 !important; }
.page h1, .page h2 { color: #07152b; font-family: Georgia, "Times New Roman", serif; }

/* Responsive */
@media (max-width: 1080px) {
    .jmcs-v2-header-inner { min-height: 82px; }
    .jmcs-v2-menu-toggle { display: block; }
    .jmcs-v2-navigation {
        position: absolute;
        top: calc(100% + 1px);
        right: 20px;
        left: 20px;
        display: none;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--jmcs-border, #dce2ea);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 22px 55px rgba(7,21,43,.16);
    }
    .jmcs-v2-navigation.is-open,
    .jmcs-v2-menu-toggle[aria-expanded="true"] + .jmcs-v2-navigation { display: flex; }
    .jmcs-v2-navigation > a { padding: 12px 14px; }
    .jmcs-v2-navigation .jmcs-v2-nav-submit { margin: 5px 0 0; text-align: center; }
    .jmcs-home-hero__layout { grid-template-columns: 1fr; gap: 48px; }
    .jmcs-home-profile { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .jmcs-home-profile__item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.1); }
    .jmcs-home-quick__grid { grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; }
    .jmcs-home-quick__card, .jmcs-home-quick__card:first-child, .jmcs-home-quick__card:last-child { border-radius: 0; }
    .jmcs-home-quick__card:nth-child(2n) { border-right: 0; }
    .jmcs-home-quick__card:nth-child(-n+2) { border-bottom: 1px solid var(--jmcs-border, #dce2ea); }
    .jmcs-home-focus__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .jmcs-v2-header-inner, .jmcs-home-container, .pkp_structure_content { width: min(100% - 28px, var(--jmcs-container, 1240px)); }
    .jmcs-v2-brand img { width: 52px !important; height: 52px !important; max-width: 52px !important; }
    .jmcs-v2-brand-copy strong { font-size: 15px; }
    .jmcs-v2-brand-copy small { display: none; }
    .jmcs-home-hero { min-height: 0; padding: 72px 0 86px; }
    .jmcs-home-hero h1 { font-size: clamp(42px, 13vw, 62px); }
    .jmcs-home-hero__description { font-size: 16px; }
    .jmcs-home-hero__actions { display: grid; }
    .jmcs-home-button { width: 100%; }
    .jmcs-home-profile { grid-template-columns: 1fr; }
    .jmcs-home-profile__item:nth-child(odd) { border-right: 0; }
    .jmcs-home-quick { margin-top: -28px; padding-bottom: 64px; }
    .jmcs-home-quick__grid { grid-template-columns: 1fr; }
    .jmcs-home-quick__card { min-height: 240px; border-right: 0; border-bottom: 1px solid var(--jmcs-border, #dce2ea); }
    .jmcs-home-quick__card:last-child { border-bottom: 0; }
    .jmcs-home-about, .jmcs-home-focus { padding: 72px 0; }
    .jmcs-home-section-heading { margin-bottom: 34px; }
    .jmcs-home-about__grid { grid-template-columns: 1fr; gap: 50px; }
    .jmcs-home-about__stats { grid-template-columns: 1fr; }
    .jmcs-home-stat, .jmcs-home-stat:nth-child(2n), .jmcs-home-stat:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--jmcs-border, #dce2ea); }
    .jmcs-home-stat:last-child { border-bottom: 0; }
    .jmcs-home-focus__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
