/*
 * Bootstrap layout overrides
 *
 * Bootstrap 3 uses float left for .col-*-* classes. This file keeps
 * the page columns on that model and overrides the old Grid layouts.
 */

.container {
  width: auto;
}

.home-top,
.home-columns,
.media-row,
.lower-row,
.two-column,
.contact-layout,
.content-with-sidebar,
.card-grid,
.emag-grid,
.account-layout,
.profile-layout,
.footer-grid,
.feature-cards,
.album-grid,
.home-photo-grid,
.video-thumbs,
.multi-grid,
.bulletins > div:not(.section-title),
.org-chart > div {
  display: block !important;
}

.home-top::before,
.home-top::after,
.home-columns::before,
.home-columns::after,
.media-row::before,
.media-row::after,
.lower-row::before,
.lower-row::after,
.two-column::before,
.two-column::after,
.contact-layout::before,
.contact-layout::after,
.content-with-sidebar::before,
.content-with-sidebar::after,
.card-grid::before,
.card-grid::after,
.emag-grid::before,
.emag-grid::after,
.account-layout::before,
.account-layout::after,
.profile-layout::before,
.profile-layout::after,
.footer-grid::before,
.footer-grid::after,
.feature-cards::before,
.feature-cards::after,
.album-grid::before,
.album-grid::after,
.home-photo-grid::before,
.home-photo-grid::after,
.video-thumbs::before,
.video-thumbs::after,
.multi-grid::before,
.multi-grid::after,
.bulletins > div:not(.section-title)::before,
.bulletins > div:not(.section-title)::after,
.org-chart > div::before,
.org-chart > div::after {
  display: table;
  clear: both;
  content: "";
}

/* Home page columns */
.home-top {
  margin-top: 18px;
}

.home-top .hero,
.home-top .latest-panel,
.home-columns .info-column,
.media-row .home-media,
.lower-row .bulletins,
.lower-row .schedule {
  float: left;
}

.home-top .hero,
.home-top .latest-panel,
.home-columns .info-column,
.media-row .home-media,
.lower-row .bulletins,
.lower-row .schedule {
  margin-bottom: 22px;
}

.home-photo-grid > a,
.video-thumbs > a,
.multi-grid > a,
.bulletins > div:not(.section-title) > a {
  float: left;
}

.home-photo-grid > a,
.video-thumbs > a,
.multi-grid > a {
  width: 33.333333%;
}

.bulletins > div:not(.section-title) > a {
  width: 20%;
}

.home-photo-grid,
.video-thumbs,
.multi-grid,
.bulletins > div:not(.section-title) {
  margin-right: -5px;
  margin-left: -5px;
}

.home-photo-grid > a,
.video-thumbs > a,
.multi-grid > a,
.bulletins > div:not(.section-title) > a {
  padding-right: 5px;
  padding-left: 5px;
}

.multi-grid > a {
  min-height: 96px;
}

/* Inner pages: Bootstrap col-* classes own the outer columns. */
.two-column > .side-menu,
.two-column > .page-article,
.contact-layout > .contact-info,
.contact-layout > .contact-form-card,
.content-with-sidebar > .news-grid,
.content-with-sidebar > .article-detail,
.content-with-sidebar > .right-sidebar,
.account-layout > .account-card,
.account-layout > .account-side,
.profile-layout > .profile-menu,
.profile-layout > .profile-card,
.footer-grid > section {
  float: left;
}

.two-column > .side-menu,
.two-column > .page-article,
.contact-layout > .contact-info,
.contact-layout > .contact-form-card,
.content-with-sidebar > .news-grid,
.content-with-sidebar > .article-detail,
.content-with-sidebar > .right-sidebar,
.account-layout > .account-card,
.account-layout > .account-side,
.profile-layout > .profile-menu,
.profile-layout > .profile-card,
.footer-grid > section {
  margin-bottom: 24px;
}

.news-grid,
.right-sidebar,
.card-grid,
.emag-grid {
  margin-right: -15px;
  margin-left: -15px;
}

.news-grid .news-card,
.card-grid > article,
.emag-grid .emag-card {
  float: left;
  margin-bottom: 22px;
}

.news-card.is-lead {
  display: block !important;
}

.news-card.is-lead .thumb,
.news-card.is-lead > div {
  float: left;
  width: 50%;
}

.right-sidebar {
  display: block !important;
}

