/* ============================================================
   CPSM — ScienceDirect-style overlay on OJS Default Theme
   Conference Proceedings in Science and Management
   
   PHILOSOPHY: This is an OVERLAY, not a layout rewrite.
   OJS default theme handles structure, spacing, sidebar positioning.
   We only restyle: colors, typography, small accents.
   
   Accent: SHORAM copper (replaces Elsevier orange)
   Editorial production: SHORAM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* SHORAM accent (replaces Elsevier orange) */
  --accent:              #B87333;
  --accent-hover:        #8E5826;
  --accent-soft:         #C4884A;
  --accent-bg:           #FBF4EC;

  /* ScienceDirect-style neutrals */
  --rule:                #E1E1E1;
  --rule-strong:         #CCCCCC;
  --text:                #212121;
  --text-muted:          #555555;
  --text-meta:           #6B6B6B;
  --link:                #0B5394;
  --link-hover:          #064a86;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
}

/* ============================================================
   1. PAGE BASE — typography + base color only
   ============================================================ */

body {
  font-family: var(--sans) !important;
  color: var(--text) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   2. HEADINGS — sans-serif, dark, ScienceDirect proportions
   ============================================================ */

h1, h2, h3, h4, h5, h6,
.page-header,
.page-title {
  font-family: var(--sans) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
}

h1, .page-header h1 { font-size: 1.75rem !important; }
h2 { font-size: 1.25rem !important; }
h3 { font-size: 1.05rem !important; }

/* ============================================================
   3. MASTHEAD
   ============================================================ */

.header_view h1,
.header_view h2,
.header_view .title h2 {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

.header_view img,
.header_view .logo img {
  max-height: 50px;
  width: auto;
}

/* ============================================================
   4. PRIMARY NAVIGATION — current-tab copper underline
   ============================================================ */

.pkp_navigation_primary > ul > li > a,
nav.cmp_navigation_primary a {
  font-family: var(--sans) !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-bottom: 3px solid transparent !important;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pkp_navigation_primary > ul > li > a:hover,
nav.cmp_navigation_primary a:hover {
  color: var(--accent-hover) !important;
}

.pkp_navigation_primary > ul > li.current > a,
.pkp_navigation_primary > ul > li.active > a {
  border-bottom: 3px solid var(--accent) !important;
}

/* ============================================================
   5. CONTENT TYPOGRAPHY
   ============================================================ */

main, article {
  font-family: var(--sans);
}

p {
  color: var(--text);
  line-height: 1.6;
}

/* ============================================================
   6. LINKS — ScienceDirect blue
   ============================================================ */

a {
  color: var(--link);
  transition: color 0.15s ease;
}

a:hover, a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Nav and header links — no underline on idle */
nav a,
.pkp_navigation_primary a,
.header_view a {
  text-decoration: none !important;
}

/* Article/issue/announcement title links — dark, hover copper */
.obj_article_summary .title a,
.obj_announcement_summary .title a,
.obj_issue_summary .title a {
  color: var(--text) !important;
  text-decoration: none !important;
}

.obj_article_summary .title a:hover,
.obj_announcement_summary .title a:hover,
.obj_issue_summary .title a:hover {
  color: var(--accent-hover) !important;
  text-decoration: underline !important;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */

.btn,
button.pkp_button,
input[type="submit"],
.cmp_button {
  font-family: var(--sans) !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  border-radius: 3px !important;
  transition: all 0.15s ease !important;
}

/* Primary / CTA — solid copper */
.btn-primary,
.btn.btn-primary,
button.pkp_button_primary,
.pkp_button_primary,
.btn-cta,
.cpsm_submit_cta {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
  font-weight: 600 !important;
}

.btn-primary:hover,
.btn.btn-primary:hover,
button.pkp_button_primary:hover,
.btn-cta:hover,
.cpsm_submit_cta:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  color: #ffffff !important;
}

/* Secondary — copper outline */
.btn-default,
.btn.btn-default {
  border-color: var(--accent) !important;
  color: var(--accent-hover) !important;
}

.btn-default:hover,
.btn.btn-default:hover {
  background-color: var(--accent-bg) !important;
  color: var(--accent-hover) !important;
  border-color: var(--accent) !important;
}

/* ============================================================
   8. FORMS — focus state in copper
   ============================================================ */

input:focus, textarea:focus, select:focus {
  border-color: var(--accent) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.15) !important;
}

/* ============================================================
   9. SIDEBAR BLOCKS — typography only, NO layout changes
   Labels are now bold, dark, visible at any size
   ============================================================ */

/* Sidebar block titles — dark, bold, clearly visible */
.pkp_block .title,
.pkp_block h2,
.pkp_block > h3 {
  font-family: var(--sans) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  border-bottom: 2px solid var(--accent) !important;
  padding-bottom: 0.4rem !important;
  margin-bottom: 0.65rem !important;
  display: block;
}

.pkp_block {
  font-family: var(--sans);
}

.pkp_block a {
  color: var(--link);
}

.pkp_block a:hover {
  color: var(--accent-hover);
}

/* ============================================================
   10. HOMEPAGE INTRO PANEL — typography only
   ============================================================ */

.additional_content h2 {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  font-style: normal !important;
}

.additional_content::before {
  content: none !important;  /* remove diamond ornament */
}

/* ============================================================
   11. JOURNAL META BAR (custom block)
   Paste this into a homepage HTML block:
   <div class="cpsm_journal_meta">
     <div class="cpsm_journal_meta_inner">
       <span class="cpsm_journal_meta_item">
         <span class="cpsm_journal_meta_label">ISSN (online)</span>
         <span class="cpsm_journal_meta_value">XXXX-XXXX</span>
       </span>
       <span class="cpsm_journal_meta_item">
         <span class="cpsm_journal_meta_label">Frequency</span>
         <span class="cpsm_journal_meta_value">Annual</span>
       </span>
       <span class="cpsm_journal_meta_item">
         <span class="cpsm_journal_meta_label">Open Access</span>
       </span>
       <a href="/about/submissions" class="btn btn-cta cpsm_journal_meta_cta">
         Submit your article
       </a>
     </div>
   </div>
   ============================================================ */

.cpsm_journal_meta {
  background: #fff;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.cpsm_journal_meta_inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  align-items: center;
}

.cpsm_journal_meta_item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.cpsm_journal_meta_label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-meta);
}

