/* ==========================================================================
   IJAESCML — "QUIET HORIZON" SMART JOURNAL THEME  (v5)
   Changes from v4:
   1. ARCHIVES / "Vol. No." LISTING — each issue on the Archives page
      (.obj_issue_summary) is now a proper card/button: cover thumbnail,
      bold volume/issue title in the display serif, a "View Issue" pill
      button, hover lift — matching the same smart-card language as the
      article listings, instead of looking like a plain bullet list.
   2. FONTS/COLOUR — deepened the palette slightly (more ink, less pastel)
      and added a small accent numeral style for "Vol." / "No." so it
      reads as structured, deliberate typography rather than plain text.
   3. BACKGROUND — replaced the golden-hour hillside photo with a muted,
      misty mountain-range image and a cooler, more restrained overlay
      tint (slate + forest, less gold) — closer to how established
      scholarly publishers (IEEE, Springer, Nature-adjacent journals)
      use quiet, serious photography rather than a bright travel photo.
   All prior fixes retained: real flex parent for main+sidebar (with a
   visible divider between them), button-style sidebar links, working
   nav dropdowns, justified body text.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;0,700&family=IBM+Plex+Mono:wght@400;500&display=swap');


/* --------------------------------------------------------------------------
   2. TOKENS — deepened, more serious "scholarly" palette
   -------------------------------------------------------------------------- */
:root {
  --slate-top: #dbe6e4;
  --slate-mid: #eef1ea;
  --hill-far:  #a9c2b6;
  --hill-mid:  #7fa392;
  --hill-near: #4f7a68;

  --paper: #fffdf8;
  --ink-900: #1f2b26;
  --ink-700: #35473e;
  --ink-muted: #647268;

  --accent-clay: #c46a3f;
  --accent-clay-deep: #a3532e;
  --accent-gold: #b98a2c;
  --focus-ring: #c46a3f;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --fs-body: 1rem;
  --lh-body: 1.65;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --gutter: 2rem;
  --content-max: 1140px;
  --sidebar-w: 300px;

  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 6px 22px rgba(31, 43, 38, 0.10);
  --shadow-lift: 0 14px 34px rgba(31, 43, 38, 0.18);

  --z-nav-dropdown: 999;
  --z-header: 100;
}


/* --------------------------------------------------------------------------
   3. BACKGROUND — muted, prestigious scholarly-publisher photo
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body, #container, .pkp_structure_page {
  min-height: 100vh;
  background-color: var(--slate-mid);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-image:
    /* cooler, restrained tint — slate + deep forest, no bright gold wash */
    linear-gradient(180deg,
      rgba(219, 230, 228, 0.55) 0%,
      rgba(238, 241, 234, 0.42) 40%,
      rgba(127, 163, 146, 0.40) 78%,
      rgba(79, 122, 104, 0.46) 100%),
    /* misty mountain range — quiet, serious, editorial tone */
    url("https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=1920&q=80");
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-900);
}
@media (max-width: 780px) {
  body, #container, .pkp_structure_page { background-attachment: scroll; }
}


/* --------------------------------------------------------------------------
   4. JUSTIFIED TEXT
   -------------------------------------------------------------------------- */
