html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  position: relative;
}

.split-logo {
  height: 64px;
  width: 300px;
  margin: 18px 0;
  background-repeat: no-repeat;
  background-position: 0 0;
}

.split-logo a {
  text-decoration: none;
}

.macewan-link {
  display: inline-block;
  height: 100%;
  width: 54%;
}

.library-link {
  display: inline-block;
  height: 100%;
  width: 44%;
}

.title-bar {
  background-image: none;
}

#skip-link {
  color: #8b2331;
}

a#main-content {
  margin-top: -20px;
}

.layout-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  z-index:1;
  background: linear-gradient(to bottom,  #e5e2e5 0%,#a99ea9 100%);
}

header {
  display: flex;
  width: calc(100% - 40px);
  justify-content: space-between;
  height: 100px;
  border-bottom: 4px solid #8b2331;
  background-color: white;
  padding: 0 20px;
}

header .region-site-branding {
  display: inline-block;
  width:250px;
  flex-grow:1;
}

header .region-site-navigation {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 64px;
  margin-top: 18px;
  margin-bottom: 18px;
}

header nav {
  display: flex;
  align-items: center;
  height: 100%;
}

#search-block-region {
  background-color: var(--bg-gray);
}

#search-block-region .region-search-block {
  max-width: 1245px;
  margin-left: auto;
  margin-right: auto;
}

main {
  display: flex;
  flex-direction: column;
  gap: 0px;
  flex-grow: 2;
  max-width: 1246px;
  width: 1246px;
  margin-top: 20px;
  margin-bottom: 50px;
  margin-left: auto;
  margin-right: auto;
}

.title-bar {
  background-image: none;
}

.region-page-title {
  width: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 10px 10px 0px 0px;
  height: 200px;
  max-height: 200px;
  text-align: left;
  mix-blend-mode: screen;
}

h1.page-title {
  max-width: 900px;
  line-height: 3.4rem;
}

.borrowing-and-collections-title {
  margin-top: 20px;
  background: #8b2331;
  background: linear-gradient(to bottom,  rgba(139,35,49,1) 0%,rgba(97,24,35,1) 100%);
  border-radius: 10px 10px 0px 0px;
}

.borrowing-and-collections-title .region-page-title {
  background-image: url('../images/banners/Banner_Clocktower.png');
  background-repeat: no-repeat;
  background-size: auto 200px;
  background-position: right center;
}

.technology-and-spaces-title {
  margin-top: 20px;
  background: #4a153b;
  background: linear-gradient(to bottom,  rgba(0,160,221,1) 0%,rgba(5,127,174,1) 100%);
  border-radius: 10px 10px 0px 0px;
}

.technology-and-spaces-title .region-page-title {
  background-image: url('../images/banners/Banner_RBOA.png');
  background-repeat: no-repeat;
  background-size: auto 200px;
  background-position: right center;
}

.research-and-writing-title {
  margin-top: 20px;
  background: #1b3768;
  background: linear-gradient(to bottom,  rgba(27,55,104,1) 0%,rgba(18,40,78,1) 100%);
  border-radius: 10px 10px 0px 0px;
}

.research-and-writing-title .region-page-title {
  background-image: url('../images/banners/Banner_3rdFloor.png');
  background-repeat: no-repeat;
  background-size: auto 200px;
  background-position: right center;
}

.faculty-title {
  margin-top: 20px;
  background: #2d1d21;
  background: linear-gradient(to bottom,  rgba(74,21,59,1) 0%,rgba(51,10,40,1) 100%);
  border-radius: 10px 10px 0px 0px;
}

.faculty-title .region-page-title {
  background-image: url('../images/banners/Banner_Clocktower.png');
  background-repeat: no-repeat;
  background-size: auto 200px;
  background-position: right center;
}

.about-title {
  margin-top: 20px;
  background: #00a0dd;
  background: linear-gradient(to bottom,  rgba(60,60,60,1) 0%,rgba(0,0,0,1) 100%);
  border-radius: 10px 10px 0px 0px;
}

.about-title .region-page-title {
  background-image: url('../images/banners/Banner_3rdFloorB.png');
  background-repeat: no-repeat;
  background-size: auto 200px;
  background-position: right center;
}
  
#block-macewan-library-pagetitle {
  width: 100%;
  max-width: 1245px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 75px 0 55px;
}

#block-macewan-library-pagetitle h1 {
  font-size: 3.2rem;
  font-weight: 500;
  color: white;
}

#tag-bar {
  display: none;
  width: 100%;
  background-color: var(--bg-gray);
  padding: 20px 0;
}

#tagline-text {
  width: 100%;
  max-width: 1245px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  padding: 0;
}

.back-to {
  position: absolute;
  padding-top: 10px;
  margin-left: calc((100% - 1245px) / 2);
}

.back-to a {
  color: white;
  text-decoration: none;
  border-bottom: 1px solid #8b2331;
}

.back-to a:visited {
  color: white;
}

