/* ============================================================================
   JAVICT | RESPONSIVE JOURNAL THEME V2
   Target: OJS public website (Default/compatible PKP selectors)
   Palette: Academic Navy + ISAS-inspired Warm Orange
   Usage : Replace previous custom stylesheet; do not load both versions.
   Notes : OJS owns the mobile-navigation show/hide behaviour. We only style it.
   ============================================================================ */

:root {
  --javict-navy: #17324d;
  --javict-navy-dark: #10273e;
  --javict-orange: #b74218;
  --javict-orange-hover: #8f2e10;
  --javict-orange-soft: #fff2e9;
  --javict-orange-line: #edbd9e;
  --javict-body: #293748;
  --javict-muted: #5e6c7c;
  --javict-bg: #f6f8fb;
  --javict-surface: #ffffff;
  --javict-surface-warm: #fffaf6;
  --javict-border: #e3e8ee;
  --javict-shadow: 0 8px 24px rgba(16, 39, 62, .055);
  --javict-radius: 12px;
}

/* 1. BASE: readability, accessible links, consistent surfaces ---------------- */
html { scroll-behavior: smooth; }
body {
  background: var(--javict-bg);
  color: var(--javict-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.pkp_structure_page { background: var(--javict-bg); }
.pkp_structure_main, .pkp_structure_sidebar { min-width: 0; }
.pkp_structure_main { margin-top: 14px; text-align: left; }
.pkp_structure_main p { line-height: 1.76; }
.pkp_structure_main a:not(.obj_galley_link):not(.cmp_button),
.pkp_footer_content a {
  color: var(--javict-orange);
  text-decoration-color: rgba(183, 66, 24, .35);
  text-underline-offset: 3px;
}
.pkp_structure_main a:not(.obj_galley_link):not(.cmp_button):hover,
.pkp_footer_content a:hover { color: var(--javict-orange-hover); }
.pkp_structure_main a { overflow-wrap: anywhere; }
.pkp_structure_main img { max-width: 100%; }
.pkp_structure_main img:not(.editor-photo):not(.board-photo):not(.roundedimage) { height: auto; }

/* Visible keyboard focus. Do not remove native focus behaviour. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--javict-orange);
  outline-offset: 3px;
}

/* 2. HEADER: preserve OJS header structure and navigation toggle ------------- */
.pkp_structure_head {
  background: var(--javict-surface);
  border-top: 4px solid var(--javict-orange);
  box-shadow: 0 3px 16px rgba(16, 39, 62, .07);
}
.pkp_head_wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px clamp(14px, 2.5vw, 32px);
}
.pkp_site_name { min-width: 0; }
.pkp_site_name .is_img img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 450px);
  max-height: 80px;
  object-fit: contain;
}
.pkp_site_nav_menu { background: var(--javict-surface); }
.pkp_site_nav_menu .pkp_nav_list > li > a,
.pkp_navigation_user > li > a {
  color: var(--javict-navy);
  font-size: .88rem;
  font-weight: 650;
  letter-spacing: .015em;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}
.pkp_site_nav_menu .pkp_nav_list > li > a:hover,
.pkp_site_nav_menu .pkp_nav_list > li.current > a,
.pkp_site_nav_menu .pkp_nav_list > li.is_current > a,
.pkp_site_nav_menu .pkp_nav_list > li > a:focus-visible,
.pkp_navigation_user > li > a:hover { color: var(--javict-orange); }

/* Dropdown styling only; positioning/opening remain the responsibility of OJS. */
.pkp_site_nav_menu .pkp_nav_list li ul {
  background: #fff;
  border: 1px solid var(--javict-border);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(16, 39, 62, .14);
  z-index: 100;
}
.pkp_site_nav_menu .pkp_nav_list li ul li a {
  color: var(--javict-body);
  font-size: .9rem;
  text-decoration: none;
}
.pkp_site_nav_menu .pkp_nav_list li ul li a:hover,
.pkp_site_nav_menu .pkp_nav_list li ul li a:focus-visible {
  color: var(--javict-orange-hover);
  background: var(--javict-orange-soft);
}