.cpsm_journal_meta_value {
  color: var(--text);
  font-weight: 500;
}

.cpsm_journal_meta_cta {
  margin-left: auto;
}

@media (max-width: 768px) {
  .cpsm_journal_meta_inner { gap: 0.75rem; }
  .cpsm_journal_meta_cta {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }
}

/* ============================================================
   12. ARTICLE LISTINGS — typography + accents
   ============================================================ */

.obj_article_summary .article_type,
.obj_article_summary .section_title {
  display: inline-block;
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  margin-bottom: 0.3rem;
}

.obj_announcement_summary .title,
.obj_article_summary .title,
.obj_issue_summary .title {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}

.obj_article_summary .authors,
.obj_article_summary .author {
  font-family: var(--sans) !important;
  font-style: normal;
  color: var(--text-muted);
}

.meta, .pubdate, .date {
  font-family: var(--sans) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-meta) !important;
  font-weight: 500;
}

/* ============================================================
   13. FOOTER — dark grey, copper accent stripe, SHORAM attribution
   ============================================================ */

.pkp_structure_footer_wrapper,
footer.pkp_structure_footer {
  background-color: #2C2C2C !important;
  color: #DCDCDC !important;
  border-top: 3px solid var(--accent) !important;
  font-family: var(--sans) !important;
}

.pkp_structure_footer p,
.pkp_structure_footer li {
  color: #DCDCDC !important;
}

