/**
 * SPSP template for Joomla 6
 * Recreates the Joomla 3 "spsp" look of philosophy-science-practice.org.
 * Loaded after Bootstrap 5, so the first section neutralises Bootstrap's reboot.
 */

:root {
  --spsp-blue: #5994cf;
  --spsp-blue-light: #8cb5de;
  --spsp-blue-pale: #e1ecf7;
  --spsp-news: #b2d8ff;
  --spsp-grey: #767676;
  --spsp-text: #333;
  --spsp-menu-bg: #e2e2e2;
  --spsp-menu-border: #d0d0d0;
  --spsp-heading-font: "Just Another Hand", "Comic Sans MS", cursive;
  --spsp-body-font: Raleway, sans-serif;
  --spsp-icon-font: "Font Awesome 6 Free", "Font Awesome 7 Free", "Font Awesome 5 Free";
  --bs-body-font-family: var(--spsp-body-font);
  --bs-body-color: var(--spsp-text);
  --bs-link-color: var(--spsp-blue);
  --bs-link-color-rgb: 89, 148, 207;
  --bs-link-hover-color: var(--spsp-grey);
  --bs-link-hover-color-rgb: 118, 118, 118;
}

/* ---------- Base / reset ---------- */


html {
  overflow-y: scroll;
  line-height: 1.25;
  height: 100%;
}

body.site {
  max-width: 1200px;
  margin: 0 auto;
  font-family: var(--spsp-body-font);
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.25;
  color: var(--spsp-text);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .brand, legend {
  font-family: var(--spsp-heading-font);
  font-weight: normal;
  color: var(--spsp-grey);
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  line-height: 1;
  margin: 0;
  padding: 0;
}

h1, h2, h3, legend {
  padding: 0.5em 0 0;
}

h1, h2 { font-size: 2.16em; }
h3, legend { font-size: 1.8em; }
h4 { font-size: 1.5em; }
h5 { font-size: 1.25em; }
h6 { font-size: 1em; }

legend {
  float: none;
  width: auto;
  border: 0;
}

p {
  margin: 0 0 9px;
  overflow-wrap: break-word;
}

strong, b { font-weight: bold; }
em, i { font-style: italic; }

a {
  color: var(--spsp-blue);
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  color: var(--spsp-grey);
  text-decoration: none;
}

ul, ol, dl {
  margin: 0 0 9px 25px;
  padding: 0;
}

ul ul, ul ol, ol ol, ol ul {
  margin-bottom: 9px;
}

ul.unstyled,
ol.unstyled,
ul.list-unstyled {
  list-style-type: none;
  margin: 0;
}

dl dt {
  margin-top: 5px;
  font-weight: bold;
}

dl dd {
  margin: 0 0 0 25px;
}

blockquote {
  padding: 0 0 0 15px;
  margin: 0 0 18px;
  border-left: 5px solid #eee;
}

pre {
  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
  color: var(--spsp-text);
  display: block;
  padding: 8.5px;
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 18px;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  background-color: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  box-sizing: border-box;
}

table {
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 1em;
}

hr {
  margin: 18px 0;
  border: 0;
  border-top: 1px solid #eee;
  opacity: 1;
}

/* ---------- Page frame ---------- */

div.body {
  flex: 1 0 auto;
  border-bottom: 2px solid #000;
  padding-bottom: 5em;
}

div.news {margin: .75em .25em .75em 0;}
div.news h3 {padding: 0 .25em;}

.site-container {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
}

.site-container > * {
  flex: 0 1 100%;
  box-sizing: border-box;
}

#content {
  padding: 2em 2.5% 1em;
}

#sidebar,
#aside {
  margin: 2em 2.5% 1em;
  flex: 1 1 50%;
  border-top: 2px solid var(--spsp-grey);
  border-bottom: 2px solid var(--spsp-grey);
  padding: 2px 0;
  margin-bottom: 1em;
}

/* ---------- Header ---------- */

