/*
 * TFS header + footer restyle (site-wide). Overrides the Royal theme's header-type-2 and
 * main-footer-1 without touching their markup. Loaded by mu-plugins/tfs-chrome.php.
 * Rollback: delete tfs-chrome.php.
 */

:root {
  --tfs-pink: #E92E5B;
  --tfs-ink: #1a1a1a;
  --tfs-muted: #767676;
  --tfs-line: #ececec;
}

/* ---------- Header: desktop ---------- */

@media (min-width: 993px) {
  .header-wrapper.header-type-2 .navbar {
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .header-wrapper.header-type-2 .navbar > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 22px 0;
  }
  .header-wrapper.header-type-2 .navbar > .container-fluid::before,
  .header-wrapper.header-type-2 .navbar > .container-fluid::after,
  .header-wrapper.header-type-2 .clearfix,
  .header-wrapper.header-type-2 .navbar-header {
    display: none;
  }
  .header-wrapper.header-type-2 .header-logo {
    float: none;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
  }
  .header-wrapper.header-type-2 .header-logo img {
    height: 92px;
    width: auto;
    max-width: none;
  }
  .header-wrapper.header-type-2 .tbs {
    display: block;
    flex: 0 1 auto;
    width: auto;
  }
  .header-wrapper.header-type-2 .menu-main-container .menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    float: none;
    margin: 0;
  }
  .header-wrapper.header-type-2 .menu > li {
    float: none;
    padding: 0;
  }
  .header-wrapper.header-type-2 .menu > li > a {
    display: block;
    padding: 12px 13px !important;
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .14em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--tfs-ink);
    transition: color .2s;
  }
  .header-wrapper.header-type-2 .menu > li > a:hover,
  .header-wrapper.header-type-2 .menu > li:hover > a,
  .header-wrapper.header-type-2 .menu > li.current-menu-item > a,
  .header-wrapper.header-type-2 .menu > li.current-menu-ancestor > a {
    color: var(--tfs-pink);
  }
  /* Vancouver is a sister school, not a page here: set it apart. */
  .header-wrapper.header-type-2 .menu > li.lastItem {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid var(--tfs-line);
  }
  .header-wrapper.header-type-2 .menu > li.lastItem > a {
    color: var(--tfs-muted);
  }
  .header-wrapper.header-type-2 .menu > li.lastItem > a:hover {
    color: var(--tfs-pink);
  }
  .header-wrapper.header-type-2 .nav-sublist-dropdown a {
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    letter-spacing: .06em;
  }
}

/* 993–1199px: Bootstrap container is 970px, tighten so the menu still fits on one row. */
@media (min-width: 993px) and (max-width: 1199px) {
  .header-wrapper.header-type-2 .navbar > .container-fluid { gap: 16px; }
  .header-wrapper.header-type-2 .header-logo img { height: 76px; }
  .header-wrapper.header-type-2 .menu > li > a {
    padding: 12px 8px !important;
    font-size: 12px;
    letter-spacing: .1em;
  }
  .header-wrapper.header-type-2 .menu > li.lastItem { margin-left: 4px; padding-left: 4px; }
}

/* ---------- Header: mobile ---------- */

@media (max-width: 992px) {
  .header-wrapper.header-type-2 .header {
    background: #fff;
  }
  .header-wrapper.header-type-2 .navbar {
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .header-wrapper.header-type-2 .navbar > .container-fluid {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 10px 0;
  }
  .header-wrapper.header-type-2 .navbar > .container-fluid::before,
  .header-wrapper.header-type-2 .navbar > .container-fluid::after,
  .header-wrapper.header-type-2 .clearfix,
  .header-wrapper.header-type-2 .tbs,
  .header-wrapper.header-type-2 .navbar-header {
    display: none !important;
  }
  /* The theme centres the logo with left:50% + translate, under the menu button. */
  .header-wrapper.header-type-2 .header-logo {
    order: 1;
    float: none;
    left: auto;
    transform: none;
    width: auto;
    max-width: none !important;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  .header-wrapper.header-type-2 .header-logo img {
    float: none;
    height: 58px;
    width: auto;
    max-width: none;
    margin: 0;
  }

  /* Menu button: a labelled pill on the right, not a grey icon on the left. */
  .header-wrapper.header-type-2 #st-trigger-effects {
    order: 2;
    position: static;
    width: auto !important;
    height: auto;
    margin: 0;
  }
  .header-wrapper.header-type-2 .menu-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--tfs-ink);
    border-radius: 22px;
    background: #fff;
    color: var(--tfs-ink);
    font: 600 12px/1 "Open Sans", sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .header-wrapper.header-type-2 .menu-icon::before {
    content: "";
    display: block;
    position: static;
    width: 18px;
    height: 8px;
    margin: 0;
    border-top: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    background: none;
    box-shadow: none;
  }
  .header-wrapper.header-type-2 .menu-icon::after {
    content: "Menu";
    position: static;
    display: inline;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
  }
  .header-wrapper.header-type-2 .menu-icon:active {
    background: var(--tfs-ink);
    color: #fff;
  }
}

