/* =========================================================
   MODERN ACADEMIC JOURNAL STYLE – STABLE OJS VERSION
   + Affiliation numbering
   + Proper dynamic OJS logo positioning
   ========================================================= */

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

:root{
  --bg-main:#f6f8fb;
  --bg-card:#ffffff;
  --accent:#1f3c88;
  --accent-soft:#e8eefc;
  --text-main:#1a1a1a;
  --text-light:#5f6b7a;
  --border-soft:#e4e9f2;
  --shadow-soft:0 8px 28px rgba(0,0,0,0.05);
  --radius:14px;
}

/* =========================================================
   BASE
   ========================================================= */

html,body{
  margin:0;
  padding:0;
  background:var(--bg-main);
  font-family:"Inter",system-ui,-apple-system,sans-serif;
  color:var(--text-main);
  line-height:1.75;
}

/* =========================================================
   ARTICLE CARD
   ========================================================= */

.article{
  max-width:1100px;
  margin:40px auto;
  padding:60px 50px 40px;
  background:var(--bg-card);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,h2,h3,h4{
  font-family:"Playfair Display",serif;
  line-height:1.3;
}

.article-title{
  font-size:2.6rem;
  text-align:center;
  margin:10px 0 15px;
  color:var(--accent);
}

.section__title{
  margin-top:2.8rem;
  margin-bottom:1rem;
  font-size:1.5rem;
  color:var(--accent);
  position:relative;
}

.section__title::after{
  content:"";
  display:block;
  width:50px;
  height:3px;
  background:var(--accent);
  margin-top:8px;
  border-radius:3px;
  opacity:.35;
}

/* =========================================================
   HEADER GRID
   ========================================================= */

.article__header{
  display:grid;
  gap:1rem;
  align-items:start;
  padding:0;
  margin:0;
}

.journal-header-top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin:0;
  padding:0;
}

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

.article-title,
.article-doi,
.article-pubdate,
.article-authors,
.affiliations,
.abstract,
.keywords{
  grid-column:1 / -1;
}

/* Journal meta */

.journal-meta{
  text-align:right;
  font-size:.85rem;
  color:var(--text-light);
  line-height:1.35;
}

.journal-meta div{
  margin-bottom:2px;
}

.journal-issue {
  font-size:0.8rem;
  color:var(--text-light);
  margin-top:0;
}

.journal-title{
  font-weight:600;
  color:var(--accent);
  margin-bottom:4px;
}

/* DOI */

.article-doi{
  display:block;
  text-align:center;
  font-size:.95rem;
  color:var(--accent);
  margin-bottom:0;
}

.article-pubdate{
  text-align:center;
  font-size:0.85rem;
  color:var(--text-light);
  margin-top:4px;
  margin-bottom:1rem;
}

/* =========================================================
   AUTHORS
   ========================================================= */

.author-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:.8rem 1.2rem;
}

.author{
  font-weight:500;
}

.author__affrefs .xref--aff{
  font-size:.75rem;
  vertical-align:super;
  margin-left:3px;
  color:var(--accent);
  font-weight:600;
}

/* =========================================================
   AFFILIATIONS (AUTO NUMBERING)
   ========================================================= */

.affiliations{
  list-style:none;
  padding:0;
  margin:10px auto 30px;
  text-align:center;
  font-size:.9rem;
  color:var(--text-light);
  counter-reset:affiliation;
}

.affiliation{
  margin:4px 0;
  counter-increment:affiliation;
}

.affiliation::before{
  content:counter(affiliation) ". ";
  font-weight:600;
  color:var(--accent);
}

/* =========================================================
   ABSTRACT
   ========================================================= */

.abstract{
  background:var(--accent-soft);
  padding:28px;
  border-radius:var(--radius);
  margin:0 auto 18px;
  box-shadow:var(--shadow-soft);
  max-width:900px;
}

/* =========================================================
   KEYWORDS
   ========================================================= */

.keywords{
  text-align:center;
  margin:0 auto 18px;
  max-width:900px;
}

.article-license {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  box-shadow: none;
  gap: 0.4rem;
  justify-content: center;
}

.article-license__icon {
  height: 22px;
  width: auto;
}

.article-license__text,
.article-license__link {
  font-size: 0.8rem;
  color: var(--text-light);
}

.keyword-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
}

.keyword{
  background:#f0f3fa;
  padding:7px 16px;
  border-radius:999px;
  font-size:.85rem;
  color:var(--accent);
  font-weight:500;
}

/* =========================================================
   FIGURES (NO UPSCALE)
   ========================================================= */

figure.figure{
  background:#fff;
  padding:18px;
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  margin:2rem auto;
  max-width:900px;
  text-align:center;
}

img.figure__img{
  display:block;
  width:auto !important;
  max-width:100% !important;
  height:auto !important;
  margin:0 auto;
}

.figure__caption{
  font-size:.85rem;
  color:var(--text-light);
  margin-top:.8rem;
}

/* =========================================================
   TABLES
   ========================================================= */

.table--inline{
  margin:2rem auto;
  overflow-x:auto;
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:10px;
}

.table__data{
  width:100%;
  border-collapse:collapse;
  min-width:720px;
}

.table__data th{
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:600;
}

.table__data th,
.table__data td{
  padding:12px 14px;
  border-bottom:1px solid var(--border-soft);
  text-align:left;
  vertical-align:top;
  font-size:.9rem;
}

.table__data td{
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}

/* =========================================================
   REFERENCES (WRAPPING SAFE)
   ========================================================= */

.references{
  margin-top:3rem;
  padding-top:2rem;
  border-top:1px solid var(--border-soft);
}

.ref-list{
  padding-left:1.2rem;
  max-width:900px;
}

.ref{
  margin-bottom:.7rem;
  font-size:.92rem;
  line-height:1.6;
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}

.references .ref a{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:640px){

  .article{
    margin:20px;
    padding:40px 20px 20px;
  }

  .article__header{
    text-align:center;
  }

  .journal-header-top {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .journal-meta{
    text-align:center;
  }

  .article-title{
    font-size:1.9rem;
  }

  .table__data{
    min-width:640px;
  }
}
