/* ==========================================================================
   OFFICIAL POLISH LAYER — Journal of Rangpur Medical College (JRPMC)

   Loaded LAST on purpose. It does not move anything: no widths, grids,
   paddings or display rules are changed here. It only unifies the visual
   tone across the whole site so every page reads like one official,
   institutional publication:

     1. one colour palette (navy ink, institutional green, soft gold accent)
     2. one corner radius scale (buttons 6px, cards 10px, panels 14px)
     3. quiet, consistent shadows and restrained hover feedback
     4. plain page background (no decorative gradient blobs)
     5. consistent heading / body / link colours

   To disable temporarily, comment out the addStyle('officialPolishStyle')
   call in NsmAcademicThemePlugin.php.
   ========================================================================== */

:root {
  /* palette */
  --op-ink: #0f1f33;          /* headings */
  --op-text: #1f2937;         /* running text */
  --op-muted: #5b6b7f;        /* secondary text */
  --op-navy: #0a2540;         /* brand navy */
  --op-green: #04663a;        /* institutional green */
  --op-green-soft: #e8f4ee;
  --op-gold: #b8922a;         /* toned-down gold accent */
  --op-line: #dde3ea;         /* borders */
  --op-line-soft: #eef2f6;
  --op-bg: #f5f7fa;           /* page background */
  --op-card: #ffffff;

  /* radius scale */
  --op-r-sm: 6px;
  --op-r-md: 10px;
  --op-r-lg: 14px;

  /* shadows */
  --op-sh-xs: 0 1px 2px rgba(15, 31, 51, 0.05);
  --op-sh-sm: 0 2px 8px -2px rgba(15, 31, 51, 0.10);
  --op-sh-md: 0 8px 24px -14px rgba(15, 31, 51, 0.22);

  /* re-point the older token sets so legacy rules follow the same palette */
  --ru-primary: var(--op-navy);
  --ru-text: var(--op-text);
  --ru-text-muted: var(--op-muted);
  --ru-border: var(--op-line);
  --ru-border-light: var(--op-line-soft);
  --ru-gold: var(--op-gold);
  --ru-radius: var(--op-r-md);
  --ru-radius-lg: var(--op-r-lg);
  --ru-shadow-sm: var(--op-sh-xs);
  --ru-shadow-md: var(--op-sh-sm);
  --ru-shadow-lg: var(--op-sh-md);

  --jx-navy: var(--op-navy);
  --jx-green: var(--op-green);
  --jx-gold: var(--op-gold);
  --jx-ink: var(--op-ink);
  --jx-muted: var(--op-muted);
  --jx-line: var(--op-line);
  --jx-shadow: var(--op-sh-md);
  --jx-shadow-sm: var(--op-sh-sm);

  --mj-navy: var(--op-ink);
  --mj-text-main: var(--op-text);
  --mj-text-muted: var(--op-muted);
  --mj-border: var(--op-line);
  --mj-border-subtle: var(--op-line-soft);
  --mj-bg-page: var(--op-bg);
  --mj-radius-sm: var(--op-r-sm);
  --mj-radius-md: var(--op-r-md);
  --mj-radius-lg: var(--op-r-lg);
  --mj-shadow-sm: var(--op-sh-xs);
  --mj-shadow-md: var(--op-sh-sm);
  --mj-shadow-lg: var(--op-sh-md);
}

/* --------------------------------------------------------------------------
   1. Page canvas: plain, calm background
   -------------------------------------------------------------------------- */
