/* ==========================================================================
   NUST Corporate Identity overrides for the Bootstrap3 theme plugin,
   built on the Flatly Bootswatch base (journal: PNUSTRW).
   Flatly's stock navbar (#2C3E50) is close to NUST navy already - this
   pushes it and every accent to the exact CI guide values.
   Selectors target standard Bootstrap 3 classes (stable, well-documented;
   Bootswatch themes only recompile variables, never the markup itself).
   Source: NUST Brand Identity and House Style Guidelines, 2021/V.03
   ========================================================================== */

:root {
  --nust-blue: #1d2758;
  --nust-gold: #f6b11f;
  --nust-red:  #d9272d;
}

/* Typography --------------------------------------------------------------- */
/* Ropa Soft Pro requires a licensed webfont (myfonts.com). Using the
   guide's approved fallback, Calibri, until that's sourced.               */
body,
.navbar,
h1, h2, h3, h4, h5, h6,
.page_title, .pkp_page_title {
  font-family: "Calibri", "Segoe UI", Arial, sans-serif;
}

/* Header / navbar ----------------------------------------------------------- */
.navbar,
.navbar-default,
.navbar-inverse {
  background-color: var(--nust-blue) !important;
  border-color: var(--nust-blue) !important;
}

.navbar-brand,
.navbar-default .navbar-brand,
.navbar-inverse .navbar-brand {
  color: #ffffff !important;
}

/* Logo is an <img> inside .navbar-brand-logo (confirmed from live source) -
   cap its height so it doesn't blow out the navbar now that height:auto
   is set below.                                                          */
.navbar-brand-logo img,
.navbar-brand img {
  max-height: 42px;
  width: auto;
}

.navbar-default .navbar-nav > li > a,
.navbar-inverse .navbar-nav > li > a {
  color: #ffffff !important;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .active > a {
  color: var(--nust-gold) !important;
  background-color: transparent !important;
}

/* Dropdown submenus (About, etc.) */
.navbar .dropdown-menu {
  background-color: var(--nust-blue);
  border-color: rgba(255, 255, 255, 0.15);
}
.navbar .dropdown-menu > li > a {
  color: #ffffff !important;
}
.navbar .dropdown-menu > li > a:hover {
  color: var(--nust-gold) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Search box + Register/Login in the navbar */
.navbar-form .form-control {
  border-color: rgba(255, 255, 255, 0.3);
}
.navbar .btn-default {
  background-color: var(--nust-gold);
  border-color: var(--nust-gold);
  color: var(--nust-blue);
  font-weight: bold;
}
.navbar .btn-default:hover {
  background-color: #ffffff;
  border-color: #ffffff;
}

/* Breathing room around the logo and the right-hand nav items */
.navbar-header {
  padding: 8px 16px;
}
.navbar-brand {
  height: auto;
  padding: 10px 16px;
}
.navbar-nav > li > a {
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Sticky footer: on short pages (the journal homepage, an empty Archives
   list) the footer floated partway up the window with white below it.
   .pkp_structure_page wraps header + content + footer, so making it a
   full-height column and letting the content region absorb the slack
   pins the footer to the bottom without changing normal long pages. */
.pkp_structure_page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.pkp_structure_page > .pkp_structure_content {
  flex: 1 0 auto;
}
.pkp_structure_page > .footer,
.pkp_structure_page > #footer {
  flex-shrink: 0;
}

/* Page content --------------------------------------------------------------- */

/* The theme puts main content in col-md-8 and reserves the remaining third
   for a sidebar. No sidebar content is configured on this journal, so that
   third renders empty and the content looks squeezed to the left.
   REMOVE THIS BLOCK if a sidebar is ever enabled, or the sidebar will wrap
   underneath the content instead of sitting beside it. */
.pkp_structure_content .pkp_structure_main {
  width: 100%;
  float: none;
}

a {
  color: var(--nust-blue);
}
a:hover {
  color: var(--nust-red);
}

.btn-primary {
  background-color: var(--nust-blue) !important;
  border-color: var(--nust-blue) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--nust-red) !important;
  border-color: var(--nust-red) !important;
}

/* Footer ---------------------------------------------------------------------- */
#footer,
.footer {
  background-color: var(--nust-blue) !important;
  color: #ffffff;
  width: 100%;
}
#footer a,
.footer a {
  color: var(--nust-gold);
}