/* 3. PAGE LAYOUT + TYPOGRAPHIC HIERARCHY ------------------------------------- */
.pkp_structure_content {
  background: var(--javict-surface);
  box-shadow: var(--javict-shadow);
  border: 1px solid var(--javict-border);
  border-radius: 0 0 14px 14px;
  padding-top: 12px;
}
.pkp_structure_content.has_sidebar { background: #fff; }
.pkp_structure_main h1,
.pkp_structure_main h2 {
  display: block;
  width: auto;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--javict-navy);
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -.018em;
  overflow-wrap: anywhere;
}
.pkp_structure_main h1 { font-size: clamp(1.48rem, 2.2vw, 1.98rem); margin: 0 0 18px; }
.pkp_structure_main h2 { font-size: clamp(1.16rem, 1.7vw, 1.4rem); margin: 22px 0 12px; }
.pkp_structure_main h3 { color: var(--javict-navy); font-weight: 700; line-height: 1.4; }
.pkp_structure_main hr { border: 0; border-top: 1px solid var(--javict-border); }

/* Distinct but restrained homepage profile card. */
.page_index_journal {
  background: var(--javict-surface);
  border: 1px solid var(--javict-border);
  border-top: 3px solid var(--javict-orange);
  border-radius: 14px;
  padding: clamp(16px, 2vw, 26px);
  box-shadow: var(--javict-shadow);
  margin-bottom: 22px;
}
.page_index_journal .additional_content { border-top: 0; }
.page_index_journal p { margin: .45rem 0 .75rem; }
.page_index_journal section + section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--javict-border);
}
.page_index_journal h2 {
  border-left: 4px solid var(--javict-orange);
  padding-left: 12px;
  margin-top: 12px;
}