.page-sidebar {
  display: inline-block;;
  width: 100%;
  background-color: white;
  z-index: 100;
  padding-bottom: 14px;
  border-bottom: 2px solid #efefef;
}

.page-sidebar-content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background-color: white;
  width: 100%;
}

.field--name-field-page-anchors {
  display: inline-block;
  width: calc(100% - 340);
}

.field--name-field-page-links {
}

.field--name-field-page-anchors, .field--name-field-page-links {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.3rem;
}

.field--name-field-page-links p {
  margin: 0;
  padding: 0;
}

.field--name-field-page-links p a {
  color: white;
  background-color: #8b2331;
  padding: 5px 20px;
  text-decoration: none;
}

.field--name-field-page-links p a:hover {
  color: white;
  background-color: #8b2331;
}

.page-main {
  flex-basis: 100%;
  position: relative;
  z-index: 90;
}

.field--name-field-page-anchors ul {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.field--name-field-page-anchors ul li {
  padding: 0;
}

.field--name-field-page-anchors ul a {
  text-decoration: none;
  width: 100%;
  display: inline-block;
  color: var(--font-dark-gray);
  padding: 5px 20px 5px 24px;
  font-weight: 600;
  border-left: 8px solid white;
  background-image: url('/themes/custom/macewan_library/images/icons/Icon_Down.svg');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 16px;
}

.page-sidebar-content a:hover, .page-sidebar-content a:focus {
  outline: none;
  text-decoration: underline;
}

.layout-content {
  padding: 0 20px 40px 20px;
  border-radius: 0px 0px 10px 10px;
  background-color: var(--bg-gray);
  -webkit-box-shadow: 0px 4px 5px -2px rgba(0,0,0,0.3);
  -moz-box-shadow: 0px 4px 5px -2px rgba(0,0,0,0.3);
  box-shadow: 0px 4px 5px -2px rgba(0,0,0,0.3);
}

.page-content {
  width: calc(100% - 80px);
  max-width: 1245px;
  padding: 20px 40px 40px 40px;
  background-color: white;
}

hr {
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 2px solid var(--hr-gray);
}

#widget-container {
  height: 60px;
  width: auto;
  position: fixed;
  bottom:17px;
  right: 20px;
  display: flex;
  gap: 11px;
  padding: 0;
  margin: 0;
  z-index: 200;
}

#scroll-to-top, #open-chat, #INDmenu-btn {
  flex-grow: 1;
  background-repeat: no-repeat;
  background-position: center;
  display: none;
  height: 60px;
  width: 60px;
  cursor: pointer;
  background-color: white;
  border: 0px solid white;
  border-radius: 30px 30px 30px 30px;
  -moz-border-radius: 30px 30px 30px 30px;
  -webkit-border-radius: 30px 30px 30px 30px;
  -webkit-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.5);
  -moz-box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.5);
  box-shadow: 0px 0px 5px 1px rgba(0,0,0,0.5);
}

#scroll-to-top {
  background-image: url('/themes/custom/macewan_library/images/icons/Icon_BackToTop.svg');
  background-size: 28px;
}

#open-chat {
  background-image: url('/themes/custom/macewan_library/images/icons/Icon_LiveChat.svg');
  background-size: 40px;
  display: inline-block;
}

#chat-box {
  display: none;
  z-index: 200;
  position: fixed;
  bottom: 80px;
  right: 20px;
  -webkit-box-shadow:none;
  -moz-box-shadow:none;
  box-shadow:none;
}

#close-chat {
  padding: 5px;
  width: 20px;
  height: 20px;
  position: absolute;
  right: -2px;
  top: -30px;
  text-align: center;
  background-color: white;
  color: #8b2331;
  font-weight: bold;
  cursor: pointer;
  font-size: 20px;
  line-height: 20px;
  border-top: 1px solid black;
  border-right: 1px solid black;
  border-left: 1px solid black;
}

#INDmenu-btn {
  background-image: url('/themes/custom/macewan_library/images/icons/Icon_Accessibility.svg');
  background-size: 28px;
  display: inline-block;
}

.grid-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 16px;
  justify-content: left;
}

.grid-item {
  flex-basis: 32%; 
}

.grid-item img {
  width: 100%;
  height: auto;
}

.profile-grid-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 10px;
  justify-content: space-between;
}

.profile-grid-item {
  width: 280px;
  overflow: hidden;
}

.profile-grid-item img {
  width: 100%;
  height: auto;
}

blockquote {
  width: calc(100% - 49px);
  background-color: var(--bg-gray);
  border-left: 9px solid var(--bg-mid-gray);
  padding: 1px 20px;
  margin: 20px 0;
}

#loading-gif {
  width: 100%;
  text-align: center;
}

#loading-gif img {
  width: 200px;
  height: 200px;
}

.notification {
  display: none;
  text-align: center;
  color: white;
  font-weight: bold;
  font-size: 1.33rem;
  min-height: 46px;
  line-height: 46px;
}

