/* =========================================================
   VTIPJMRR — Interactive Layer for OJS (Bootstrap "Flatly" theme)
   Paste this into:
   Settings > Website > Appearance > Setup tab > "Additional CSS" box
   (or wherever your OJS install exposes a custom stylesheet field)
   ========================================================= */

/* --- 0. Foundations -------------------------------------------------- */
:root{
  --vt-navy:        #0d1f3c;
  --vt-navy-light:  #1f3864;
  --vt-red:         #c00000;
  --vt-gold:        #843c0c;
  --vt-ink:         #141413;
  --vt-mist:        #a0b8cc;
  --vt-mist-light:  #d0dce8;
  --vt-ease:        cubic-bezier(.4,0,.2,1);
}

html{ scroll-behavior: smooth; }

*{ -webkit-tap-highlight-color: transparent; }

/* Respect users who've asked for reduced motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible, on-brand focus ring everywhere (accessibility floor) */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--vt-red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- 1. Top navigation ------------------------------------------------ */
.navbar-default{
  transition: box-shadow .25s var(--vt-ease);
}

#main-navigation > li > a,
#navigationUser > li > a{
  position: relative;
  transition: color .2s var(--vt-ease);
}

/* animated underline on primary nav links */
#main-navigation > li:not(.dropdown) > a::after{
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 6px;
  height: 2px;
  background: var(--vt-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--vt-ease);
}
#main-navigation > li:not(.dropdown) > a:hover::after{
  transform: scaleX(1);
}

/* dropdown menus ease open instead of snapping */
.dropdown-menu{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s var(--vt-ease), transform .18s var(--vt-ease);
}
.dropdown.open > .dropdown-menu,
.dropdown-menu.show{
  opacity: 1;
  transform: translateY(0);
}
.dropdown-menu > li > a{
  transition: background .15s var(--vt-ease), padding-left .15s var(--vt-ease);
}
.dropdown-menu > li > a:hover{
  background: #f4f6f9;
  padding-left: 22px;
  color: var(--vt-red);
}

/* logo gives a gentle nudge on hover */
.navbar-brand-logo img{
  transition: transform .25s var(--vt-ease);
}
.navbar-brand-logo:hover img{
  transform: scale(1.04);
}

/* --- 2. Search box ------------------------------------------------------ */
.navbar-form .form-control{
  transition: box-shadow .2s var(--vt-ease), border-color .2s var(--vt-ease);
}
.navbar-form .form-control:focus{
  border-color: var(--vt-red);
  box-shadow: 0 0 0 3px rgba(192,0,0,.15);
}
.navbar-form .btn{
  transition: background .2s var(--vt-ease), transform .15s var(--vt-ease);
}
.navbar-form .btn:hover{
  transform: translateY(-1px);
}

/* --- 3. Hero block (sidebar) -------------------------------------------- */
#customblock-heroblock img{
  transition: transform .3s var(--vt-ease), box-shadow .3s var(--vt-ease);
}
#customblock-heroblock img:hover{
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 28px rgba(0,0,0,.6) !important;
}

/* the three CTA links use inline styles for their base look, so
   the hover state needs !important to win over the inline declarations */
#customblock-heroblock .content a{
  transition: background .2s var(--vt-ease), color .2s var(--vt-ease),
              transform .2s var(--vt-ease), border-color .2s var(--vt-ease);
}
#customblock-heroblock .content a:hover{
  background: #ffffff !important;
  color: var(--vt-navy) !important;
  border-color: #ffffff !important;
  transform: translateY(-2px);
}

/* --- 4. Journal description banner --------------------------------------- */
.journal-description table{
  transition: box-shadow .25s var(--vt-ease);
}
.journal-description table:hover{
  box-shadow: 0 10px 30px rgba(31,56,100,.25);
}