/* Social icon row.
   The icons live HERE, as CSS background images, NOT in the Page Footer
   HTML. OJS sanitises that field against an allowed-tags list that does
   not include <svg>, so inline SVG icons are stripped on every save and
   the whole row vanishes. The stylesheet is a file upload and is never
   filtered, so icons placed here survive. The footer HTML only needs
   plain <a class href>Text</a>, which the sanitiser always permits.

   IMPORTANT - selectors are deliberately prefixed with .footer / #footer.
   The site-level stylesheet (/public/site/styleSheet.css, the leftover
   nust-default-theme.css) loads AFTER this file and carries its own
   .nust-socials rules, including "background: var(--nust-gold)". That
   shorthand resets background-size/repeat/position and repaints the gold
   tile, which hid these gold glyphs entirely (gold on gold). At equal
   specificity the later file wins, so these rules carry an extra class to
   outrank it. Every property that shorthand touches is reset explicitly
   below - do not shorten them back into a "background:" shorthand.

   Untiled treatment: gold glyphs directly on the navy footer, no badge. */
.nust-socials {
  text-align: center;
  margin-bottom: 24px;
}
.footer .nust-socials a,
#footer .nust-socials a {
  display: inline-flex;
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  /* Padding keeps the clickable area at 40x40 for touch, per WCAG 2.2
     target size, while the glyph itself stays 24px. */
  padding: 8px;
  margin: 0 4px;
  vertical-align: middle;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 24px 24px;
  border-radius: 0;
  text-decoration: none !important;
  opacity: 0.92;
  transition: opacity 0.15s ease;
  /* Anchor text stays in the markup for screen readers and so the
     sanitiser never sees an empty element, but collapses visually. */
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}
.footer .nust-socials a:hover,
#footer .nust-socials a:hover {
  opacity: 1;
  background-color: transparent;
}

/* Icons keyed off the href, not a class: OJS's allowed-tags filter permits
   href on an anchor but may strip class, and href-based selectors also
   survive the links being reordered. Set and order match nust.na. */
.footer .nust-socials a[href*="facebook"],
#footer .nust-socials a[href*="facebook"] { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2Y2YjExZiIgZD0iTTEzLjUgMjF2LTcuNWgyLjVsLjUtM2gtM1Y4LjVjMC0uOS4zLTEuNSAxLjYtMS41SDE2VjQuMkMxNS43IDQuMiAxNC43IDQgMTMuNiA0IDExLjMgNCA5LjcgNS40IDkuNyA4VjEwLjVIN3YzaDIuN1YyMWgzLjh6Ii8+PC9zdmc+"); }
.footer .nust-socials a[href*="twitter"],
.footer .nust-socials a[href*="x.com"],
#footer .nust-socials a[href*="twitter"] { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2Y2YjExZiIgZD0iTTE3LjIgM2gzLjNsLTcuMiA4LjJMMjEuOCAyMWgtNi42bC00LjMtNS42TDUuOSAyMUgyLjZsNy43LTguOEwyLjIgM2g2LjhsMy45IDUuMkwxNy4yIDN6bS0xLjIgMTZoMS44TDguMSA0LjlINi4yTDE2IDE5eiIvPjwvc3ZnPg=="); }
.footer .nust-socials a[href*="youtube"],
#footer .nust-socials a[href*="youtube"] { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2Y2YjExZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMjEuNiA3LjJjLS4yLS45LS45LTEuNi0xLjgtMS44QzE4LjIgNSAxMiA1IDEyIDVzLTYuMiAwLTcuOC40Yy0uOS4yLTEuNi45LTEuOCAxLjhDMiA4LjggMiAxMiAyIDEyczAgMy4yLjQgNC44Yy4yLjkuOSAxLjYgMS44IDEuOEM1LjggMTkgMTIgMTkgMTIgMTlzNi4yIDAgNy44LS40Yy45LS4yIDEuNi0uOSAxLjgtMS44LjQtMS42LjQtNC44LjQtNC44czAtMy4yLS40LTQuOHpNMTAgMTUuNXYtN2w2IDMuNS02IDMuNXoiLz48L3N2Zz4="); }
.footer .nust-socials a[href*="instagram"],
#footer .nust-socials a[href*="instagram"] { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZjZiMTFmIiBzdHJva2Utd2lkdGg9IjIiIGQ9Ik03LjUgMy41aDlhNCA0IDAgMDE0IDR2OWE0IDQgMCAwMS00IDRoLTlhNCA0IDAgMDEtNC00di05YTQgNCAwIDAxNC00eiIvPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMuNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZjZiMTFmIiBzdHJva2Utd2lkdGg9IjIiLz48Y2lyY2xlIGN4PSIxNy4yIiBjeT0iNi44IiByPSIxLjMiIGZpbGw9IiNmNmIxMWYiLz48L3N2Zz4="); }
.footer .nust-socials a[href*="linkedin"],
#footer .nust-socials a[href*="linkedin"] { background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2Y2YjExZiIgZD0iTTQuOTggMy41YTIuNSAyLjUgMCAxMS0uMDIgNS4wMUEyLjUgMi41IDAgMDE0Ljk4IDMuNXpNMyA5aDR2MTJIM1Y5em03IDBoMy44djEuN2guMDVjLjUzLS45NSAxLjgzLTEuOTUgMy43Ny0xLjk1QzIxLjYgOC43NSAyMiAxMS4yIDIyIDE0LjNWMjFoLTR2LTZjMC0xLjQzLS4wMy0zLjI3LTItMy4yNy0yIDAtMi4zIDEuNTYtMi4zIDMuMTdWMjFoLTRWOXoiLz48L3N2Zz4="); }

