/**
 * @file
 * Positioning for a responsive layout.
 *
 * Define CSS classes to create a fluid grid layout with optional sidebars
 * depending on whether blocks are placed in the left or right sidebars.
 *
 * This layout uses the Zen Grids plugin for Compass: http://zengrids.com
 */

/**
 * Center the page.
 *
 * For screen sizes larger than 1200px, prevent excessively long lines of text
 * by setting a max-width.
 */
#page,
.region-bottom {
  margin-left: auto;
  margin-right: auto;
  max-width: 1004px;
  min-width:320px;
}

/* Apply the shared properties of grid items in a single, efficient ruleset. */
#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  word-wrap: break-word;
  *behavior: url("/path/to/boxsizing.htc");
  _display: inline;
  _overflow: hidden;
  _overflow-y: visible;
}

/* Containers for grid items and flow items. */
#header,
#main,
#footer {
  *position: relative;
  *zoom: 1;
}
#header:before,
#header:after,
#main:before,
#main:after,
#footer:before,
#footer:after {
  content: "";
  display: table;
}
#header:after,
#main:after,
#footer:after {
  clear: both;
}

#main {
  padding-top: 47px; /* Move all the children of #main down to make room. */
  position: relative;
}

#navigation {
  position: absolute;
  top: 0; /* Move the navbar up inside #main's padding. */
  height: 47px;
  width: 1004px;
}


@media all and (max-width: 1019px) {

  .search-form {
    display:none;
  }
  menu, ol, ul, .item-list ul {
    padding-left:10px !important;
  }
  #content ol, #content ul {
    list-style-position: inside;
  }
  ul {
    list-style-type:none;
  }

  blockquote {
    margin: 1.5em 10px;
  }
  
  
  .sidebar-second .region-sidebar-second {
    display:none !important;
  }
  .front #content {
  }
  #main {
    background:none !important;
  }
  #content {
    margin:0 auto !important;
  }
  .sidebar-second #content {
    padding: 0 10px !important;
    min-height:auto !important;
  }
 #main, .node-type-slide-node #main {
  padding-top:45px !important;
 } 
 #content, .node-type-slide-node #content {  
    width:100% !important;
    max-width:903px;
  }

  #slider .pane-node-body {
    width:100% !important;
    padding:10px !important;
    max-width:831px;
    box-sizing: border-box;
  }
  
  /* move search down on home page */
  .front #slider .pane-node-body {
/* 
    margin-top:40px;
 */
  }
  .front #block-block-1 {
    position:relative;
    margin:10px 0 12px 10px;
  }
  .front #navigation #block-block-1 {
    display:none;
  }

  #slider .views-slideshow-controls-bottom, #views_slideshow_controls_text_slider-block {  
    width:100% !important;
    max-width:903px !important;
/* 
    padding:0 10px !important;
 */
    padding:0 !important;
  }
  .views_slideshow_cycle_teaser_section,  
  .view-slider .views-field-field-slide-image,
  #slider .views-field-field-slide-image,
  #slider .views-field-field-slide-image img,
  .views_slideshow_cycle_slide {
    width:100% !important;
    height:auto !important;
    max-width:903px !important; 
  }
  #slider .views-field-field-slide-image {
    line-height:0;
  }
  
  /* temporarily disable slideshow in smaller widths on home page */
  .front .pane-slide-node {
    display: none;
  }
  
  /* slideshow hiding content in mobile/tablet */
  .views_slideshow_cycle_slide {
    position: static !important;
    margin-top: 15px !important;
  }
  
  
}

/**
 * Use 5 grid columns for larger screens.
 */
@media all and (min-width: 1020px) {

  .sidebar-second #content {
    /* Span 4 columns, starting in 1st column from left. */
    float: left;
    width: 903px;
    margin-left: 0px;
    margin-right: -903px;
  }
  
  .sidebar-second .region-sidebar-second {
    /* Span 1 column, starting in 5th column from left. */
    float: left;
    width: 101px;
    margin-left: 903px;
    margin-right: -1004px;
  }

}
