/* Media Queries for responsive changes */

@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (   min--moz-device-pixel-ratio: 2),
only screen and (     -o-min-device-pixel-ratio: 2/1),
only screen and (        min-device-pixel-ratio: 2),
only screen and (                min-resolution: 192dpi),
only screen and (                min-resolution: 2dppx) {

  /* Retina to override the bird size */
  #site-name a:before {
    background-position: -15px -50px;
    background-size: 38px 69px;
  }

}

@media (max-width: 1600px) {

  .hero-fade .hero-wrap-outer {
    width: auto;
  }

  .hero-fade .hero-wrap-outer:before,
  .hero-fade .hero-wrap-outer:after {
    display: none;
  }

}

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

  .container,
  .navbar-static-top .container,
  .navbar-fixed-top .container,
  .navbar-fixed-bottom .container {
    max-width: 768px;
  }

  .profile-menu {
    margin-right: 0;
  }

  #site-name {
    margin-left: 0;
  }

  #subnav .navbar .btn-navbar {
    margin: 10px 0 !important;
  }

  #gaz-content .container {
    padding: 16px;
    width: 724px;
  }


  .article-wrap.span9 .load-more {
    margin-left: 160px;
  }

}

@media (min-width: 979px) {

  #globalnav .container,
  #subnav .container {
    width: 1020px;
  }

}

@media (max-width: 979px) {

  #subnav .navbar .btn-navbar {
    background-color: #4cb7ea;
    background-image: -moz-linear-gradient(top, #4cb7ea, #0481b2);
    background-image: -ms-linear-gradient(top, #4cb7ea, #0481b2);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4cb7ea), to(#0481b2));
    background-image: -webkit-linear-gradient(top, #4cb7ea, #0481b2);
    background-image: -o-linear-gradient(top, #4cb7ea, #0481b2);
    background-image: linear-gradient(top, #4cb7ea, #0481b2);
    background-repeat: repeat-x;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#'4cb7ea, endColorstr='#'0481b2, GradientType=0);
    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
    border: 1px solid #0481b1;
    padding: 8px 25px 8px 10px;
    margin: 10px 40px;
    position: relative;
  }

  .btn-navbar:before,
  .btn-navbar:after {
    position: absolute;
    top: 12px;
    right: 5px;
    display: inline-block;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0,0,0,0.25);
    border-left: 6px solid transparent;
    border-top-color: transparent;
    content: '';
  }

  .btn-navbar:after {
    right: 6px;
    border-right: 5px solid transparent;
    border-bottom: 5px solid white;
    border-left: 5px solid transparent;
  }

  .btn-navbar.collapsed:before,
  .btn-navbar.collapsed:after {
    border-bottom: none;
    border-top: 6px solid rgba(0,0,0,0.25);
  }

  .btn-navbar.collapsed:after {
    border-top: 5px solid white;
  }

  .nav-collapse.in + .btn-close {
    display: block;
  }

  #subnav .leaf.first a {
    margin-left: 0;
  }

  #subnav a {
    border-bottom: 1px solid #dfdfdf;
  }

  #subnav a.active,
  #subnav a.active-trail {
    background: inherit;
    color: #555;
  }

  #subnav a.active:before,
  #subnav a.active:after,
  #subnav a.active-trail:before,
  #subnav a.active-trail:after {
    display: none !important;
  }

  .btn-cta {
    display: inline-block !important;
    margin: 10px auto !important;
  }

  .g-navigation > .book-content > ul {
    margin: 0;
    width: auto;
  }

  /* WYSYWYG Elements */
  .stat {
    margin: 10px auto;
    display: block;
    border-right-width: 0;
    width: auto;
  }

  .stat-wrap {
    display: block;
  }

  /* Product page heroes */
  .node-type-product #hero .hero-wrap-outer {
    background-image: none;
  }

  body.node-type-product #hero .hero-wrap-inner {
    padding-right: 0;
    text-align: center;
  }

  /* Success Stories Listing */

  .view-success-story .span6:last-child .node-teaser {
    margin-left: auto;
  }

  #preface .views-field-field-success-story-tagline {
    top: 130px;
  }

  #preface .views-field-field-success-story-tagline .field-content a {
    font-size: 20px;
    line-height: 26px;
  }

}

