/* Jumps to in-page links (e.g. page.html#foo) do not honor fixed navbar.
   Use pseudo element to move them down.
   Taken from http://nicolasgallagher.com/jump-links-and-viewport-positioning/demo/#method-B
 */
h1[id]:before,
h2[id]:before,
h3[id]:before,
h4[id]:before,
h5[id]:before,
h6[id]:before,
a[name]:before {
    display:block; 
    content:""; 
    height:90px; 
    margin:-90px 0 0; 
}


/* Fixed subnav support: */

/* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */
@media (min-width: 980px) {
  .navbar.affix {
    position: fixed;
    top: 40px;
    right: 0;
    left: 0;
    z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
    margin-bottom: 0;
  }
  
  .navbar.affix .navbar-inner {
    border-width: 0 0 1px;
    padding-right: 0;
    padding-left: 0;
    -webkit-border-radius: 0;
       -moz-border-radius: 0;
            border-radius: 0;
    -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
       -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
            box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1);
  }

  .navbar.affix .container {
    width: 940px;
  }
}

/* Other screen sizes navbar container width */
@media (min-width: 1200px) {
  .navbar.affix .container {
    width: 1170px;
  }
}

@media (max-width: 979px) {
  .navbar.affix {
    position: static;
  }

  /* Give a positive z-index to ToC bar, otherwise the pseudo elements before may overlap and
     make the button unclickable. */
  #toc-bar {
    position: relative;
    z-index:1020;
    margin-bottom: 20px;
  }

}

/* Fix for header links - do not color/underline them */
#banner a {
	color: inherit;
	text-decoration: inherit;
}


/* Footer */

footer.well {
  padding: 50px 0;
  margin-top: 70px;
  margin-bottom: 0;
  -webkit-border-radius: 0;
     -moz-border-radius: 0;
          border-radius: 0;
  border-right: 0;
  border-left: 0;
  font-size: 90%;
}

footer.well p,
.subfooter p {
  margin-bottom: 0;
}

.subfooter {
  padding: 30px 0;
}