header.header {
  padding: 10px 2.5% 0;
  line-height: 1;
}

.header-inner::after {
  content: "";
  display: table;
  clear: both;
}

a.brand {
  display: flex;
  flex-flow: row;
  align-items: center;
  font-size: calc(24px + 3.5vw);
  color: var(--spsp-grey);
  transition: filter 1s linear;
}

a.brand:hover,
a.brand:focus {
  color: var(--spsp-blue);
  filter: blur(3px);
}

a.brand .logo {
  float: left;
  flex: 0 0 auto;
  width: calc(100px + 5vw);
  max-width: calc(100px + 5vw);
  box-sizing: content-box;
  padding-right: 2.5%;
  font-size: 28px;
}

a.brand .logo img {
  width: 100%;
}

/* ---------- Navigation ---------- */

nav.navigation {
  position: relative;
  min-height: 48px;
  font-size: 24px;
  margin: 10px 0;
  padding: 2px 0;
  border-top: 2px solid var(--spsp-grey);
}

.navigation .btn-navbar {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border: 1px solid #7baad9;
  border-radius: 4px;
  background-color: #f5f5f5;
  background-image: linear-gradient(#fff, #e6e6e6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
  color: var(--spsp-grey);
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}

.navigation .btn-navbar:hover,
.navigation .btn-navbar:focus {
  background-color: #e6e6e6;
  background-position: 0 -15px;
}

.navigation .btn-navbar::before {
  font-family: var(--spsp-icon-font);
  font-weight: 900;
  content: "\f0c9\00a0\00a0\f077";
}

.navigation .btn-navbar.collapsed::before {
  content: "\f0c9\00a0\00a0\f078";
}

.nav-collapse {
  height: 0;
  overflow: hidden;
}

.nav-collapse.is-open {
  height: auto;
}

ul.nav,
ul.nav ul {
  display: block;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/*subitems of Events */
ul.nav li.item-127 li a::before {
  font-family: var(--spsp-icon-font); /* Adjusts to FA version */
  font-weight: 900; /* necessary!! */
  content: "\f3c5"; /* Unicode for fa-location-dot */
  margin-right: 8px;
} 

ul.nav li li .menu-link { font-size: 87.5%; }
ul.nav li li li .menu-link { font-size: 75%; }

/* Menu icons ("Link Icon Class" on the menu item) */
ul.nav .nav-icon {
  display: inline-block;
  width: 1.25em;
  text-align: center;
  line-height: 1;
}

ul.nav .nav-icon::before {
  font-size: 22px;
}

.nav-collapse form {
  margin: 0;
  color: var(--spsp-blue);
}

.nav-collapse .search input[type="text"],
.nav-collapse .search input[type="search"] {
  display: inline-block;
  margin: 8px 0 0 0px;
  border: 2px solid var(--spsp-blue);
  border-radius: 4px;
  color: var(--spsp-blue);
  background-color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.25;
  box-sizing: content-box;
  box-shadow: none;
  -webkit-appearance: textfield;
  appearance: textfield;
}

.nav-collapse .search input::placeholder {
  color: #757575;
  opacity: 1;
}

.nav-collapse .search label,
.nav-collapse .search button,
.nav-collapse .search .btn {
  display: none;
}

.nav-collapse .search .awesomplete {
  display: inline-block;
  position: relative;
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
  ul.nav { text-align: center; }
  ul.nav ul { text-align: left; }

  ul.nav li .menu-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--spsp-menu-border);
    background-color: var(--spsp-menu-bg);
    color: var(--spsp-blue);
  }

  ul.nav .nav-icon { margin-right: 0.5em; }

  ul.nav li.active .menu-link {
    border-bottom: 1px solid var(--spsp-blue);
    color: var(--spsp-grey);
    background-color: var(--spsp-blue-light);
  }

  ul.nav li.current > .menu-link,
  ul.nav li.current > .menu-link:hover {
    background-color: var(--spsp-blue);
  }

  ul.nav li .menu-link:hover {
    color: #fff;
    background-color: var(--spsp-grey);
  }

  ul.nav li li .menu-link {
    padding: 10px 0 10px 2em;
    background-color: #ececec;
  }

  ul.nav li li li .menu-link {
    padding: 12px 0 12px 5em;
  }

  .nav-collapse .search {
    position: relative;
    text-align: center;
    background-color: var(--spsp-menu-bg);
    padding-bottom: 7px;
  }

  .nav-collapse .search form::before {
    content: "\f002";
    font-family: var(--spsp-icon-font);
    font-weight: 900;
    position: absolute;
    padding: 18px 0 0 10px;
    font-size: 20px;
  }

  .nav-collapse .search input[type="text"],
  .nav-collapse .search input[type="search"] {
    width: 60%;
    padding: 6px 10px 6px 40px;
  }
}