@media (max-width: 767px) {

  .divider {
    display: none;
  }

  /* Fonts */

  h1#page-title { font-size: 300%; }
  h2 { font-size: 250%; }
  .hero-fixed h1#page-title,
  h3 { font-size: 200%; }
  #gaz-content-footer .start-advertising span,
  h4 { font-size: 160%; }
  h5 { font-size: 130%; }
  h6 { font-size: 110%; }

  /* Section: Menu */

  #globalnav .container,
  #subnav .container {
    width: auto;
  }

  #subnav .navbar .btn-navbar {
    margin: 0;
    position: absolute;
    top: -36px;
    right: 20px;
    z-index: 5;
  }

  .btn-close {
    right: 20px;
  }

  #site-name {
    margin-left: 0;
  }

  #page-wrapper {
    background: none;
  }

  .site-banner,
  #globalnav,
  #subnav,
  #hero,
  #gaz-sub-footer,
  #globalfooter {
    margin: 0 -20px;
  }

  #globalnav {
    padding: 0 20px;
  }

  #subnav {
    padding: 0;
  }

  #subnav a {
    margin: 0;
    padding: 16px 20px;
  }

  #subnav a.active:before,
  #subnav a.active:after {
    display: none;
  }

  #globalnav .locale-switcher,
  #globalnav .profile-menu,
  #globalnav .search-form {
    display: none;
  }

  #subnav .search-form {
    display: block;
    float: none;
    margin: 0;
    padding: 8px 20px;
    text-align: center;
    background: #efefef;
    border-bottom: 1px solid #dfdfdf;
  }

  #subnav .search-form form,
  #subnav .search-form .control-group {
    margin: 0;
  }

  #subnav .search-form input {
    width: 100%;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
  }

  #subnav .search-form .search-form-submit {
    top: 15px;
    right: 28px;
  }


  /* Section: Hero */

  #hero .g-title-eyebrow,
  #hero .g-teaser,
  #hero .g-tagline {
    margin: 5px 0 0;
    line-height: 1.2;
  }

  #hero .g-title-eyebrow {
    margin: 0;
  }

  #hero.hero-notext {
    margin-bottom: -150px;
  }

  .hero-empty {
    height: 10px;
  }

  .hero-empty,
  .hero-fluid {
    padding: 0;
  }

  #hero .container {
    padding: 0 20px;
  }

  .hero-fixed,
  .hero-fixed .container,
  .hero-fixed .hero-wrap-inner {
    height: 200px;
    width: auto;
  }

  #hero h1#page-title {
    font-size: 28px;
  }

  #hero #tagline {
    font-size: 22px;
    line-height: 26px;
  }

  #hero .btn-play {
    background: url('../img/sprite.png') no-repeat 0 -64px;
    height: 30px;
    width: 30px;
    margin-top: 5px;
  }

  #hero .g-hero-video {
    height: auto;
    width: 100%;
  }

  #hero + #gaz-content .container {
    margin-top: -50px;
  }

  /* Success Story Listing View */
  #preface .view-success-story .views-field-title {
    top: 15%;
  }

  #preface .view-success-story .views-field-title span a {
    font-size: 30px;
  }

  #preface .views-field-field-success-story-tagline {
    top: 46%;
  }

  #preface .view-success-story .views-field-title:after {
    margin: 8px auto;
  }

  #preface .views-field-field-success-story-tagline .field-content a {
	  font-size: 16px;
	  line-height: 20px;
  }

  .view-success-story {
    margin-top: 20px;
  }

  .view-success-story .span6 {
    margin-bottom: 40px;
  }

  .view-success-story .span6 .media {
    margin-bottom: 10px;
  }

  .view-success-story .span6 .profile-image {
    float: none;
    margin: 0 auto 8px;
  }

  .view-success-story .node-success-story {
    text-align: center;
  }

  /* Success Story Heroes */

  .page-home #hero h1#page-title {
    font-size: 200%;
  }

  #hero .g-success-story-categories {
    margin-top: 0;
  }

  #hero .profile-name .divider {
    margin: 10px auto;
  }

  /* Section: Article */

  /* Make the article margins 40px depending on which columns are present. */

  /* Both columns: */
  .article-wrap.span7 > * {
    margin: auto;
  }

  /* Right column: */
  .article-wrap.span9 > * {
    margin: auto;
  }

  /* Left column: */
  #preface,
  .article-wrap.span10 > * {
    margin-left: auto;
    margin-right: auto;
  }

  #gaz-content .container {
    padding: 0 0 20px 0;
  }

  .book-block-menu {
    display: none;
    visibility: hidden;
  }

  #sidebar-second {
    margin: 20px 0 0;
  }

  #sidebar-second .d-block {
    margin: 0 0 20px;
  }

  #sidebar-second h2,
  #sidebar-second .content {
    margin-left: 0;
    margin-right: 0;
  }

  #sidebar-first-bottom .view-success-story-taxonomy {
    border-top: 1px solid #eee;
  }

  /* Products */

  body.node-type-product #hero h1#page-title {
    margin: 5px 0;
  }

  /* Success Stories */

  #preface .g-success-story-summary {
    padding: 10px 0 25px;
  }

  #preface .g-success-story-summary h3 {
    margin: 15px 0 0 !important;
  }

  #preface .g-success-story-summary .d-field-item:nth-of-type(even) {
    border: none !important;
  }

  #preface .g-success-story-summary .d-field-item:last-child {
    padding-left: 20px;
  }

  #hero + #gaz-content .container {
    margin-top: auto !important;
  }

  #gaz-content .container:before,
  #gaz-content .container:after {
    display: none;
  }

  #gaz-content .container {
    margin: 0 -20px;
    padding: 20px;
  }

  .media {
    margin-bottom: 20px;
    overflow: hidden;
  }

  .view-related-success-story .node-success-story {
    text-align: center;
    margin-bottom: 40px;
  }

  /* Section: Footer */

  footer#gaz-sub-footer,
  footer#globalfooter {
    padding: 18px 20px 20px;
  }

  #globalfooter .g-menu-global-footer {
    float: none;
    font-size: 12px;
    text-align: center;
  }

  #globalfooter .copyright {
    display: block;
    float: none;
    background: none;
    padding: 0;
    font-size: 12px;
    text-align: center;
  }

  #globalfooter .navbar {
    float: left;
    margin-right: 0;
    margin-left: 10px;
  }

  /* Embedded Tweets */

  .g-tweet .twitter-tweet-rendered.tw-align-center {
    width: auto !important;
  }

  /* Embedded Timelines */

  .g-helper-tfw-embedded-timeline {
    display: none;
  }

  /* Search */

  article .search-form > div {
    padding: 20px;
  }

  article #edit-basic .form-submit,
  article #edit-basic .form-text {
    font-size: 14px;
    padding: 8px;
  }

  article .search-form.form-horizontal #edit-basic .controls {
    right: 80px;
  }

  article #edit-basic .form-submit {
    width: 80px;
  }

  /* Blog */

  .g-blog-page .g-tweet-button {
    position: static;
    margin: 10px 0;
  }

  .g-blog-page article .content {
    margin-left: 0;
  }

  .load-more-wrap {
    margin: 40px 0 60px;
  }

  .article-wrap.span9 .load-more {
    margin-left: 0;
  }

}

@media (max-width: 480px) {

  #hero.hero-notext {
    margin-bottom: -150px;
  }

  .media .pull-left {
    float: left;
  }
  .media .pull-right {
    float: right;
  }

}