:root {
  --primary: #0b3d91;
  --accent: #b00028;
  --dark: #172033;
  --text: #1f2937;
  --muted: #58677c;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

/* Header */

.journal-topbar {
  width: 100%;
  background: #ffffff;
  border-top: 5px solid var(--primary);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  padding: 18px 40px;
}

.journal-brand {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 28px;
}

.hu-logo {
  width: 95px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.hjhpd-logo {
  width: 105px;
  height: auto;
  display: block;
  margin: 0 auto;
}

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

.journal-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  color: #102033;
  line-height: 1.15;
}

.journal-university {
  font-size: 18px;
  margin-top: 6px;
  color: #4b5563;
}

.journal-issn {
  font-size: 15px;
  margin-top: 6px;
  color: #6b7280;
}

/* Layout */

.mdpi-layout {
  max-width: 1500px;
  margin: 35px auto;
  padding: 0 35px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 92px;
  gap: 30px;
  align-items: start;
}

.left-toc {
  position: sticky;
  top: 22px;
  height: fit-content;
  max-height: calc(100vh - 45px);
  overflow-y: auto;
  background: var(--white);
  border-left: 5px solid var(--primary);
  padding: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}

#toc h3 {
  margin: 0 0 18px;
  font-size: 19px;
  color: var(--dark);
}

#toc a {
  display: block;
  padding: 7px 0;
  color: var(--primary);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.45;
}

#toc a:hover { text-decoration: underline; }

.article {
  min-width: 0;
  background: var(--white);
  padding: 52px 66px;
  box-shadow: 0 10px 35px rgba(0,0,0,.08);
  font-family: Georgia, "Times New Roman", serif;
}

.article-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 32px;
}

.article-labels { margin-bottom: 18px; }

.badge-open,
.badge-article {
  display: inline-block;
  padding: 5px 11px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-right: 6px;
}

.badge-open { background: #4d5575; }

.badge-article {
  background: var(--accent);
  text-transform: uppercase;
}

#article-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--dark);
  margin: 24px 0 20px;
  font-weight: 700;
}

.authors {
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 19px;
  line-height: 1.6;
  font-weight: 600;
  color: #34405a;
  margin: 18px 0;
}

.author-sup {
  font-size: 65%;
  vertical-align: super;
  margin-left: 2px;
  color: #000;
  font-weight: 600;
}

.affiliations { margin-top: 18px; }

.affiliations p {
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #374151;
  margin: 8px 0;
}

.article-meta-line {
  margin: 26px 0 18px;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #111827;
}

.article-meta-line p { margin: 8px 0; }

.article-meta-line a {
  color: #2b4f86;
  font-weight: 700;
  text-decoration: none;
}

.article-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 4px;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
}

.article-buttons a,
.article-buttons a:visited,
.article-buttons a:hover,
.article-buttons a:active,
.article-buttons button {
  background: #4d5575;
  color: #ffffff !important;
  border: 0;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.article-buttons a:hover,
.article-buttons a:visited:hover,
.article-buttons button:hover {
  background: #333b59;
  color: #ffffff !important;
}

/* Content */

.article h2 {
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 30px;
  color: var(--primary);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-top: 38px;
}

.article h3 {
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 23px;
  margin-top: 30px;
  color: #123861;
}

.article h4 {
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  font-size: 19px;
  margin-top: 25px;
  color: #25364b;
}

.article p {
  font-size: 18px;
  line-height: 1.85;
  margin: 1em 0;
  text-align: justify;
}

.article a { color: var(--primary); }

.keywords {
  background: #f5faff;
  border-left: 5px solid var(--primary);
  padding: 14px 18px;
  border-radius: 6px;
  text-align: left !important;
}

/* Figures and tables */

figure,
.figure-card {
  margin: 34px 0;
  padding: 16px;
  background: #fbfdff;
  border: 1px solid #dce8f6;
  text-align: center;
}

figure img,
.article-figure-img {
  width: 100%;
  max-width: 920px;
  height: auto;
  border: 1px solid #d7e1ee;
  background: #fff;
  cursor: zoom-in;
}

figcaption {
  font-size: 15px;
  color: #34465d;
  line-height: 1.6;
  text-align: left;
  margin: 12px auto 0;
  max-width: 920px;
}

.table-card {
  margin: 30px 0;
  overflow: auto;
  border: 1px solid #dce8f6;
  background: #fff;
}

.table-caption {
  padding: 16px 18px;
  background: #f7fbff;
  border-bottom: 1px solid #dce8f6;
}

.data-link {
  float: right;
  font-size: 13px;
  background: var(--primary);
  color: #fff !important;
  border-radius: 999px;
  padding: 4px 10px;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th {
  background: #071d3a;
  color: #fff;
  text-align: left;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf7;
  vertical-align: top;
}

/* ==========================================================
   EQUATIONS
   ========================================================== */

.equation{
    position: relative;
    margin: 32px auto;
    padding: 22px 85px 22px 35px;

    background: transparent !important;

    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;

    text-align: center;
    overflow-x: auto;
}

/* Equation number */

.eq-number{
    position: absolute;
    right: 18px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 20px;
    font-weight: 700;

    color: #4b5563;
}

/* MathJax equations */

.equation mjx-container,
mjx-container,
.MathJax,
.MathJax_Display{
    background: transparent !important;
    color: #111827 !important;
    font-size: 125% !important;
}

/* ==========================================================
   FIX WORD/PANDOC GENERATED EQUATION TABLES
   ========================================================== */

/* Remove table background */

.article table{
    background: transparent !important;
}

/* Remove dark table headers */

.article table th{
    background: transparent !important;
    color: #111827 !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center !important;
    font-weight: normal !important;
}

/* Remove dark table cells */

.article table td{
    background: transparent !important;
    color: #111827 !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center !important;
}

/* Equation number column */

.article table td:last-child{
    width: 70px !important;
    color: #4b5563 !important;
    font-weight: 700 !important;
}

/* Remove any inherited dark background */

.article table mjx-container,
.article table .MathJax,
.article table .MathJax_Display,
.article table .math,
.article table .math.display{
    background: transparent !important;
    color: #111827 !important;
}

/* Remove row coloring */

.article table tr{
    background: transparent !important;
}

/* Remove hover effects if present */

.article table tr:hover{
    background: transparent !important;
}

/* References */

#references li {
  margin-bottom: 12px;
  padding-left: 4px;
}

#references li:target {
  background: #fff4d6;
  outline: 2px solid #ffd35b;
  border-radius: 6px;
}