/* --- 5. Announcements & current issue ------------------------------------- */
.announcement-summary{
  padding: 14px 16px;
  border-radius: 6px;
  transition: transform .22s var(--vt-ease), box-shadow .22s var(--vt-ease),
              background .22s var(--vt-ease);
}
.announcement-summary:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(13,31,60,.12);
  background: #fbfcfe;
}
.announcement-summary .media-heading a{
  transition: color .2s var(--vt-ease);
}
.announcement-summary .media-heading a:hover{
  color: var(--vt-red);
}

.current_issue .thumbnail.cover,
.current_issue .thumbnail a.cover{
  display: inline-block;
  overflow: hidden;
  border-radius: 4px;
}
.current_issue .thumbnail img{
  transition: transform .35s var(--vt-ease);
}
.current_issue .thumbnail a:hover img{
  transform: scale(1.06);
}

.read-more{
  transition: background .2s var(--vt-ease), transform .15s var(--vt-ease),
              box-shadow .2s var(--vt-ease);
}
.read-more:hover{
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(192,0,0,.25);
}
.read-more .glyphicon{
  display: inline-block;
  transition: transform .2s var(--vt-ease);
}
.read-more:hover .glyphicon{
  transform: translateX(3px);
}

/* --- 6. Sidebar blocks ----------------------------------------------------- */
.pkp_block{
  transition: box-shadow .2s var(--vt-ease);
}
.pkp_block.block_information a,
.pkp_block.block_make_submission a{
  display: block;
  transition: color .18s var(--vt-ease), padding-left .18s var(--vt-ease);
}
.pkp_block.block_information a:hover,
.pkp_block.block_make_submission a:hover{
  color: var(--vt-red);
  padding-left: 4px;
}

.block_web_feed img,
.block_announcement_feed img{
  transition: transform .2s var(--vt-ease), opacity .2s var(--vt-ease);
  opacity: .85;
}
.block_web_feed img:hover,
.block_announcement_feed img:hover{
  transform: scale(1.15);
  opacity: 1;
}

/* --- 7. Footer --------------------------------------------------------- */
.footer img{
  transition: opacity .2s var(--vt-ease);
  opacity: .8;
}
.footer img:hover{
  opacity: 1;
}

/* --- 8. Back-to-top button (optional, pure CSS/no JS needed) ----------- */
.vt-back-to-top{
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--vt-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s var(--vt-ease), transform .25s var(--vt-ease),
              background .2s var(--vt-ease);
  z-index: 999;
}
.vt-back-to-top.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.vt-back-to-top:hover{
  background: var(--vt-red);
}

/* =========================================================
   Layout fixes — added after reviewing a live screenshot
   ========================================================= */

/* --- 9. Description banner was overflowing into the sidebar -----------
   The original markup carries a leftover Word paste: the table has an
   inline width of 1524px, far wider than its column. On most screens
   that overflow doesn't push the sidebar down — it just sits visually
   on top of it. This strips the fixed pixel widths so the banner stays
   inside its own column at any screen size. */
.journal-description table{
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto !important;
}
.journal-description table td{
  width: auto !important;
}
.journal-description{
  overflow: hidden;
}
.page_index_journal{
  overflow-x: hidden;
}

/* --- 10. "Make a Submission" sidebar button looked disabled ------------ */
.block_make_submission_link{
  display: block;
  background: var(--vt-navy);
  color: #ffffff !important;
  text-align: center;
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s var(--vt-ease), transform .15s var(--vt-ease);
}
.block_make_submission_link:hover{
  background: var(--vt-red);
  transform: translateY(-1px);
}

/* --- 11. Feed icon rows (Latest publications / Announcements) ----------
   Gives the small feed icons a fixed, consistent footprint so a slow or
   failed image load never collapses into an odd-looking colored sliver. */
.block_web_feed .content ul,
.block_announcement_feed .content ul{
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.block_web_feed .content li,
.block_announcement_feed .content li{
  width: 28px;
  height: 28px;
}
.block_web_feed .content img,
.block_announcement_feed .content img{
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