.pkp_structure_footer a,
.cpsm_footer a {
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.pkp_structure_footer a:hover,
.cpsm_footer a:hover {
  color: var(--accent-soft) !important;
  text-decoration: underline !important;
}

/* If you use the custom .cpsm_footer layout, these style it */
.cpsm_footer_journal {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
}

.cpsm_footer_tagline {
  font-family: var(--sans) !important;
  font-style: normal !important;
  color: #BFBFBF !important;
}

.cpsm_footer_heading {
  font-family: var(--sans) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #FFFFFF !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Subtle SHORAM attribution
   HTML usage (drop into any footer column or copyright line):
   <span class="cpsm_shoram_attribution">
     <a href="https://shoramedits.com">SHORAM</a>
   </span>
*/
.cpsm_shoram_attribution {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem !important;
  color: #A8A8A8 !important;
  font-family: var(--sans);
}

.cpsm_shoram_attribution::before {
  content: "Editorial production by";
  color: #888888;
}

.cpsm_shoram_attribution a {
  color: var(--accent-soft) !important;
  font-weight: 600;
}

.cpsm_shoram_attribution a:hover {
  color: #fff !important;
  text-decoration: none !important;
}

.pkp_brand_footer img {
  filter: brightness(0) invert(1);
  max-height: 26px;
  opacity: 0.6;
}

/* ----- Custom .cpsm_footer compact layout ----- */

.cpsm_footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
  text-align: left;
}

.cpsm_footer_grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.cpsm_footer_col {
  font-size: 0.85rem;
  line-height: 1.55;
}

.cpsm_footer_col p {
  margin: 0 0 0.5rem 0 !important;
  color: #DCDCDC !important;
}

.cpsm_footer_journal {
  font-size: 1rem !important;
  margin: 0 0 0.4rem 0 !important;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.cpsm_footer_tagline {
  font-size: 0.85rem !important;
  max-width: 50ch;
  margin: 0 0 0.6rem 0 !important;
}

.cpsm_footer_meta {
  font-size: 0.78rem !important;
  color: #BFBFBF !important;
}

.cpsm_footer_meta em {
  color: var(--accent-soft) !important;
  font-style: italic;
}

.cpsm_footer_heading {
  margin: 0 0 0.6rem 0 !important;
  padding-bottom: 0.4rem;
  font-size: 0.72rem !important;
}

.cpsm_footer_address {
  font-style: normal;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  margin: 0 0 0.5rem 0 !important;
}

.cpsm_footer_links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cpsm_footer_links li {
  padding: 0.18rem 0 !important;
  border-bottom: none !important;
  font-size: 0.84rem;
}

/* Baseline / copyright row — flat, single line */
.cpsm_footer_baseline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cpsm_footer_baseline p {
  margin: 0 !important;
  font-size: 0.76rem !important;
  color: #A8A8A8 !important;
}

/* Mobile collapse */
@media (max-width: 900px) {
  .cpsm_footer_grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
  .cpsm_footer_identity {
    grid-column: 1 / -1;
  }
  .cpsm_footer_baseline {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .cpsm_footer_grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* ============================================================
   14. TABLES
   ============================================================ */

table th {
  background-color: #F5F5F5 !important;
  color: var(--text) !important;
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  border-bottom: 2px solid var(--rule-strong) !important;
}

table td {
  border-bottom: 1px solid var(--rule) !important;
  font-family: var(--sans);
}

/* ============================================================
   15. STATIC PAGES — typography only
   ============================================================ */

.static_page h1::after {
  content: none;  /* remove the centered copper underline */
}

.static_page h1 {
  text-align: left;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.85rem;
}

.static_page h2 {
  border-bottom: none;
}

.static_page strong {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   16. PAGINATION
   ============================================================ */

.pagination a,
.pagination span {
  font-family: var(--sans);
  border-radius: 3px;
}

.pagination a {
  color: var(--link);
}

.pagination a:hover {
  background-color: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.pagination .current {
  background-color: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ============================================================
   17. ARTICLE / ABSTRACT VIEW
   ============================================================ */

.obj_article_details .main_entry .title {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}

.obj_article_details .authors,
.obj_article_details .author {
  font-family: var(--sans) !important;
  font-style: normal;
  color: var(--link);
  font-weight: 500;
}

.obj_article_details .abstract h2 {
  font-family: var(--sans) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-meta) !important;
}

.obj_article_details .keywords .label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-meta);
}

/* PDF / Download buttons — copper CTA */
.obj_article_details .galleys_links a,
.obj_galley_link {
  background-color: var(--accent) !important;
  color: #fff !important;
  font-family: var(--sans) !important;
  border-radius: 3px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border: none !important;
}

.obj_article_details .galleys_links a:hover,
.obj_galley_link:hover {
  background-color: var(--accent-hover) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* ============================================================
   18. ISSUE TOC — section heading accent
   ============================================================ */

.obj_issue_toc .heading {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  border-bottom: 2px solid var(--accent);
}

.obj_issue_toc .section .title,
.section_heading {
  font-family: var(--sans) !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

/* ============================================================
   19. PRINT
   ============================================================ */

@media print {
  body { color: black !important; }
  .pkp_navigation_primary,
  .pkp_structure_sidebar,
  .pkp_structure_footer,
  .header_view,
  .cpsm_journal_meta { display: none !important; }
  a { color: black !important; text-decoration: none !important; }
}

/* ============================================================
   END
   ============================================================ */