/* ---------- Mobile menu panel ---------- */

/* Width and page shift must match, or the page covers part of the panel. */
.st-menu.mobile-menu-block {
  width: 300px;
  transform: translateX(-300px);
  background: #fff;
}
html.st-menu-open .st-container .st-pusher {
  transform: translateX(300px);
}
.st-menu.mobile-menu-block .nav-wrapper,
.st-menu.mobile-menu-block .st-menu-content,
.st-menu.mobile-menu-block .mobile-nav {
  background: #fff;
}
.st-menu.mobile-menu-block .mobile-nav-heading,
.st-menu.mobile-menu-block .menu-main-container,
.st-menu.mobile-menu-block .et-mobile-menu {
  width: 100%;
  box-sizing: border-box;
}
.st-menu.mobile-menu-block .mobile-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid var(--tfs-line);
  background: #fff;
  color: var(--tfs-muted);
  font: 400 11px/1 "Open Sans", sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
}
.st-menu.mobile-menu-block .mobile-nav-heading .fa {
  display: none;
}
.st-menu.mobile-menu-block .mobile-nav-heading::after {
  content: "\00d7";
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--tfs-ink);
}
.st-menu.mobile-menu-block .et-mobile-menu {
  margin: 0;
  padding: 8px 0 32px;
}
.st-menu.mobile-menu-block .et-mobile-menu li {
  position: relative;
  border-bottom: 1px solid var(--tfs-line);
}
.st-menu.mobile-menu-block .et-mobile-menu > li > a {
  display: block;
  padding: 18px 56px 18px 24px;
  color: var(--tfs-ink);
  font: 400 15px/1.3 "Open Sans", sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.st-menu.mobile-menu-block .et-mobile-menu > li.current-menu-item > a,
.st-menu.mobile-menu-block .et-mobile-menu a:hover {
  color: var(--tfs-pink);
}
.st-menu.mobile-menu-block .et-mobile-menu > li#menu-item-20568 > a {
  color: var(--tfs-pink);
  font-weight: 600;
}
.st-menu.mobile-menu-block .et-mobile-menu > li.lastItem > a {
  color: var(--tfs-muted);
  font-size: 13px;
}
.st-menu.mobile-menu-block .open-child {
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 56px;
  color: var(--tfs-ink);
}
.st-menu.mobile-menu-block .sub-menu {
  padding: 0 0 10px;
  background: none;
}
.st-menu.mobile-menu-block .sub-menu::before {
  display: none;
}
.st-menu.mobile-menu-block .sub-menu li {
  border: 0;
}
.st-menu.mobile-menu-block .sub-menu a {
  display: block;
  padding: 12px 24px 12px 36px;
  color: #555;
  font: 400 14px/1.4 "Open Sans", sans-serif;
  letter-spacing: .04em;
  text-transform: none;
}

/* ---------- Footer ---------- */

footer.main-footer.main-footer-1 {
  margin-top: 40px;
  padding: 64px 0 8px;
  border: 0;
  background: #fff;
}
footer.main-footer-1 > .container > .row {
  display: grid;
  grid-template-columns: 1.4fr 1fr .7fr;
  gap: 56px;
  margin: 0;
}
footer.main-footer-1 > .container > .row::before,
footer.main-footer-1 > .container > .row::after {
  display: none;
}
footer.main-footer-1 > .container > .row > div {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  min-width: 0;
}
footer.main-footer-1 .widget-container,
footer.main-footer-1 .footer-sidebar-widget {
  margin: 0;
  padding: 0;
}
/* The theme's second widget area is empty: it was the gap. */
footer.main-footer-1 > .container > .row > div:empty {
  display: none;
}

footer.main-footer-1 .widget-title {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  color: var(--tfs-muted);
  font: 400 11px/1 "Open Sans", sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}
footer.main-footer-1 .widget-title span {
  padding: 0;
  border: 0;
}
footer.main-footer-1 .widget-title::after,
footer.main-footer-1 .widget-title span::after {
  display: none;
}

/* Testimonials */
footer.main-footer-1 .testimonials-text {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #333;
  font: italic 300 17px/1.7 "Open Sans", sans-serif;
}
footer.main-footer-1 .testimonials-text span {
  color: inherit !important;
}
footer.main-footer-1 .testimonials-text::before,
footer.main-footer-1 .testimonials-text::after {
  display: none;
}
footer.main-footer-1 .testimonial-info {
  margin-top: 16px;
}
footer.main-footer-1 .testimonial-author strong {
  color: var(--tfs-ink);
  font: 600 12px/1 "Open Sans", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}
footer.main-footer-1 .testimonial-author strong::before {
  content: "\2014\00a0";
  color: var(--tfs-pink);
}
/* The theme pins footer slides at 262px !important (its old column width); size each slide
   to the carousel instead. tfs-chrome.php re-measures the carousel once the layout settles. */