/* Right tools */

.right-tools {
  position: sticky;
  top: 22px;
  background: var(--white);
  padding: 14px 8px;
  height: fit-content;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}

.right-tools button,
.right-tools a {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #34405a;
  text-decoration: none;
  font-size: 24px;
  margin: 16px 0;
  cursor: pointer;
}

.right-tools span {
  font-size: 13px;
  display: block;
  margin-top: 4px;
}

/* Cite popup */

.cite-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.cite-modal-box {
  background: #fff;
  max-width: 760px;
  width: 90%;
  padding: 32px;
  border-radius: 8px;
  position: relative;
}

.cite-modal-box h2 {
  margin-top: 0;
  color: var(--primary);
}

.cite-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Responsive */

@media (max-width: 1100px) {
  .mdpi-layout {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 16px;
  }

  .article {
    order: 1 !important;
    padding: 26px !important;
  }

  .left-toc {
    order: 2 !important;
    position: static;
  }

  .right-tools {
    order: 3 !important;
    position: static;
  }

  #article-title {
    font-size: 30px !important;
    line-height: 1.22 !important;
  }

  .article p {
    font-size: 16.5px;
    line-height: 1.75;
    text-align: left;
  }

  .journal-topbar { padding: 12px 18px; }

  .journal-brand {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hu-logo { width: 70px; }

  .hjhpd-logo { width: 80px; }

  .journal-name { font-size: 24px; }

  .journal-university { font-size: 15px; }

  .journal-issn { font-size: 13px; }
}

/* FORCE REMOVE BLACK BACKGROUND FROM EQUATION TABLES */

.article table,
.article table tr,
.article table td,
.article table th,
.article table tbody,
.article table thead {
  background: transparent !important;
  color: #111827 !important;
}

.article table th {
  background-color: transparent !important;
  background-image: none !important;
  color: #111827 !important;
}

.article table td {
  background-color: transparent !important;
  background-image: none !important;
  color: #111827 !important;
}

.article table mjx-container,
.article table .MathJax,
.article table .MathJax_Display,
.article table .math,
.article table .math.display {
  background: transparent !important;
  color: #111827 !important;
}

/* Keep real data tables readable */
.article table:not(.equation-table) th {
  background: #f8fafc !important;
  color: #172033 !important;
  border-bottom: 2px solid #dbe5f1 !important;
}
.webmap-frame {
  width: 100%;
  height: 760px;
  margin: 25px 0;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.webmap-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.webmap-frame {
  width: 100%;
  height: 760px;
  margin: 25px 0;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.article-buttons a,
.article-buttons a:link,
.article-buttons a:visited,
.article-buttons a:hover,
.article-buttons a:active,
.article-buttons button {
  color: #ffffff !important;
  text-decoration: none !important;
}
.orcid-icon{
  width:16px;
  height:16px;
  vertical-align:middle;
  margin-left:4px;
  margin-right:8px;
}

.orcid-link{
  text-decoration:none;
}
.right-tools a,
.right-tools button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.right-tools .tool-icon {
  display: block;
  font-size: 26px;
  line-height: 1;
}