/* Footer link grid */
.nust-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 24px;
}
.nust-footer-grid h3 {
  color: var(--nust-gold);
  font-size: 16px;
  border-bottom: 2px solid var(--nust-gold);
  padding-bottom: 8px;
  margin: 0 0 12px;
}
.nust-footer-grid p,
.nust-footer-grid li {
  color: #e3e7f3;
  font-size: 14px;
  line-height: 1.6;
}
.nust-footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nust-footer-grid a {
  color: #ffffff !important;
}
.nust-footer-grid a:hover {
  color: var(--nust-gold) !important;
}

.nust-footer-copyright {
  text-align: center;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  color: #c7cee3;
}

/* PKP's own "Platform & workflow by OJS/PKP" credit is a dark wordmark
   image on a transparent background - invisible on our navy footer.
   Sit it on a small white card so the attribution stays readable.
   Scoped to the complementary block PKP renders it in, so it cannot
   affect any images placed in the Page Footer content. */
.footer [role="complementary"] img,
#footer [role="complementary"] img {
  background-color: #ffffff;
  padding: 8px;
  border-radius: 4px;
  max-width: 120px;
}

/* ==========================================================================
   Non-brand UI chrome - Flatly ships its own blue/teal/orange accents for
   Bootstrap's contextual states (info/success/warning) on top of the navy
   "primary" already handled above. Bring the ones visible in normal
   browsing onto the NUST palette; standard Bootstrap 3 class names, so
   these should apply site-wide (notices, badges, pagination, labels).
   If something still shows stock Bootstrap blue/teal, right-click ->
   Inspect to get its exact class and we'll add a selector for it.
   ========================================================================== */

/* "Info" notices, e.g. "This journal has not published any issues." */
.alert-info,
.bg-info,
.panel-info > .panel-heading,
.label-info {
  background-color: var(--nust-blue) !important;
  border-color: var(--nust-blue) !important;
  color: #ffffff !important;
}
.text-info {
  color: var(--nust-blue) !important;
}
.btn-info {
  background-color: var(--nust-blue) !important;
  border-color: var(--nust-blue) !important;
  color: #ffffff !important;
}
.btn-info:hover,
.btn-info:focus {
  background-color: var(--nust-red) !important;
  border-color: var(--nust-red) !important;
}

/* "Danger" notices/buttons already read as red - snap to the exact NUST
   red so there's only ever one red on the site. */
.alert-danger,
.bg-danger,
.panel-danger > .panel-heading,
.label-danger,
.btn-danger {
  background-color: var(--nust-red) !important;
  border-color: var(--nust-red) !important;
  color: #ffffff !important;
}
.text-danger {
  color: var(--nust-red) !important;
}

/* Badges (e.g. the submission-count badge on the user menu) and the active
   pagination page both default to stock Bootstrap blue. */
.badge {
  background-color: var(--nust-red);
}
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span {
  background-color: var(--nust-blue) !important;
  border-color: var(--nust-blue) !important;
  color: #ffffff !important;
}

/* Generic Bootstrap utility helpers, in case any template uses them directly */
.bg-primary {
  background-color: var(--nust-blue) !important;
  color: #ffffff !important;
}
.text-primary {
  color: var(--nust-blue) !important;
}

/* NOTE ON success/warning (green/orange): left as Bootstrap's stock colors
   deliberately. They're semantic (a successful save, a form warning) and
   NUST's CI guide has no green/orange in its palette to map them onto -
   recoloring "success" to navy or red risks reading as neutral or as an
   error. Flag if you'd rather these were muted/greyscale instead. */

/* NOTE: an earlier version of this file used a CSS image-recolouring
   property on the PKP footer logo, and the whole stylesheet stopped
   applying. That property is deliberately absent here. If this version
   works, that was the cause - see the project checklist before adding
   any image-effect properties to this file. */