body {
  background: var(--op-bg) !important;
  color: var(--op-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   2. Typography colour consistency
   -------------------------------------------------------------------------- */
body h1, body h2, body h3, body h4, body h5, body h6 {
  color: var(--op-ink);
}

body .jx-head h2, body .jx-card h3, body .jx-issue-card h3 a,
body .smc_card_title, body .ru_card_title,
body .mj_article_title, body .mj_abstract_title, body .mj_section_heading,
body .obj_article_summary .title, body .obj_article_summary .title a {
  color: var(--op-ink) !important;
}

/* Dark banner / hero / dark card / CTA / sidebar / footer headings must remain crisp white */
body .jx-hero-title,
body .jx-hero-title .jx-hero-prefix,
body .jx-hero-prefix,
body .jx-hero h1,
body .jx-hero h2,
body .jx-hero h3,
body .jx-issue-hero h1,
body .jx-issue-hero h2,
body .jx-issue-hero h3,
body .jx-cta h1,
body .jx-cta h2,
body .jx-cta h3,
body .jx-cta h4,
body .jx-cta .tag,
body .jx-facts strong,
body .jx-auth-art h1,
body .jx-auth-art h2,
body .jx-auth-art h3,
body .jx-auth-art h4,
body .ru_eth_card h1,
body .ru_eth_card h2,
body .ru_eth_card h3,
body .ru_eth_card h4,
body .ru_eth_title,
body .ru_oa_card h1,
body .ru_oa_card h2,
body .ru_oa_card h3,
body .ru_oa_card h4,
body .ru_oa_title,
body .ru_index_card h1,
body .ru_index_card h2,
body .ru_index_card h3,
body .ru_index_card h4,
body .ru_index_name,
body .ru_flow_card h1,
body .ru_flow_card h2,
body .ru_flow_card h3,
body .ru_flow_card h4,
body .ru_flow_title,
body .ru_adv_box h1,
body .ru_adv_box h2,
body .ru_adv_box h3,
body .ru_adv_box h4,
body .ru_adv_box_title,
body .ru_hist_hero h1,
body .ru_hist_hero h2,
body .ru_hist_title,
body .ru_journal_box h2,
body .ru_journal_box h3,
body .ru_jb_title,
body .j_portal_hero h1,
body .j_portal_title,
body .j_cfp_card h2,
body .j_cfp_card h3,
body .j_cfp_title,
body .j_sidebar_header h3,
body .j_sidebar_title,
body .cc_header h1,
body .cc_header h2,
body .cc_header h3,
body .ru_action_banner h3,
body .ru_action_idx h3,
body .ru_action_oa h3,
body .ru_action_eth h3,
body .ru_action_rev h3,
body .smc_action_banner h3,
body [class*="action_banner"] h3,
body [class*="ru_action_"] h3,
body .j_footer h1,
body .j_footer h2,
body .j_footer h3,
body .j_footer h4,
body .j_footer_col_title,
body .j_footer_brand_name {
  color: #ffffff !important;
}

/* Soft gold headings / kickers on dark navy & green panels */
body .jx-facts h3,
body .sp_aside h3,
body .sp_aside h4,
body .jx-hero .jx-kicker,
body .jx-issue-hero .jx-kicker {
  color: var(--jx-gold-soft, #f7e08a) !important;
}

/* Readable light body text inside dark cards & banners */
body .jx-cta p,
body [class*="ru_action_"] p,
body .smc_action_banner p,
body .ru_eth_desc,
body .ru_oa_desc,
body .ru_index_desc,
body .ru_flow_desc,
body .ru_adv_box_desc {
  color: #d8eee3 !important;
}

body .jx-hero-title em {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body .jx-hero-title small {
  color: var(--jx-gold-soft, #f7e08a) !important;
}

body .ru_page_sub, body .smc_card_sub, body .ru_card_sub,
body .jx-head p.sub, body .jx-card p, body .jx-issue-card .dsc,
body .j_article_abstract_snippet, body .mj_meta_item,
body .mj_author_podobi, body .mj_meta_caption {
  color: var(--op-muted) !important;
}

/* eyebrow / kicker labels on light backgrounds: one green, one tracking */
body .jx-head .eyebrow, body .jx-issue-card .series,
body .mj_keywords_label, body .mj_action_label {
  color: var(--op-green) !important;
  letter-spacing: 0.14em;
}

/* links inside content */
body .mj_text_flow a, body .ru_rich_text a, body .smc_card p a,
body .jx-welcome-text a, body .j_article_abstract_snippet a {
  color: var(--op-green);
  text-decoration: underline;
  text-decoration-color: rgba(4, 102, 58, 0.35);
  text-underline-offset: 2px;
}
body .mj_text_flow a:hover, body .ru_rich_text a:hover,
body .smc_card p a:hover, body .jx-welcome-text a:hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   3. Cards & panels: one radius, one border, one quiet shadow
   -------------------------------------------------------------------------- */
body .jx-card,
body .jx-issue-card,
body .jx-issue-band,
body .jx-stat,
body .jx-panel,
body .smc_card,
body .ru_card,
body .smc_m_card,
body .smc_feature_box,
body .obj_article_summary,
body .mj_article_wrapper,
body .mj_hero_meta_card,
body .j_main_content_wrapper > .page {
  border-radius: var(--op-r-lg) !important;
  border-color: var(--op-line) !important;
  box-shadow: var(--op-sh-sm) !important;
  background-image: none !important;
}

body .mj_abstract_box {
  border-radius: var(--op-r-md) !important;
  border-color: var(--op-line) !important;
  border-left-color: var(--op-green) !important;
  background: #fafbfc !important;
}

/* the article list card keeps its gold accent strip, in the softer gold */
body .obj_article_summary {
  border-left: 4px solid var(--op-gold) !important;
  background: var(--op-card) !important;
}

/* hero / banner panels: keep their fill, just calm the corners */
body .jx-issue-hero,
body .smc_page_header,
body .ru_page_header,
body .jxs_hero,
body .smc_action_banner {
  border-radius: var(--op-r-lg) !important;
  box-shadow: var(--op-sh-md) !important;
}

/* single-colour top strip on cards; no tilt glare */
body .jx-card::before,
body .jx-stat::before { background: var(--op-green) !important; }
body .jx-glare { display: none !important; }

/* --------------------------------------------------------------------------
   4. Hover feedback: present, but restrained (no 4–6px jumps)
   -------------------------------------------------------------------------- */
body .jx-card:hover,
body .jx-issue-card:hover,
body .obj_article_summary:hover,
body .smc_card:hover,
body .ru_card:hover,
body .jx-stat:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--op-sh-md) !important;
  border-color: #cfd8e3 !important;
}

body .jx-card:hover .ico { transform: translateZ(28px) !important; }

/* --------------------------------------------------------------------------
   5. Buttons & pills: flat institutional style
   -------------------------------------------------------------------------- */
body .jx-btn,
body .smc_btn,
body .mj_license_badge,
body .j_footer_issn_tag.j_bmdc_btn,
body .page_login button[type='submit'],
body .page_login .submit,
body .page_register .buttons .login,
body .page_login .buttons .register {
  border-radius: var(--op-r-sm) !important;
  letter-spacing: 0.01em;
  box-shadow: var(--op-sh-xs) !important;
}

body .jx-btn::after { display: none !important; }           /* shine sweep off */

body .jx-btn:hover,
body .smc_btn:hover,
body .j_footer_issn_tag.j_bmdc_btn:hover,
body .page_login button[type='submit']:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--op-sh-sm) !important;
}

body .jx-btn-green,
body .page_login button[type='submit'],
body .page_login .submit {
  background: var(--op-green) !important;
}
body .jx-btn-green:hover,
body .page_login button[type='submit']:hover { background: #055a33 !important; }

body .jx-btn-gold {
  background: var(--op-gold) !important;
  color: #ffffff !important;
}
body .jx-btn-gold:hover { background: #a37f22 !important; }

body .jx-btn-ghost {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: none !important;
}

/* chips, pills, badges */
body .jx-chip,
body .mj_keyword_pill,
body .j_article_type_badge,
body .jx-card .badge,
body .mj_oa_tag,
body .mj_badge_article_type,
body .mj_access_status_badge,
body .jx-issue-hero .pill,
body .obj_galley_link.pdf .jx-flip-tag {
  border-radius: var(--op-r-sm) !important;
  box-shadow: none !important;
  letter-spacing: 0.04em;
}

body .mj_keyword_pill {
  background: var(--op-green-soft) !important;
  color: var(--op-green) !important;
  border-color: #cfe5d9 !important;
}
body .mj_keyword_pill:hover {
  background: var(--op-green) !important;
  color: #ffffff !important;
  border-color: var(--op-green) !important;
}

body .mj_badge_article_type { background: var(--op-navy) !important; }

body .j_article_type_badge {
  background: var(--op-green-soft) !important;
  color: var(--op-green) !important;
  border-color: #cfe5d9 !important;
}

/* --------------------------------------------------------------------------
   6. Header, navigation, footer: crisp edges, single accent line
   -------------------------------------------------------------------------- */
body .j_top_bar {
  background: var(--op-card) !important;
  border-bottom: 1px solid var(--op-line) !important;
  box-shadow: none !important;
}

body .j_nav_bar {
  box-shadow: var(--op-sh-xs) !important;
}

body .j_nav_link,
body .j_dropdown_item { letter-spacing: 0.01em; }

body .j_dropdown_menu {
  border-radius: var(--op-r-md) !important;
  border: 1px solid var(--op-line) !important;
  box-shadow: var(--op-sh-md) !important;
}

body .j_issn_card,
body .j_top_left .j_issn_card,
body .j_top_right .j_issn_card {
  border-radius: var(--op-r-sm) !important;
  box-shadow: var(--op-sh-xs) !important;
  background-image: none !important;
}
body .j_top_left .j_issn_card  { background: var(--op-green) !important; border-color: var(--op-green) !important; }
body .j_top_right .j_issn_card { background: #fbf6e8 !important; border-color: #e6d6a8 !important; }

body .j_footer { border-top: 3px solid var(--op-green) !important; }
body .j_footer_col_title {
  color: #ffffff !important;
  letter-spacing: 0.08em;
}
body .j_footer_brand_name {
  color: #ffffff !important;
}
body .j_footer_links a {
  color: #cbd5e1 !important;
}
body .j_footer_links a:hover {
  color: #f7e08a !important;
}
body .j_footer_desc {
  color: #cbd5e1 !important;
}
body .j_footer_issn_tag { border-radius: var(--op-r-sm) !important; }

/* --------------------------------------------------------------------------
   7. Article landing page: match the rest of the site
   -------------------------------------------------------------------------- */
body .mj_top_masthead { border-bottom: 1px solid var(--op-line) !important; }

body .mj_journal_badge {
  border-radius: var(--op-r-sm) !important;
  background: var(--op-navy) !important;
}

body .mj_doi_badge,
body .mj_corresp_box,
body .mj_citation_highlight {
  border-radius: var(--op-r-sm) !important;
  border-color: var(--op-line) !important;
  box-shadow: none !important;
}

body .mj_action_toolbar {
  border-top: 1px solid var(--op-line) !important;
  background: #fafbfc !important;
}

body .obj_galley_link,
body .obj_galley_link.pdf {
  border-radius: var(--op-r-sm) !important;
  box-shadow: var(--op-sh-xs) !important;
}
body .obj_galley_link.pdf:hover {
  transform: translateY(-1px) !important;
  box-shadow: var(--op-sh-sm) !important;
}

/* structured abstract: label colours follow the palette (sizes untouched) */
body .mj_abstract_label { color: var(--op-navy) !important; }
body .mj_abstract_row_objective .mj_abstract_label,
body .mj_abstract_row_objectives .mj_abstract_label,
body .mj_abstract_row_aim .mj_abstract_label,
body .mj_abstract_row_aims .mj_abstract_label,
body .mj_abstract_row_methods .mj_abstract_label,
body .mj_abstract_row_method .mj_abstract_label,
body .mj_abstract_row_results .mj_abstract_label,
body .mj_abstract_row_result .mj_abstract_label { color: var(--op-green) !important; }
body .mj_abstract_row_conclusion .mj_abstract_label,
body .mj_abstract_row_conclusions .mj_abstract_label { color: var(--op-gold) !important; }

/* --------------------------------------------------------------------------
   8. Forms & tables: consistent edges
   -------------------------------------------------------------------------- */
body input[type='text'], body input[type='email'], body input[type='password'],
body input[type='search'], body select, body textarea {
  border-radius: var(--op-r-sm) !important;
  border-color: var(--op-line) !important;
}
body input:focus, body select:focus, body textarea:focus {
  border-color: var(--op-green) !important;
  box-shadow: 0 0 0 3px rgba(4, 102, 58, 0.12) !important;
}

body .mj_clinical_table th { background: #f1f4f8 !important; color: var(--op-ink) !important; }
body .mj_clinical_table td { border-color: var(--op-line-soft) !important; }

/* --------------------------------------------------------------------------
   9. Motion: shorter, calmer transitions site-wide
   -------------------------------------------------------------------------- */
body .jx-card, body .jx-issue-card, body .obj_article_summary,
body .smc_card, body .ru_card, body .jx-stat, body .jx-btn, body .smc_btn,
body .obj_galley_link, body .mj_keyword_pill {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
              background-color 0.18s ease, color 0.18s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  body * { transition: none !important; animation: none !important; }
}