/* 4. CURRENT ISSUE + ARTICLE LISTING ----------------------------------------- */
.obj_issue_summary,
.obj_issue_toc,
.page_issue .obj_issue_toc {
  max-width: 100%;
}
.obj_issue_summary .cover img,
.obj_issue_toc .cover img,
.cover img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 39, 62, .12);
}
.obj_article_summary {
  background: var(--javict-surface);
  border: 1px solid var(--javict-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.obj_article_summary:hover {
  border-color: var(--javict-orange-line);
  box-shadow: 0 7px 18px rgba(16, 39, 62, .065);
}
.obj_article_summary .title { color: var(--javict-navy); font-weight: 700; }
.pkp_structure_main .obj_article_summary .title a { color: var(--javict-navy); font-weight: 700; }
.pkp_structure_main .obj_article_summary .title a:hover { color: var(--javict-orange); }
.obj_article_summary .meta, .obj_article_summary .authors,
.obj_article_summary .pages { color: var(--javict-muted); }
.obj_galley_link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--javict-orange);
  border-radius: 7px;
  background: var(--javict-orange);
  color: #fff !important;
  font-size: .85rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  padding: 7px 14px;
  transition: background-color .2s ease;
}
.obj_galley_link:hover { background: var(--javict-orange-hover); color: #fff !important; }
.obj_article_details .abstract { text-align: left; line-height: 1.77; }
.obj_article_details .entry_details { text-align: left; }
.obj_article_details .keywords h2.label,
.keywords h2.label {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

/* 5. SIDEBAR: distinguish navigation links from primary CTA ------------------ */
.pkp_block {
  background: var(--javict-surface);
  border: 1px solid var(--javict-border);
  border-left: 3px solid var(--javict-orange);
  border-radius: var(--javict-radius);
  box-shadow: var(--javict-shadow);
  padding: 16px;
  margin: 0 0 18px;
  font-size: .92rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.pkp_block .title,
.pkp_block h2 {
  color: var(--javict-navy);
  font-size: 1.05rem;
  font-weight: 750;
}
.pkp_block .content ul { list-style: none; margin: 0; padding: 0; }
.pkp_block .content ul li { margin: 0; }
.pkp_block .content ul li a {
  display: block;
  padding: 8px 9px;
  color: var(--javict-navy);
  background: transparent;
  border-radius: 6px;
  box-shadow: none;
  font-size: .9rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}
.pkp_block .content ul li a:hover,
.pkp_block .content ul li a:focus-visible {
  color: var(--javict-orange-hover);
  background: var(--javict-orange-soft);
  box-shadow: none;
  transform: none;
}
.block_make_submission a,
.pkp_block.block_make_submission a {
  display: block;
  padding: 11px 14px;
  border: 1px solid var(--javict-orange);
  border-radius: 9px;
  background: var(--javict-orange);
  color: #fff !important;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(183, 66, 24, .18);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.block_make_submission a:hover,
.pkp_block.block_make_submission a:hover {
  background: var(--javict-orange-hover);
  box-shadow: 0 6px 16px rgba(143, 46, 16, .23);
  color: #fff !important;
}

/* Custom Quick Menu. The first link can optionally use --primary. */
.quick-menu ul { list-style: none; padding: 0; margin: 0; }
.quick-menu ul li { margin-bottom: 6px; }
.quick-menu__link,
.pkp_block .quick-menu ul li a {
  display: block;
  color: var(--javict-navy);
  background: var(--javict-surface-warm);
  border: 1px solid #f1e6de;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: .87rem;
  font-weight: 550;
  text-decoration: none;
  box-shadow: none;
}
.quick-menu__link:hover,
.pkp_block .quick-menu ul li a:hover {
  color: var(--javict-orange-hover);
  background: var(--javict-orange-soft);
  border-color: var(--javict-orange-line);
}
.quick-menu__link--primary,
.pkp_block .quick-menu ul li a.quick-menu__link--primary {
  background: var(--javict-orange);
  border-color: var(--javict-orange);
  color: #fff;
  font-weight: 700;
}
.quick-menu__link--primary:hover,
.pkp_block .quick-menu ul li a.quick-menu__link--primary:hover {
  background: var(--javict-orange-hover);
  color: #fff;
}

/* 6. CUSTOM CARDS: editorial board, editor in chief, indexing ---------------- */
.roundedimage {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--javict-orange-line);
  box-shadow: 0 5px 12px rgba(16, 39, 62, .13);
}
.subtopik {
  color: var(--javict-navy);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.55;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--javict-orange);
}
.kolomresponsif {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 100%;
  margin: 18px 0;
}
.kolomresponsif .kolom {
  flex: 1 1 240px;
  min-width: 0;
  background: var(--javict-surface-warm);
  border: 1px solid var(--javict-border);
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(16, 39, 62, .045);
  padding: 14px 16px;
  text-align: left;
}
.card {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 16px;
  margin: 0;
  border: 1px solid var(--javict-border);
  border-radius: 11px;
  background: var(--javict-surface);
  box-shadow: 0 4px 14px rgba(16, 39, 62, .055);
  text-align: center;
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: 0 8px 20px rgba(16, 39, 62, .085); }
.eic-managing { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; }
.eic-managing .editor-card { flex: 1 1 calc(50% - 9px); min-width: 0; text-align: center; }
.editor-photo {
  display: block;
  width: 170px;
  height: 210px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 10px;
}
.editor-role { color: var(--javict-orange); font-size: .85rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.editor-name { margin: 0 0 6px; color: var(--javict-navy); font-weight: 700; }
.editor-affiliation { margin: 0 0 10px; color: var(--javict-muted); }
.editor-ids { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
.editorial-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  font-size: .91rem;
}
.editorial-board-grid .board-card { width: 100%; min-width: 0; padding: 14px; margin: 0; text-align: left; }
.board-photo {
  display: block;
  width: 104px;
  height: 132px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 12px;
}
.board-name { margin: 0 0 6px; color: var(--javict-navy); text-align: center; font-weight: 700; overflow-wrap: anywhere; }
.board-affiliation { margin: 0 0 8px; color: var(--javict-muted); overflow-wrap: anywhere; }
.board-meta { margin: 0; overflow-wrap: anywhere; }
.indexing-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.indexing-logos img { display: block; width: auto; height: 44px; max-width: 100%; object-fit: contain; }
.indexing-logos:not(.indexing-logos--targets) img { height: 50px; }
.indexing-badge { opacity: .63; }

/* 7. TABLES, FORMS, AND FOOTER ------------------------------------------------ */
.pkp_structure_main table { max-width: 100%; border-collapse: collapse; }
.pkp_structure_main th { color: var(--javict-navy); }
.pkp_structure_main th, .pkp_structure_main td { overflow-wrap: break-word; }
.pkp_structure_main input:not([type="checkbox"]):not([type="radio"]),
.pkp_structure_main select,
.pkp_structure_main textarea {
  max-width: 100%;
  border-color: #cbd5e1;
  border-radius: 7px;
}
.pkp_structure_footer_wrapper {
  border-top: 3px solid var(--javict-orange);
  border-bottom: 6px solid var(--javict-navy);
  background: #eff3f7;
}
.pkp_footer_content { padding: 20px 0; font-size: .88rem; color: var(--javict-muted); }
/* Keep existing design preference (remove this rule to restore OJS footer mark). */
.pkp_brand_footer { display: none; }

/* 8. RESPONSIVE: OJS retains control over hamburger navigation --------------- */
@media (max-width: 1024px) {
  .pkp_head_wrapper { padding: 12px 20px; }
  .editorial-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .obj_article_summary { padding: 13px; }
}

@media (max-width: 768px) {
  body { font-size: 15px; line-height: 1.66; }
  .pkp_structure_main { margin-top: 8px; }
  .pkp_structure_content { border-radius: 0; box-shadow: none; padding-top: 8px; }
  .pkp_head_wrapper { padding: 10px 16px; }
  .pkp_site_name .is_img img { max-height: 64px; max-width: min(100%, 340px); }
  /* No display:flex/display:block on .pkp_site_nav_menu: preserve OJS toggle. */
  .pkp_site_nav_menu { background: #fff; }
  .pkp_site_nav_menu .pkp_nav_list > li > a {
    display: block;
    padding: 11px 13px;
    border-bottom: 1px solid var(--javict-border);
  }
  .pkp_site_nav_menu .pkp_nav_list li ul {
    border: 0;
    border-left: 2px solid var(--javict-orange-line);
    border-radius: 0;
    box-shadow: none;
  }
  .page_index_journal { padding: 16px; border-radius: 10px; }
  .pkp_block { margin-bottom: 14px; padding: 14px; }
  .kolomresponsif { display: flex; flex-direction: column; }
  .kolomresponsif .kolom { flex: 1 1 auto; width: 100%; }
  .eic-managing { flex-direction: column; }
  .eic-managing .editor-card { flex-basis: auto; width: 100%; }
  .editorial-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .editorial-board-grid .board-card { padding: 10px; }
  .editorial-board-grid p { font-size: .83rem; }
  .editorial-board-grid .board-photo { width: 82px; height: 106px; }
  .indexing-logos { gap: 10px; }
  .indexing-logos img { height: 38px; }
  .indexing-logos:not(.indexing-logos--targets) img { height: 44px; }
  /* Large author tables / journal policy tables scroll instead of clipping. */
  .pkp_structure_main table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pkp_footer_content { text-align: center; }
}

@media (max-width: 480px) {
  .pkp_head_wrapper { padding: 9px 12px; }
  .pkp_structure_main h1 { font-size: 1.42rem; }
  .pkp_structure_main h2 { font-size: 1.16rem; }
  .obj_article_summary { padding: 12px; }
  .board-name { font-size: .84rem; }
  .board-affiliation, .board-meta { font-size: .78rem; }
  .page_index_journal { padding: 14px; }
}

@media (max-width: 359px) {
  .editorial-board-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ============================================================
   JAVICT — Sidebar positioning fix for OJS public pages
   Add at the VERY END of javict_responsive_v2.css
   ============================================================ */
@media screen and (min-width: 992px) {
  /* OJS usually puts .pkp_structure_main and .pkp_structure_sidebar
     directly inside .pkp_structure_content.has_sidebar. Avoid floats
     being pushed to the bottom by using explicit grid columns. */
  .pkp_structure_content.has_sidebar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 290px);
    align-items: start;
    column-gap: 24px;
    box-sizing: border-box;
  }

  /* Default OJS clearfix pseudo-elements must not become grid items. */
  .pkp_structure_content.has_sidebar::before,
  .pkp_structure_content.has_sidebar::after {
    display: none !important;
    content: none !important;
  }

  .pkp_structure_content.has_sidebar > .pkp_structure_main {
    grid-column: 1;
    grid-row: 1;
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .pkp_structure_content.has_sidebar > .pkp_structure_sidebar {
    grid-column: 2;
    grid-row: 1;
    float: none !important;
    clear: none !important;
    position: static;
    width: auto !important;
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    align-self: start;
    box-sizing: border-box;
  }
}

/* On tablets and phones, restore OJS's normal stacked layout. */
@media screen and (max-width: 991px) {
  .pkp_structure_content.has_sidebar {
    display: block;
  }
  .pkp_structure_content.has_sidebar > .pkp_structure_main,
  .pkp_structure_content.has_sidebar > .pkp_structure_sidebar {
    width: auto;
    float: none;
    clear: both;
  }
}

/* ========================================================================
   JAVICT — Mobile footer cards fix
   For OJS public theme. Append after the existing custom CSS.
   Desktop layout remains unchanged.
   ======================================================================== */
@media screen and (max-width: 768px) {
  /* Scope all corrections to the public-facing OJS footer. */
  .pkp_structure_footer_wrapper,
  .pkp_structure_footer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .pkp_structure_footer_wrapper .pkp_footer_content,
  .pkp_structure_footer .pkp_footer_content {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 20px 14px !important;
    text-align: left !important;
  }

  /* Reflow custom footer layouts, including inline grid-template-columns.
     Applies to BOTH the row of cards and nested Publisher/License columns. */
  .pkp_footer_content :is(div, section, article)[style*="grid-template-columns"],
  .pkp_footer_content :is(div, section, article)[style*="grid-template"],
  .pkp_footer_content :is(.footer-grid, .footer-cards, .footer-columns,
    .footer-row, .footer-bottom, .footer-info-grid, .footer-details-grid,
    .footer-two-col, .footer-2col, .footer-contact-grid,
    .publisher-license-grid, .publisher-grid, .license-grid,
    .javict-footer-grid, .javict-footer-row, .javict-footer-columns) {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 16px !important;
  }

  /* If a footer row is built with flex instead of CSS grid, stack its cards. */
  .pkp_footer_content :is(.footer-cards, .footer-columns, .footer-row,
    .footer-bottom, .footer-two-col, .javict-footer-row, .javict-footer-columns) {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
  }

  /* Avoid narrow internal cards, truncated address, or overlapping text. */
  .pkp_footer_content :is(.footer-card, .footer-box, .footer-panel,
    .footer-column, .editorial-office, .publisher-license, .publishing-system,
    .javict-footer-card),
  .pkp_footer_content :is(.footer-grid, .footer-cards, .footer-columns,
    .footer-row, .footer-bottom, .footer-two-col, .javict-footer-grid) > :is(div,section,article) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }

  .pkp_footer_content :is(div, section, article, p, h2, h3, h4, span, a, dd, dt, li) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .pkp_footer_content img,
  .pkp_footer_content svg {
    max-width: 100%;
    height: auto;
  }
}