/* Desktop (>= 769px) and print */
@media (min-width: 769px), print {
  html {
    font-size: 112.5%;
    -webkit-text-size-adjust: 112.5%;
    text-size-adjust: 112.5%;
  }

  .site-container { padding: 10px; }

  header.header { padding: 0 10px; }

  a.brand .logo {
    padding-right: 20px;
    font-size: 32px;
  }

  h1, h2 { font-size: 3em; }
  h3, legend { font-size: 2.1666em; }
  h4 { font-size: 1.75em; }
  h5 { font-size: 1.4em; }

  nav.navigation {
    border-bottom: 2px solid var(--spsp-grey);
  }

   .nav-collapse, .nav-collapse.is-open {
    clear: both;
    overflow: visible;
  }

  .nav-collapse::after {
    content: "";
    display: table;
    clear: both;
  }

  .navigation .btn-navbar { display: none; }

  ul.nav {
    display: inline-block;
  }

  ul.nav li {
    position: relative;
    display: inline-block;
    float: left;
  }

  ul.nav li .menu-link {
    display: inline-block;
    padding: 7px 11px 0;
    color: var(--spsp-blue);
    cursor: pointer;
  }

  ul.nav li .menu-link.has-icon {
    padding-left: 36px;
  }

  ul.nav .nav-icon {
    position: absolute;
    left: 6px;
  }

  /* Small chevron under top-level items that have children */
  ul.nav > li > .menu-link::after {
    font-family: var(--spsp-icon-font);
    font-weight: 900;
    content: "\f078";
    color: transparent;
    font-size: 10px;
    margin-top: -7px;
    text-align: right;
    display: block;
  }

  ul.nav li.parent > .menu-link::after {
    color: inherit;
  }

  ul.nav li.parent ul li.parent > .menu-link::after {
    font-family: var(--spsp-icon-font);
    font-weight: 900;
    content: "\f078";
    font-size: 10px;
    display: inline;
    position: absolute;
    right: 15px;
  }

  ul.nav li .menu-link:hover,
  ul.nav li .menu-link:focus {
    color: #fff;
    background-color: var(--spsp-grey);
  }

  ul.nav li.active > .menu-link {
    color: #fff;
    background-color: var(--spsp-blue);
  }

  ul.nav li.active > .menu-link:hover {
    color: var(--spsp-blue-pale);
  }

  /* Dropdowns */
  ul.nav li ul {
    position: absolute;
    display: none;
    min-width: 300px;
    width: max-content;
    max-width: 500px;
  }

  ul.nav li:hover > ul,
  ul.nav li:focus-within > ul {
    display: block;
    z-index: 2;
  }

  ul.nav li ul li {
    display: block;
    float: none;
  }

  ul.nav > li > ul {
    padding-top: 2px;
    border-top: 2px solid transparent;
  }

  ul.nav li ul li .menu-link {
    display: block;
    color: var(--spsp-grey);
    background-color: rgba(226, 226, 226, 0.95);
    padding-left: 50px;
    padding-right: 36px;
    padding-bottom: 7px;
  }

  ul.nav li ul li .menu-link.has-icon {
    padding-left: 50px;
  }

  ul.nav li ul li.active > .menu-link {
    color: #fff;
    background-color: rgba(89, 148, 207, 0.925);
  }

  ul.nav > li > ul > li:first-child {
    border-top: 2px solid #fff;
  }

  ul.nav li ul li ul {
    left: 240px;
    min-width: 260px;
    padding-top: 0;
  }

  ul.nav li ul li ul li .menu-link {
    background-color: rgba(198, 198, 198, 0.9);
    box-shadow: inset 0 -2px 3px rgba(118, 118, 118, 0.25);
  }

  /* Search box, right-aligned in the menu bar */
  .nav-collapse .search {
    position: relative;
    display: inline-block;
    float: right;
  }

  .nav-collapse .search form::before {
    content: "\f002";
    font-family: var(--spsp-icon-font);
    font-weight: 900;
    font-size: 20px;
    position: absolute;
    z-index: 1;
    top: 9px;
    left: 5px;
    pointer-events: none;
  }

  .nav-collapse .search input[type="text"],
  .nav-collapse .search input[type="search"] {
    width: 90px;
    padding: 6px 4px 6px 28px;
    margin: 3px 10px 3px 0;
  }
}