footer.main-footer-1 #owl-testimonials .owl-wrapper-outer {
  container-type: inline-size;
}
footer.main-footer-1 #owl-testimonials .owl-item {
  width: 100cqw !important;
  margin: 0;
}
/* Keeps the next slide's italic first letter from leaking into view. */
footer.main-footer-1 #owl-testimonials .item {
  padding: 0 4px;
}
footer.main-footer-1 .owl-controls {
  position: static !important;
  left: auto;
  margin-top: 20px;
  background: none;
  text-align: left;
}
footer.main-footer-1 .owl-buttons {
  position: static;
  display: flex;
  gap: 8px;
}
footer.main-footer-1 .owl-buttons div {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: transparent;
  transition: border-color .2s;
}
footer.main-footer-1 .owl-buttons div:hover {
  border-color: var(--tfs-pink);
}
footer.main-footer-1 .owl-buttons div::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  line-height: 38px;
  text-align: center;
  font-size: 14px;
  color: var(--tfs-ink);
}

/* Contact */
footer.main-footer-1 .textwidget p {
  margin: 0 0 18px;
  color: #555;
  font: 300 15px/1.7 "Open Sans", sans-serif;
}
footer.main-footer-1 .address-company {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--tfs-ink);
  font: 400 14px/1.85 "Open Sans", sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
footer.main-footer-1 .address-company a {
  color: var(--tfs-pink);
  letter-spacing: 0;
  text-transform: none;
}
footer.main-footer-1 .address-company a:hover {
  text-decoration: underline;
}

/* Social */
footer.main-footer-1 .menu-social-icons {
  margin: 0;
  padding: 0;
  text-align: left;
}
footer.main-footer-1 .menu-social-icons li {
  float: none;
  display: inline-block;
  margin: 0;
}
footer.main-footer-1 .menu-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--tfs-ink);
  border-radius: 50%;
  background: none;
  color: var(--tfs-ink);
  transition: background .2s, border-color .2s, color .2s;
}
footer.main-footer-1 .menu-social-icons a:hover {
  border-color: var(--tfs-pink);
  background: var(--tfs-pink);
  color: #fff;
}
footer.main-footer-1 .menu-social-icons i {
  font-size: 18px;
  line-height: 1;
  color: inherit;
  background: none;
}

/* Copyright bar */
.copyright.copyright-1 {
  padding: 0 0 28px;
  background: #fff;
}
.copyright.copyright-1 .row-copyrights {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--tfs-line);
}
.copyright-1 .row-copyrights::before,
.copyright-1 .row-copyrights::after,
.copyright-1 .clearfix {
  display: none;
}
.copyright-1 .pull-left,
.copyright-1 .pull-right,
.copyright-1 .footer-sidebar-widget {
  float: none;
  margin: 0;
  padding: 0;
  text-align: left;
}
.copyright-1 .textwidget,
.copyright-1 .textwidget p,
.copyright-1 .textwidget a {
  margin: 0;
  text-align: left;
  color: var(--tfs-muted);
  font: 400 12px/1.6 "Open Sans", sans-serif;
  letter-spacing: .04em;
}
.copyright-1 .textwidget a:hover {
  color: var(--tfs-pink);
}

@media (max-width: 992px) {
  footer.main-footer-1 > .container > .row {
    grid-template-columns: 1fr 1fr;
    gap: 44px 32px;
  }
  /* Contact and Instagram first; the testimonial spans underneath. */
  footer.main-footer-1 > .container > .row > div:first-child {
    order: 3;
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  footer.main-footer.main-footer-1 {
    margin-top: 0;
    padding: 36px 0 0;
  }
  footer.main-footer-1 > .container > .row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  footer.main-footer-1 .widget-title {
    margin-bottom: 12px;
  }
  footer.main-footer-1 .textwidget p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
  }
  footer.main-footer-1 .address-company {
    line-height: 1.7;
  }
  /* "Follow us" + icon on one line. */
  footer.main-footer-1 #text-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    border-top: 1px solid var(--tfs-line);
  }
  footer.main-footer-1 #text-2 .widget-title {
    margin: 0;
  }
  footer.main-footer-1 .testimonials-text {
    font-size: 15px;
    line-height: 1.65;
  }
  footer.main-footer-1 .owl-controls {
    margin-top: 14px;
  }
  .copyright.copyright-1 {
    padding-bottom: 20px;
  }
  .copyright.copyright-1 .row-copyrights {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-top: 28px;
    padding-top: 16px;
  }
}

/* The theme's own copyright rules are more specific than the ones above; outrank them. */
body .copyright.copyright-1 .container .row-copyrights {
  border-top: 1px solid var(--tfs-line);
  padding-bottom: 0;
  text-align: left;
}
body .copyright.copyright-1 .row-copyrights > div,
body .copyright.copyright-1 .footer-sidebar-widget,
body .copyright.copyright-1 .textwidget {
  margin: 0;
  text-align: left;
}

/* Royal's empty "credentials" panel prints a stray "close" under the footer. */
.credentials-html {
  display: none !important;
}