body, p, li, td, th, blockquote, figcaption,
.journal_description, .obj_article_summary .authors,
.abstract, .item.abstract, .item.title, .item.authors,
.obj_article_details, .pkp_structure_content, .pkp_structure_main,
.page, .description, .value, .pkp_page_content, .pkp_block,
.entry_description, #homepageAbout, #homepageAbout p,
footer .pkp_footer_content {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
h1, h2, h3, h4, h5, h6,
nav, .menu, .pkp_navigation_primary, .pkp_navigation_user,
.pkp_site_name, .title, .pages, .authors a,
.pkp_button, a.pkp_button {
  text-align: left;
}


/* --------------------------------------------------------------------------
   5. HEADER
   -------------------------------------------------------------------------- */
.pkp_structure_head, header.pkp_structure_head {
  position: relative;
  z-index: var(--z-header);
  overflow: visible;
  width: 100%;
  padding: var(--space-4) 0 var(--space-3);
  background:
    radial-gradient(ellipse 60% 140% at 15% 0%, rgba(185, 138, 44, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(255,255,255,0.46));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--accent-gold);
  box-shadow: var(--shadow-soft);
}

.pkp_site_name_wrapper, .pkp_site_name {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  background: linear-gradient(100deg, var(--ink-900) 10%, var(--hill-near) 45%, var(--accent-clay-deep) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pkp_site_name a { color: inherit; }
.pkp_site_name a:hover { opacity: 0.85; }

.pkp_structure_head .pkp_page_title,
.pkp_structure_head .description,
.pkp_structure_head p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}


/* --------------------------------------------------------------------------
   6. NAVIGATION
   -------------------------------------------------------------------------- */
.pkp_navigation_primary, .pkp_navigation_primary_row {
  position: relative;
  z-index: var(--z-nav-dropdown);
  overflow: visible;
}
.pkp_navigation_primary .menu { overflow: visible; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pkp_navigation_primary .menu > li { position: relative; }

.pkp_navigation_primary .menu > li > a,
nav.menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  border: 1px solid rgba(79, 122, 104, 0.28);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.pkp_navigation_primary .menu > li.has_submenu > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.65;
  transition: transform 0.2s ease;
}
.pkp_navigation_primary .menu > li.has_submenu:hover > a::after,
.pkp_navigation_primary .menu > li.has_submenu:focus-within > a::after {
  transform: rotate(225deg);
}

.pkp_navigation_primary .menu > li > a:hover,
.pkp_navigation_primary .menu > li > a:focus-visible {
  background: linear-gradient(135deg, var(--accent-clay), var(--accent-gold));
  color: #fff8f0;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(196, 106, 63, 0.32);
}

.pkp_navigation_primary .menu > li.current > a,
.pkp_navigation_primary .menu > li > a[aria-current="page"] {
  background: linear-gradient(135deg, var(--hill-near), var(--hill-mid));
  color: #fff;
  border-color: transparent;
}

.pkp_navigation_primary .menu > li > ul,
.pkp_navigation_primary .menu .has_submenu ul,
.pkp_navigation_primary .menu .sub_menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  margin-top: 8px;
  padding: 0.5rem;
  list-style: none;
  background: var(--paper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  z-index: var(--z-nav-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.pkp_navigation_primary .menu > li:hover > ul,
.pkp_navigation_primary .menu > li:focus-within > ul,
.pkp_navigation_primary .menu .has_submenu:hover ul,
.pkp_navigation_primary .menu .has_submenu:focus-within ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.pkp_navigation_primary .menu > li > ul li a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  color: var(--ink-700);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
}
.pkp_navigation_primary .menu > li > ul li a:hover,
.pkp_navigation_primary .menu > li > ul li a:focus-visible {
  background: rgba(127, 163, 146, 0.22);
  color: var(--ink-900);
}
@media (max-width: 780px) {
  .pkp_navigation_primary .menu > li > ul {
    position: static;
    opacity: 1; visibility: visible; transform: none; box-shadow: none;
    background: rgba(255,255,255,0.7);
    margin: 4px 0 8px 0;
  }
}


/* --------------------------------------------------------------------------
   7. LAYOUT — flex on the real parent, dividing line between columns
   -------------------------------------------------------------------------- */
.pkp_structure_page {
  display: flex !important;
  flex-wrap: wrap !important;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-2);
  align-items: flex-start;
}
.pkp_structure_page > *:not(.pkp_structure_main):not(.pkp_structure_sidebar) {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}
.pkp_structure_main {
  flex: 1 1 auto !important;
  width: calc(100% - var(--sidebar-w) - var(--gutter)) !important;
  max-width: calc(100% - var(--sidebar-w) - var(--gutter)) !important;
  min-width: 0;
  margin: var(--space-4) 0 !important;
  margin-right: var(--gutter) !important;
}
.pkp_structure_sidebar {
  flex: 0 0 var(--sidebar-w) !important;
  width: var(--sidebar-w) !important;
  max-width: var(--sidebar-w) !important;
  margin: var(--space-4) 0 !important;
  border-left: 2px solid rgba(79, 122, 104, 0.32);
  padding-left: var(--space-3);
}
@media (max-width: 900px) {
  .pkp_structure_main, .pkp_structure_sidebar {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    border-left: none;
    padding-left: 0;
  }
}


/* --------------------------------------------------------------------------
   8. MAIN CONTENT PANELS
   -------------------------------------------------------------------------- */
.pkp_structure_content, .page, .journal_description, .obj_issue_toc {
  background: rgba(255, 253, 248, 0.93);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-soft);
  color: var(--ink-700);
}
.page h2, .obj_issue_toc h2, .pkp_structure_content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink-900);
  border-bottom: 2px solid var(--hill-mid);
  padding-bottom: 0.4rem;
  margin-top: 0;
}


