/* ==========================================================================
   OJS Academy - shared components for guide, hub and new service pages.
   Every class is prefixed "oa-" so nothing collides with the inline styles
   that individual legacy pages define.
   ========================================================================== */

:root {
    --oa-navy: #1e2a5a;
    --oa-heading: #1e3754;
    --oa-orange: #ff7800;
    --oa-orange-soft: #fff4ea;
    --oa-text: #2f3640;
    --oa-muted: #5f6b7a;
    --oa-border: #e3e6ea;
    --oa-surface: #ffffff;
    --oa-tint: #f6f8fb;
    --oa-green: #2e7d32;
    --oa-green-soft: #edf7ee;
    --oa-red: #c62828;
    --oa-red-soft: #fdecec;
    --oa-blue-soft: #eaf1fb;
    --oa-radius: 10px;
}

/* ---------- Hero ---------- */
.hero.oa-hero { padding: 64px 0 56px; }
.oa-hero .oa-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.oa-hero h1 {
    font-size: clamp(1.75rem, 4.2vw, 2.7rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff;
}
.oa-hero .oa-lead {
    font-size: 1.08rem;
    line-height: 1.65;
    max-width: 760px;
    margin: 0 0 18px;
    color: rgba(255,255,255,.92);
}
.oa-hero .oa-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.oa-hero .oa-hero-actions .actionLink,
.oa-hero .oa-hero-actions .actionLinkAction { margin-right: 0; text-decoration: none; display: inline-block; }
/* Navy buttons disappear on the dark hero overlay - use the brand orange there */
.oa-hero .actionLinkAction { background: var(--oa-orange); border-color: var(--oa-orange); color: #fff; }
.oa-hero .actionLinkAction:hover { background: #e86c00; border-color: #e86c00; }
@media (max-width: 575px) {
    .oa-hero .oa-hero-actions .actionLink,
    .oa-hero .oa-hero-actions .actionLinkAction { padding: 13px 24px; }
}

.oa-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 14px;
    color: rgba(255,255,255,.85);
}
.oa-meta a { color: #fff; }

/* ---------- Breadcrumb ---------- */
.oa-breadcrumb {
    font-size: 13px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    color: rgba(255,255,255,.8);
}
.oa-breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; opacity: .7; }
.oa-breadcrumb a { color: #fff; text-decoration: none; }
.oa-breadcrumb a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.oa-section { margin-top: 36px; }
.oa-box {
    background: var(--oa-surface);
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    padding: 40px;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
@media (max-width: 767px) {
    .hero.oa-hero { padding: 44px 0 40px; }
    .oa-box { padding: 24px 18px; }
}

/* ---------- Article typography ---------- */
.oa-article { color: var(--oa-text); font-size: 16.5px; line-height: 1.75; }
.oa-article h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.75rem);
    color: var(--oa-heading);
    margin: 40px 0 14px;
    scroll-margin-top: 20px;
}
.oa-article h2:first-child { margin-top: 0; }
.oa-article h3 {
    font-size: 1.18rem;
    color: var(--oa-heading);
    margin: 28px 0 10px;
    font-weight: 700;
}
.oa-article p { margin: 0 0 16px; }
.oa-article ul, .oa-article ol { margin: 0 0 18px; padding-left: 22px; }
.oa-article li { margin-bottom: 8px; }
.oa-article a { color: #0b5cad; }
.oa-article a:hover { color: var(--oa-orange); }
.oa-article strong { color: #1c2530; }
.oa-article img { max-width: 100%; height: auto; }

/* Inline code + code blocks */
.oa-article code {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .88em;
    background: #f1f3f6;
    color: #b3261e;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-word;
}
.oa-code {
    position: relative;
    background: #14192b;
    color: #e6e9f0;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 0 0 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.oa-code code { background: none; color: inherit; padding: 0; font-size: inherit; word-break: normal; white-space: pre; }
.oa-code[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: Poppins, sans-serif;
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #9aa4bd;
    margin-bottom: 8px;
}

/* ---------- Table of contents ---------- */
.oa-toc {
    background: var(--oa-tint);
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    padding: 20px 24px;
    margin: 0 0 30px;
}
.oa-toc-title { font-weight: 700; color: var(--oa-heading); margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: .4px; }
.oa-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.oa-toc li { margin-bottom: 6px; break-inside: avoid; font-size: 15px; }
.oa-toc a { color: var(--oa-navy); text-decoration: none; }
.oa-toc a:hover { color: var(--oa-orange); text-decoration: underline; }
@media (max-width: 767px) { .oa-toc ol { columns: 1; } }

/* ---------- Key takeaways / summary ---------- */
.oa-summary {
    border-left: 4px solid var(--oa-orange);
    background: var(--oa-orange-soft);
    border-radius: 0 var(--oa-radius) var(--oa-radius) 0;
    padding: 18px 22px;
    margin: 0 0 28px;
}
.oa-summary p:last-child, .oa-summary ul:last-child { margin-bottom: 0; }
.oa-summary-title { font-weight: 700; color: var(--oa-heading); margin-bottom: 8px; }

/* ---------- Callouts ---------- */
.oa-callout {
    border-radius: var(--oa-radius);
    padding: 16px 20px;
    margin: 0 0 22px;
    border: 1px solid var(--oa-border);
    background: var(--oa-blue-soft);
}
.oa-callout p:last-child, .oa-callout ul:last-child { margin-bottom: 0; }
.oa-callout-title { font-weight: 700; margin-bottom: 6px; color: var(--oa-heading); }
.oa-callout.oa-tip { background: var(--oa-green-soft); border-color: #cfe8d1; }
.oa-callout.oa-warning { background: #fff8e6; border-color: #f3dfa6; }
.oa-callout.oa-danger { background: var(--oa-red-soft); border-color: #f5c6c6; }

/* ---------- Numbered steps ---------- */
.oa-steps { list-style: none; counter-reset: oa-step; padding: 0 !important; margin: 0 0 24px; }
.oa-steps > li {
    counter-increment: oa-step;
    position: relative;
    padding: 16px 18px 16px 64px;
    margin-bottom: 14px;
    background: var(--oa-tint);
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
}
.oa-steps > li::before {
    content: counter(oa-step);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--oa-navy);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.oa-steps > li > strong:first-child { display: block; margin-bottom: 4px; color: var(--oa-heading); }
.oa-steps > li p:last-child { margin-bottom: 0; }

/* ---------- Check / cross lists ---------- */
.oa-checklist { list-style: none; padding-left: 0 !important; }
.oa-checklist li { position: relative; padding-left: 28px; }
.oa-checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--oa-green); font-weight: 700; }
.oa-crosslist { list-style: none; padding-left: 0 !important; }
.oa-crosslist li { position: relative; padding-left: 28px; }
.oa-crosslist li::before { content: "✗"; position: absolute; left: 4px; color: var(--oa-red); font-weight: 700; }

/* ---------- Tables ---------- */
.oa-table-wrap { width: 100%; overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--oa-border); border-radius: var(--oa-radius); }
.oa-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.oa-table th, .oa-table td { padding: 12px 14px; border-bottom: 1px solid var(--oa-border); text-align: left; vertical-align: top; }
.oa-table thead th { background: var(--oa-navy); color: #fff; font-weight: 600; }
.oa-table tbody tr:nth-child(even) { background: var(--oa-tint); }
.oa-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Cards ---------- */
.oa-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 0 0 24px; }
.oa-card {
    background: var(--oa-surface);
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    padding: 22px;
    transition: box-shadow .2s, transform .2s;
    height: 100%;
}
.oa-card h3, .oa-card .oa-card-title { font-size: 1.05rem; margin: 0 0 8px; color: var(--oa-heading); font-weight: 700; }
.oa-card p { font-size: 15px; color: var(--oa-muted); margin: 0 0 10px; line-height: 1.6; }
.oa-card p:last-child { margin-bottom: 0; }
.oa-card .oa-card-icon { font-size: 28px; line-height: 1; margin-bottom: 10px; display: block; }
a.oa-card { display: block; text-decoration: none; color: inherit; }
a.oa-card:hover { box-shadow: 0 10px 26px rgba(30,42,90,.12); transform: translateY(-2px); }
a.oa-card:hover .oa-card-title { color: var(--oa-orange); }
.oa-card .oa-card-link { font-size: 14px; font-weight: 600; color: var(--oa-navy); }

.oa-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--oa-blue-soft);
    color: var(--oa-navy);
    margin-bottom: 8px;
}
.oa-badge.oa-badge-green { background: var(--oa-green-soft); color: var(--oa-green); }
.oa-badge.oa-badge-orange { background: var(--oa-orange-soft); color: #b85400; }

/* ---------- FAQ (native details/summary) ---------- */
.oa-faq details {
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    margin-bottom: 12px;
    background: var(--oa-surface);
}
.oa-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 48px 16px 20px;
    font-weight: 600;
    color: var(--oa-heading);
    position: relative;
}
.oa-faq summary::-webkit-details-marker { display: none; }
.oa-faq summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--oa-orange);
}
.oa-faq details[open] summary::after { content: "−"; }
.oa-faq details[open] summary { border-bottom: 1px solid var(--oa-border); }
.oa-faq .oa-faq-answer { padding: 14px 20px 6px; color: var(--oa-text); line-height: 1.7; }
.oa-faq .oa-faq-answer p { margin-bottom: 10px; }

/* ---------- Author box ---------- */
.oa-author {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--oa-tint);
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    padding: 20px;
    margin-top: 32px;
}
.oa-author-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--oa-navy);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.oa-author p { margin: 0 0 4px; font-size: 15px; line-height: 1.6; }

