/* ==========================================================================
   Custom Layout Stylesheet (Bootstrap Replacement)
   ========================================================================== */

/* Box-sizing reset for layout elements */
*, *:before, *:after {
  box-sizing: border-box;
}

/* Containers
================================================== */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 768px) {
  .container {
    width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}

.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Row
================================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

/* Grid Columns
================================================== */
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, 
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, 
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, 
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
  position: relative;
  width: 100%;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

/* Extra Small Devices (Mobile grid) */
.col-xs-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.col-xs-6 {
  flex: 0 0 50%;
  max-width: 50%;
}
.col-xs-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* Small Devices (Tablets, 768px and up) */
@media (min-width: 768px) {
  .col-sm-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-sm-offset-1 {
    margin-left: 8.333333%;
  }
  .col-sm-offset-3 {
    margin-left: 25%;
  }
}

/* Medium Devices (Desktops, 992px and up) */
@media (min-width: 992px) {
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
}

/* Navigation & Navbar layout
================================================== */
.navbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar-toggle {
  position: relative;
  background-color: transparent;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 10px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
  margin-top: 4px;
}

.navbar-collapse {
  display: none;
  width: 100%;
}
.navbar-collapse.in {
  display: block;
}

.nav {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}
.navbar-nav {
  margin: 7.5px -15px;
}
.navbar-nav > li {
  position: relative;
  display: block;
}
.navbar-nav > li > a {
  position: relative;
  display: block;
  padding: 10px 15px;
}

@media (min-width: 768px) {
  .site-navigation .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
  }
  .site-navigation .navbar-nav {
    padding-top: 0 !important;
  }
  .site-navigation .navbar-nav > li > a {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 60px !important;
    height: 60px;
  }
  .navbar-header {
    width: auto;
  }
  .navbar-toggle {
    display: none;
  }
  .navbar-collapse {
    display: block !important;
    width: auto;
  }
  .navbar-nav {
    display: flex;
    flex-direction: row;
    margin: 0;
  }
  .navbar-nav > li {
    float: left;
  }
  .navbar-right {
    margin-left: auto;
  }
}

/* Modals
================================================== */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  display: none;
  overflow: hidden;
  outline: 0;
  background-color: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.modal.in {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 600px;
  pointer-events: none;
  margin: 0 auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #ffffff;
  background-clip: padding-box;
  outline: 0;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
  position: relative;
  padding: 0;
  border-bottom: 0;
}

.modal-header a.rectangle {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  color: #ffffff;
  border-color: #ffffff;
  background-color: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}
.modal-header a.rectangle:hover {
  background-color: #ffffff;
  color: #000000;
  border-color: #000000;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 25px;
}

.modal-footer {
  padding: 15px 25px 25px;
  text-align: right;
  border-top: 0;
  display: flex;
  justify-content: flex-end;
}

/* Fade scale effect */
.modal.fade .modal-dialog {
  opacity: 0;
  transform: scale(0.7);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.3s ease-out;
}
.modal.in .modal-dialog {
  opacity: 1;
  transform: scale(1);
}

/* Carousel / Tabs
================================================== */
.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.carousel-inner > .item {
  position: relative;
  display: none;
  width: 100%;
}
.carousel-inner > .item.active {
  display: block;
}

/* Form inputs
================================================== */
.form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Utilities
================================================== */
.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}

.img-circle {
  border-radius: 50%;
}

.text-center {
  text-align: center !important;
}

.list-inline {
  padding-left: 0;
  list-style: none;
  margin-left: -5px;
}
.list-inline > li {
  display: inline-block;
  padding-right: 5px;
  padding-left: 5px;
}

.list-unstyled {
  padding-left: 0;
  list-style: none;
}

@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}