/* --------------------------------------------------------------------------
   9. ARCHIVES PAGE — "Vol. No." entries as smart cards/buttons
   OJS 3.4 default markup: <div class="obj_issue_summary"> containing
   .issue_cover img, .title (or h2), .series, .description, and a link
   to the issue. Generic fallbacks included in case the theme differs.
   -------------------------------------------------------------------------- */
.obj_issue_summary,
.issues_list .issue,
.pkp_issue_summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--paper);
  border: 1px solid rgba(127, 163, 146, 0.28);
  border-left: 6px solid var(--hill-near);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.obj_issue_summary:hover,
.issues_list .issue:hover,
.pkp_issue_summary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-left-color: var(--accent-clay);
}

.obj_issue_summary .issue_cover img,
.obj_issue_summary .cover img {
  width: 64px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(31, 43, 38, 0.2);
  flex-shrink: 0;
}

/* the "Vol. X, No. Y" title itself — structured, deliberate typography */
.obj_issue_summary .title,
.obj_issue_summary a.title,
.issues_list .issue .title {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-900);
  flex: 1 1 auto;
}
.obj_issue_summary .series,
.obj_issue_summary .description {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* turn the issue link itself into an explicit pill button */
.obj_issue_summary > a,
.obj_issue_summary .title a,
.issues_list .issue > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(127, 163, 146, 0.16), rgba(255,255,255,0.6));
  border: 1px solid rgba(79, 122, 104, 0.3);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.obj_issue_summary > a:hover,
.obj_issue_summary .title a:hover,
.issues_list .issue > a:hover {
  background: linear-gradient(135deg, var(--accent-clay), var(--accent-gold));
  color: #fff8f0;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(196, 106, 63, 0.3);
}

@media (max-width: 560px) {
  .obj_issue_summary, .issues_list .issue, .pkp_issue_summary {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* --------------------------------------------------------------------------
   10. SIDEBAR — button-style links
   -------------------------------------------------------------------------- */
.pkp_structure_sidebar .pkp_block {
  background: rgba(255, 253, 248, 0.9);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-soft);
  color: var(--ink-700);
  font-size: 0.9rem;
}
.pkp_structure_sidebar .pkp_block h2,
.pkp_structure_sidebar .pkp_block .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-clay-deep);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--hill-mid);
}
.pkp_structure_sidebar .pkp_block ul { list-style: none; margin: 0; padding: 0; }
.pkp_structure_sidebar .pkp_block ul li { margin-bottom: 0.5rem; }