.right-sidebar > section {
  float: left;
  width: 100%;
  margin-bottom: 20px;
}

.card-grid > article,
.emag-grid > article {
  display: block;
}

.emag-card > a {
  display: block;
}

.emag-card > a > img,
.emag-card > a > div {
  float: left;
  width: 50%;
}

.emag-card > a > div {
  width: 50%;
  min-height: 210px;
}

.emag-card > a::after {
  display: table;
  clear: both;
  content: "";
}

/* Album uses floats because its thumbnails do not need Bootstrap columns. */
.album-grid > button {
  float: left;
  width: 33.333333%;
  height: 230px;
  border: 6px solid transparent;
}

.album-grid > button:first-child {
  width: 66.666667%;
  height: 472px;
}

/* Form controls in a .row use float left. */
.form-row > label {
  float: left;
  width: 50%;
  padding-right: 7px;
  padding-left: 7px;
}

.form-row {
  margin-right: -7px;
  margin-left: -7px;
}

.form-row::before,
.form-row::after {
  display: table;
  clear: both;
  content: "";
}

.feature-cards > div {
  float: left;
}

.org-chart > div > span {
  float: left;
  width: 25%;
}

/* Override old component grid layouts with float layouts. */
.latest-list,
.leaders,
.profile-menu nav,
.account-layout > aside,
.footer-grid {
  display: block !important;
}

.leaders > div {
  display: block;
  margin-bottom: 14px;
}

.leaders > div > b {
  float: left;
  margin-right: 13px;
}

.leaders > div::after,
.profile-menu nav::after {
  display: table;
  clear: both;
  content: "";
}

.profile-menu nav a {
  float: left;
  width: 100%;
}

.account-layout > aside {
  min-height: 0;
}

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

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

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

@media (max-width: 991px) {
  .latest-list > article {
    float: left;
    width: 50%;
  }

  .right-sidebar > section {
    width: 50%;
  }

  .footer-grid > section {
    min-height: 180px;
  }
}

@media (max-width: 767px) {
  .home-top .hero,
  .home-top .latest-panel,
  .home-columns .info-column,
  .media-row .home-media,
  .lower-row .bulletins,
  .lower-row .schedule,
  .two-column > .side-menu,
  .two-column > .page-article,
  .contact-layout > .contact-info,
  .contact-layout > .contact-form-card,
  .content-with-sidebar > .news-grid,
  .content-with-sidebar > .article-detail,
  .content-with-sidebar > .right-sidebar,
  .account-layout > .account-card,
  .account-layout > .account-side,
  .profile-layout > .profile-menu,
  .profile-layout > .profile-card {
    width: 100%;
  }

  .latest-list > article,
  .right-sidebar > section,
  .news-card.is-lead .thumb,
  .news-card.is-lead > div,
  .emag-card > a > img,
  .emag-card > a > div {
    width: 100%;
  }

  .news-card.is-lead .thumb img {
    height: 220px;
  }

  .emag-card > a > div {
    min-height: 0;
  }

  .album-grid > button,
  .album-grid > button:first-child {
    width: 100%;
    height: 240px;
  }

  .form-row > label,
  .org-chart > div > span {
    width: 100%;
  }

  .home-photo-grid > a,
  .video-thumbs > a {
    width: 33.333333%;
  }
}

/*
 * Footer: three equal visual zones.
 * The two link sections form the middle third (2/12 + 2/12).
 */
.footer-grid > section {
  float: left;
  min-height: 0;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 992px) {
  .footer-grid > .footer-brand,
  .footer-grid > .footer-newsletter {
    width: 33.333333%;
  }

  .footer-grid > section:nth-child(2),
  .footer-grid > section:nth-child(3) {
    width: 16.666667%;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .footer-grid > .footer-brand {
    width: 50%;
  }

  .footer-grid > section:nth-child(2),
  .footer-grid > section:nth-child(3) {
    width: 25%;
  }

  .footer-grid > .footer-newsletter {
    clear: both;
    width: 100%;
  }
}

@media (max-width: 767px) {
  .footer-grid > .footer-brand,
  .footer-grid > .footer-newsletter {
    width: 100%;
  }

  .footer-grid > section:nth-child(2),
  .footer-grid > section:nth-child(3) {
    width: 50%;
  }

  .footer-grid > section:nth-child(2) {
    clear: left;
  }

  .footer-grid > .footer-newsletter {
    clear: both;
  }
}