.notification a, .notification a:hover, .notification a:visited {
  color: white;
}

.notification .general {
  background-color: var(--teal);
}
.notification .urgent {
  background-color: var(--red);
}

#copyright-notice-wrapper {
  display: inline-block;
  width: 100%;
  color: white;
  background-color: #111111;
}

#copyright-notice {
  max-width: 1245px;
  line-height: 60px;
  margin-left: auto;
  margin-right: auto;
}

#copyright-notice img {
  height: 40px;
  width: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-right: 10px;
  float: left;
}

#copyright-notice, #copyright-notice a {
  color: #f0f0f0;
  font-size: 0.9rem;
}

#copyright-notice span {
  display: inline-block;
  line-height: 1.2rem;
  text-decoration: underline;
}

#cc-info {
  cursor: pointer;
}

.table-container {
  width: 100%;
}

.table-replacement {
  display: none;
  width: 100%
}

nav.pager {
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
}

nav.pager ul.pager__items {
  display: inline-block;
  margin-right: auto;
  margin-left: auto;
}

nav.pager li.pager__item {
  float: left;
  list-style-type: none;
}

nav.pager li.pager__item.is-active>a {
  color: var(--font-red);
}

.image-row-wrapper {
  display: flex;
  gap:20px;
  margin-bottom:20px;
}

.image-row-wrapper h2, .image-row-wrapper h3, .image-row-wrapper h4, .image-row-wrapper>p {
  margin-top: 0px;
}

.image-row-text p:first-of-type {
  margin-top: 0;
}

p img {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 1348px) {
  .layout-content, #tagline-text, #copyright-notice {
  }

  #tagline-text {
    width: calc(100% - 150px);
  }

  .back-to {
    margin-left: 75px;
  }

  .expandable table {
    font-size: 0.8rem;
  }

  div.breadcrumb {
    padding-left: 0;
    padding-right: 0;
  }

  .title-bar {
    width: 100%;
  }

  .layout-content {
    width: calc(100% - 40px);
    padding: 0 20px 40px 20px;
  }

}

@media screen and (max-width: 1286px) {

  main {
    margin-left: 20px;
    margin-right: 20px;
    width: calc(100% - 40px);
  }

}

@media screen and (max-width: 1178px) {
  #block-macewan-library-pagetitle {
     padding: 0 50px;
  }

  #tagline-text, div.breadcrumb, #copyright-notice {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }

  #tagline-text {
    width: calc(100% - 100px);
  }

  .back-to {
    margin-left: 50px;
  }
  .region-page-title .page-title span {
    line-height: 4rem;
    display: inline-block;
    max-width: 100%;
  }
  .expandable table {
    display: none;
  }
  .expandable .table-replacement {
    display: block;
  }

  h1.page-title {
    max-width: 600px;
  }
}

@media screen and (max-width: 958px) {
  
  table:not(.small-table, .hours-table, .ui-datepicker-calendar, .s-lc-mhw-tb, .s-lc-whw) {
    display: none;
  }

  .table-replacement {
    display: inline-block;
  }

  .back-to {
    display: none;
  }

  .region-page-title {
    height: 115px;
  }

  h1.page-title {
    max-width: 400px;
  }

  #block-macewan-library-pagetitle {
     padding: 0 25px;
  }

  #block-macewan-library-pagetitle h1 {
    font-size: 1.7rem;
    line-height: 1.8rem;
  }

  .region-page-title .page-title span {
    line-height: 1.8rem;

  .layout-content, #tagline-text, div.breadcrumb ,#copyright-notice {
    padding-left: 25px !important;
    padding-right: 25px !important;
  }

  #tagline-text {
    width: calc(100% - 50px);
  }

}

@media screen and (max-width: 768px) {

  .layout-content {
    background-color: white;
  }

  .region-page-title {
    background-image: none !important;
  }

  h1.page-title {
    max-width: 100%;
  }

  .page-sidebar-content {
    flex-direction: column;
  }

  .page-content {
    padding-top: 0;
  }

  .node__content {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
  }

  .page-main {
    width: 100% !important;
  }

  .page-content.help-page .page-sidebar {
    width: 100%;
  }

  .open-menu {
    overflow: visible !important;
  }

  .open-menu::after {
    transform: rotate(-135deg) !important;
    top: 14px;
  }

  #widget-container {
    flex-direction: column;
    height: auto;
    width: 40px;
    right: 10px;
  }

  #widget-container div {
    width: 40px;
    height: 40px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
  }

  #widget-container #open-chat {
    background-size: 32px;
  }

  #widget-container #accessibility-widget {
    background-size: 22px;
  }

  #chat-box {
    right: 10px;
    bottom: 170px;
  }
  .image-row-wrapper {
    flex-direction: column;
  }
}

@media screen and (max-width: 565px) {

  main {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
  
  .layout-content {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }

  .field--name-field-page-anchors ul {
    flex-direction: column;
  }
}