/* ---------- CTA ---------- */
.oa-cta {
    background: linear-gradient(135deg, #ff7800, #ff9a44);
    color: #fff;
    border-radius: 15px;
    padding: 44px 36px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255,120,0,.28);
    margin: 40px 0;
}
.oa-cta h2, .oa-cta .oa-cta-title { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 0 0 10px; font-weight: 700; }
.oa-cta p { margin: 0 auto 18px; max-width: 640px; line-height: 1.6; }
.oa-cta .oa-cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.oa-cta .actionLinkAction, .oa-cta .actionLink { margin-right: 0; text-decoration: none; display: inline-block; }
.oa-cta .oa-cta-note { font-size: 14px; margin: 14px 0 0; opacity: .95; }

/* ---------- Related guides ---------- */
.oa-related-title { font-size: 1.35rem; color: var(--oa-heading); margin: 0 0 16px; font-weight: 700; }

/* ---------- Guides hub ---------- */
.oa-hub-category { margin-bottom: 34px; }
.oa-hub-category h2 { font-size: 1.4rem; color: var(--oa-heading); margin-bottom: 14px; }

/* ---------- Service page helpers ---------- */
.oa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.oa-stat { background: #fff; border: 1px solid var(--oa-border); border-radius: var(--oa-radius); padding: 22px 16px; text-align: center; }
.oa-stat strong { display: block; font-size: 1.35rem; color: var(--oa-heading); }
.oa-stat span { font-size: 14px; color: var(--oa-muted); }

.oa-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 767px) { .oa-two-col { grid-template-columns: 1fr; } }

.oa-problem {
    border: 1px solid var(--oa-border);
    border-radius: var(--oa-radius);
    padding: 18px 20px;
    background: #fff;
}
.oa-problem h3 { font-size: 1.02rem; margin: 0 0 8px; color: var(--oa-red); }
.oa-problem p { margin: 0; font-size: 15px; color: var(--oa-text); }