.pkp_structure_sidebar .pkp_block ul li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(127, 163, 146, 0.18), rgba(255,255,255,0.5));
  border: 1px solid rgba(79, 122, 104, 0.3);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.pkp_structure_sidebar .pkp_block ul li a::after {
  content: "\2192";
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-weight: 700;
}
.pkp_structure_sidebar .pkp_block ul li a:hover,
.pkp_structure_sidebar .pkp_block ul li a:focus-visible {
  background: linear-gradient(135deg, var(--accent-clay), var(--accent-gold));
  color: #fff8f0;
  border-color: transparent;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 20px rgba(196, 106, 63, 0.3);
}
.pkp_structure_sidebar .pkp_block ul li a:hover::after,
.pkp_structure_sidebar .pkp_block ul li a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.pkp_structure_sidebar a.btn,
.pkp_structure_sidebar .cta a,
.pkp_structure_sidebar a[href*="submissions"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-clay), var(--accent-gold));
  color: #fff8f0 !important;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pkp_structure_sidebar a.btn:hover,
.pkp_structure_sidebar .cta a:hover,
.pkp_structure_sidebar a[href*="submissions"]:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.pkp_structure_sidebar .pkp_block ul.feeds,
.pkp_structure_sidebar .pkp_block .feeds {
  display: flex;
  gap: 0.5rem;
}
.pkp_structure_sidebar .pkp_block .feeds li { margin: 0; }
.pkp_structure_sidebar .pkp_block .feeds li a {
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
}
.pkp_structure_sidebar .pkp_block .feeds li a::after { display: none; }
.pkp_structure_sidebar .pkp_block .feeds img { width: 18px; height: 18px; }


/* --------------------------------------------------------------------------
   11. ARTICLE LISTINGS (current issue)
   -------------------------------------------------------------------------- */
.obj_article_summary {
  background: var(--paper);
  border-left: 5px solid var(--hill-mid);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.obj_article_summary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-left-color: var(--accent-clay);
}
.obj_article_summary .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink-900);
}
.obj_article_summary .authors { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-muted); }
.obj_article_summary .pages { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-gold); }
.obj_article_summary a.file {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--hill-mid);
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.82rem;
}
.obj_article_summary a.file:hover { background: var(--hill-mid); color: #fff; }


/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.pkp_structure_footer_wrapper, footer {
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.62));
  border-top: 1px solid rgba(255,255,255,0.5);
  padding: var(--space-3) var(--space-2);
  margin-top: var(--space-4);
}
.pkp_footer_content, footer .pkp_footer_content {
  max-width: var(--content-max);
  margin: 0 auto;
  color: var(--ink-700);
  font-size: 0.88rem;
}
.pkp_footer_content a { color: var(--ink-900); font-weight: 600; }
.pkp_footer_content a:hover { color: var(--accent-clay); }


/* --------------------------------------------------------------------------
   13. TABLES, BREADCRUMBS, SEARCH
   -------------------------------------------------------------------------- */
.pkp_meta_data table { width: 100%; border-collapse: collapse; }
.pkp_meta_data table td, .pkp_meta_data table th {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(79, 122, 104, 0.2);
}
.breadcrumb, .cmp_breadcrumbs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-muted); }
.breadcrumb a, .cmp_breadcrumbs a { color: var(--ink-700); }
.pkp_search input[type="search"], .pkp_search input[type="text"] {
  border-radius: 999px;
  border: 1px solid rgba(79, 122, 104, 0.4);
  padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.8);
}


/* --------------------------------------------------------------------------
   14. ACCESSIBILITY & FOCUS
   -------------------------------------------------------------------------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.001ms !important; } }


/* --------------------------------------------------------------------------
   15. PRINT
   -------------------------------------------------------------------------- */
@media print {
  body, #container, .pkp_structure_page { background: #fff !important; display: block !important; }
  .pkp_structure_content, .page, .obj_article_summary, .obj_issue_summary,
  .pkp_structure_sidebar .pkp_block {
    background: #fff !important; box-shadow: none !important; border: none !important;
  }
  .pkp_site_name { -webkit-text-fill-color: var(--ink-900); background: none; }
  nav, .pkp_structure_head, footer { display: none !important; }
}


/* --------------------------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .pkp_site_name { font-size: 1.7rem; }
  .pkp_structure_content, .page, .journal_description, .obj_issue_toc {
    padding: var(--space-2) var(--space-3);
  }
  .pkp_structure_sidebar .pkp_block { padding: var(--space-2); }
}