/* Sidebar ordering */
@media (min-width: 600px) {
  #content { order: 1; }
  #sidebar { order: 2; }
  #aside { order: 3; }
}

@media (min-width: 800px) {
  #content { order: 2; }
  #content.span6 { flex: 1.25 1 400px; }
  #content.span9 { flex: 1.25 1 600px; }
  #sidebar { flex: 1 1 200px; order: 1; }
  #aside { flex: 1 1 200px; order: 3; }
}

/* ---------- Content ---------- */

.page-header {
  margin: 10px 0;
  padding-bottom: 5px;
  border: 0;
}

.highlight,
.moduletable.news {
  background-color: var(--spsp-news);
}

.highlight::before,
.moduletable.news::before {
  content: "";
  display: block;
  background-color: #fff;
  padding-top: 2px;
  border-top: 2px solid #000;
}

.highlight::after,
.moduletable.news::after {
  content: "";
  display: block;
  background-color: #fff;
  padding-top: 2px;
  border-bottom: 2px solid #000;
}

.well {
  min-height: 20px;
  padding: 20px;
  background-color: var(--spsp-blue);
  color: #fff;
}

.well h3, .well h4, .well h5, .well a, .well legend {
  color: #fff;
}

.well a:hover {
  color: #bcbcbc;
}

.btn-primary {
  --bs-btn-bg: #004b8d;
  --bs-btn-border-color: #002f8d;
  --bs-btn-hover-bg: #002f8d;
  --bs-btn-hover-border-color: #002f8d;
}

.article-info {
  margin: 0 0 9px;
  color: var(--spsp-grey);
  font-size: 0.875em;
}

.article-info dd {
  margin-left: 0;
}

/* ---------- Footer ---------- */

footer.footer {
  padding: 2em 19px 10px;
  background-color: var(--spsp-blue);
  margin-top: 2px;
  color: #fff;
  flex-shrink: 0;
}

footer.footer a {
  color: #fff;
}

footer.footer a:hover {
  color: #bcbcbc;
}

footer.footer img {
  filter: drop-shadow(0 0 8px #fff);
}

footer.footer img.footer-logo:hover {
  filter: drop-shadow(0 0 8px #fff) grayscale(100%);
}

.footer-credits {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.footer-credits > * {
  text-align: center;
  display: inline;
}

.footer-credits .content {
  padding: 0 12px;
}

.footer-credits .footer-logo {
  max-width: 64px;
}

.footer-credits .totop .icon-chevron-up {
  margin-right: 0.25em;
}

.footer-credits .totop .icon-chevron-up::before {
  font-family: var(--spsp-icon-font);
  font-weight: 900;
  content: "\f077";
}
