/* ==========================================================================
   Joglo Publisher — Elegant Article List for OJS 3
   Target  : Issue TOC (Current / Archive / Homepage article list)
   Install : bundled in the jogloToc plugin (loaded automatically)
   Pairs with jogloToc/templates/frontend/objects/article_summary.tpl
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --jp-ink:        #15212e;
  --jp-navy:       #0f2a47;
  --jp-navy-2:     #1e4472;
  --jp-gold:       #b08d57;
  --jp-gold-2:     #d6b98a;
  --jp-gold-soft:  #f4ecdf;
  --jp-muted:      #5f6a78;
  --jp-line:       #e7e1d6;
  --jp-paper:      #ffffff;
  --jp-cream:      #faf8f4;
  --jp-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --jp-sans:  'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Line icons (used as masks, so they take the colour of the element) */
  --jp-ic-eye: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/><circle cx='12' cy='12' r='3'/></svg>");
  --jp-ic-down: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3v12'/><path d='M7 10l5 5 5-5'/><path d='M5 21h14'/></svg>");
  --jp-ic-pdf: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6'/><path d='M8 13h8'/><path d='M8 17h5'/></svg>");
  --jp-ic-user: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/></svg>");
}

/* --------------------------------------------------------------------------
   Section heading ("Articles", "Editorial", ...)
   -------------------------------------------------------------------------- */
.obj_issue_toc .sections .section > h2,
.obj_issue_toc .section > h2 {
  display: flex !important;
  align-items: center;
  gap: 16px;
  margin: 2.6rem 0 1.6rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-family: var(--jp-serif) !important;
  font-size: 1.55rem !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  color: var(--jp-navy) !important;
  text-transform: none;
}
.obj_issue_toc .sections .section > h2::before,
.obj_issue_toc .section > h2::before {
  content: "";
  position: static !important;
  flex: none;
  width: 36px;
  height: 2px;
  background: var(--jp-gold);
  border: 0;
}
.obj_issue_toc .sections .section > h2::after,
.obj_issue_toc .section > h2::after {
  content: "";
  position: static !important;
  flex: 1;
  height: 1px;
  background: var(--jp-line);
  border: 0;
}

/* --------------------------------------------------------------------------
   List + card
   -------------------------------------------------------------------------- */
.cmp_article_list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: jp-article;
}
.cmp_article_list > li {
  counter-increment: jp-article;
  margin: 0 0 22px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.cmp_article_list .obj_article_summary {
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  padding: 30px 34px 26px !important;
  background: var(--jp-paper) !important;
  border: 1px solid var(--jp-line) !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 2px rgba(15, 42, 71, .04), 0 10px 28px -16px rgba(15, 42, 71, .14) !important;
  color: var(--jp-ink);
  font-family: var(--jp-sans);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cmp_article_list .obj_article_summary::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--jp-gold), var(--jp-gold-2));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s ease;
}
.cmp_article_list .obj_article_summary:hover {
  transform: translateY(-2px);
  border-color: #dccfb9 !important;
  box-shadow: 0 2px 4px rgba(15, 42, 71, .05), 0 22px 40px -20px rgba(15, 42, 71, .28) !important;
}
.cmp_article_list .obj_article_summary:hover::before { transform: scaleY(1); }

/* Cover image (if the article has one) */
.obj_article_summary .cover {
  float: left;
  width: 92px;
  margin: 4px 24px 10px 0 !important;
}
.obj_article_summary .cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 6px 16px -8px rgba(15, 42, 71, .45);
}

/* --------------------------------------------------------------------------
   Title
   -------------------------------------------------------------------------- */
.obj_article_summary > .title {
  margin: 0 0 16px !important;
  padding: 0 130px 0 0 !important;
  font-family: var(--jp-serif) !important;
  font-size: 1.34rem !important;
  font-weight: 600 !important;
  line-height: 1.36 !important;
  letter-spacing: -.003em;
}
.obj_article_summary > .title::before {
  content: "No. " counter(jp-article, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font: 600 .7rem/1 var(--jp-sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--jp-gold);
}
.obj_article_summary > .title a {
  color: var(--jp-navy) !important;
  text-decoration: none !important;
  background-image: linear-gradient(var(--jp-gold), var(--jp-gold));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size .4s ease, color .2s ease;
}
.obj_article_summary > .title a:hover,
.obj_article_summary > .title a:focus {
  color: var(--jp-navy-2) !important;
  background-size: 100% 1px;
}
.obj_article_summary > .title .subtitle {
  display: block;
  margin-top: 6px;
  font-family: var(--jp-serif);
  font-size: .82em;
  font-style: italic;
  font-weight: 500;
  color: var(--jp-muted);
}

/* --------------------------------------------------------------------------
   Meta: pages, authors, date
   -------------------------------------------------------------------------- */
.obj_article_summary .meta {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.obj_article_summary .pages {
  position: absolute;
  top: 30px;
  right: 34px;
  margin: 0 !important;
  padding: 6px 12px;
  border: 1px solid var(--jp-gold-soft);
  border-radius: 999px;
  background: var(--jp-cream);
  font: 600 .74rem/1 var(--jp-sans);
  letter-spacing: .08em;
  color: var(--jp-muted) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.obj_article_summary .pages::before {
  content: "pp. ";
  color: var(--jp-gold);
}
.obj_article_summary .published {
  margin-top: 8px;
  font-size: .8rem;
  color: var(--jp-muted);
}

/* Default OJS author string (when the companion template is not used) */
.obj_article_summary .meta > .authors {
  position: relative;
  margin: 0 0 4px !important;
  padding-left: 24px;
  font: 500 .94rem/1.6 var(--jp-sans);
  color: var(--jp-ink) !important;
}
.obj_article_summary .meta > .authors::before {
  content: "";
  position: absolute;
  left: 0; top: .3em;
  width: 15px; height: 15px;
  background: var(--jp-gold);
  -webkit-mask: var(--jp-ic-user) center / contain no-repeat;
          mask: var(--jp-ic-user) center / contain no-repeat;
}

/* Structured author list (companion template) */
.obj_article_summary .jp-authors {
  list-style: none !important;
  display: grid;
  gap: 7px;
  margin: 0 !important;
  padding: 0 !important;
}
.obj_article_summary .jp-author {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 1px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: .94rem;
  line-height: 1.5;
}
.obj_article_summary .jp-author-name {
  font-weight: 600;
  color: var(--jp-ink);
}
.obj_article_summary .jp-author-affil {
  font-size: .88rem;
  color: var(--jp-muted);
}
.obj_article_summary .jp-author-affil::before {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--jp-gold);
  vertical-align: middle;
  transform: translateY(-1px);
}
.obj_article_summary .jp-orcid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #a6ce39;
  color: #fff !important;
  font: 700 .5rem/1 var(--jp-sans);
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Footer: statistics + galley buttons
   -------------------------------------------------------------------------- */
.obj_article_summary .jp-footer {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--jp-line);
}

.obj_article_summary .jp-stats {
  list-style: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
}
.obj_article_summary .jp-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 7px 13px;
  border: 1px solid var(--jp-line);
  border-radius: 999px;
  background: var(--jp-cream);
  font: 500 .78rem/1 var(--jp-sans);
  color: var(--jp-muted);
}
.obj_article_summary .jp-stat strong {
  font-weight: 600;
  color: var(--jp-navy);
  font-variant-numeric: tabular-nums;
}
.obj_article_summary .jp-stat::before {
  content: "";
  width: 15px; height: 15px;
  flex: none;
  background: var(--jp-gold);
  -webkit-mask: var(--jp-ic) center / contain no-repeat;
          mask: var(--jp-ic) center / contain no-repeat;
}
.obj_article_summary .jp-stat--views     { --jp-ic: var(--jp-ic-eye); }
.obj_article_summary .jp-stat--downloads { --jp-ic: var(--jp-ic-down); }

/* Galley (PDF) buttons */
.obj_article_summary .galleys_links {
  clear: both;
  list-style: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0 !important;
  padding: 0 !important;
}
.obj_article_summary .jp-footer .galleys_links { margin: 0 !important; }
.obj_article_summary .galleys_links li {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
}
.obj_article_summary .obj_galley_link {
  display: inline-flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  padding: 10px 18px !important;
  border: 1px solid var(--jp-navy) !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--jp-navy) !important;
  font: 600 .76rem/1 var(--jp-sans) !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.obj_article_summary .obj_galley_link::before {
  content: "" !important;
  display: inline-block !important;
  position: static !important;
  width: 15px; height: 15px;
  margin: 0 !important;
  font-family: inherit !important;
  background: currentColor;
  -webkit-mask: var(--jp-ic-pdf) center / contain no-repeat;
          mask: var(--jp-ic-pdf) center / contain no-repeat;
}
.obj_article_summary .obj_galley_link:hover,
.obj_article_summary .obj_galley_link:focus {
  background: var(--jp-navy) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px -10px rgba(15, 42, 71, .7) !important;
}
.obj_article_summary .obj_galley_link.restricted {
  border-color: var(--jp-gold) !important;
  color: #8a6a3a !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .cmp_article_list .obj_article_summary { padding: 24px 20px 20px !important; }
  .obj_article_summary > .title {
    padding-right: 0 !important;
    font-size: 1.16rem !important;
  }
  .obj_article_summary .pages {
    position: static;
    display: inline-block;
    margin: 12px 0 0 !important;
  }
  .obj_article_summary .meta { display: flex; flex-direction: column; }
  .obj_article_summary .meta > .pages { order: 2; align-self: flex-start; }
  .obj_article_summary .jp-author { flex-direction: column; }
  .obj_article_summary .jp-author-affil::before { display: none; }
  .obj_article_summary .jp-footer { flex-direction: column; align-items: stretch; }
  .obj_article_summary .galleys_links li,
  .obj_article_summary .obj_galley_link { width: 100%; justify-content: center; }
  .cover { width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .cmp_article_list .obj_article_summary,
  .cmp_article_list .obj_article_summary::before,
  .obj_article_summary > .title a { transition: none; }
}
