/**
 * RPI 2018 Styles
 * This is a mobile-first theme.
 * Base / mobile theme is in rpi2018-base.css
 * The smaller sizes are primarily left here for completeness.
 */
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
}

/* Small Devices, Tablets */
/* Primary Break Point */
@media only screen and (min-width : 768px) {
  /* HEADINGS */
  h1,h2,h3,h4,h5,h6 {
    line-height: 1.5em;
  }

  /* TOPBAR */
  #block-searchandglobaltopbarlinks {
    display: block;
    float: right;
    line-height: 30px;
    position: relative;
    top: 10px;
  }
  #block-searchandglobaltopbarlinks a {
    margin-left: 0.5em;
    font-weight: 200;
    text-decoration: none;
  }
  #block-searchandglobaltopbarlinks a:hover, #block-searchandglobaltopbarlinks a:active {
    text-decoration: underline;
  }
  #block-searchandglobaltopbarlinks .glyphicon {
    font-size: 16px;
    vertical-align: middle;
    top: -2px;
  }
  /* HEADER / BANNER */
  #banner-text-only {
    /*padding: 7.5em 0 1.8em 0;*/
    padding: 2em 0;
  }

  /* MAIN MENU */
  #navbar-outer {
    border-top: 1px solid #d6001c;
    border-bottom: 1px solid #ddd;
  }
  #navbar-main {
    background-color: white;
    color: #424242;
    border-radius: 0;
    border: none;
    padding: 0;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: 400;
    min-height: 0;
  }
  #navbar-main .navbar-collapse {
    padding: 0;
  }
  #navbar-main .navbar-nav > li > a {
    font-size: 0.9em;
    padding: 1em 1.75em;
    color: #222;
  }
  #navbar-main .navbar-nav > li > a:hover {
    color: #333;
    background-color: #eee;
  }
  #navbar-main .navbar-nav > .active > a,
  #navbar-main .navbar-nav > .active > a:hover,
  #navbar-main .navbar-nav > .active > a:focus {
    color: white;
    background-color: #d6001c;
  }
  /* Superfish Version */
  #superfish-main ul {
    background-color: white;
    z-index: 10;
  }
  #superfish-main > li > ul {
    margin-top: 4px;
  }
  #superfish-main > li a {
    font-size: 0.9em;
    color: #222;
    text-decoration: none;
  }
  #superfish-main > li a:hover {
    color: #333;
    background-color: #eee;
  }
  #superfish-main > li > a {
    padding: 1em 1em;
  }
  #superfish-main > li ul a {
    text-transform: none;
  }
  #superfish-main > li.active-trail > a,
  #superfish-main > li.active-trail > a:hover,
  #superfish-main > li.active-trail > a:focus {
    color: white;
    background-color: #d6001c;
  }
  #superfish-main .sf-sub-indicator {
    font-size: 10px;
    margin-top: 1px;
  }
  #superfish-main > li > a > .sf-sub-indicator {
    display: none; /* hide arrow at top level */
  }
  /* Social Media Icons */
  #block-socialmediamenubarlinks {
    position: absolute;
    top: -7px;
    right: 0;
  }
  #block-socialmediamenubarlinks a {
    margin-left: 0.5em;
  }
  /* SUBMENU RIGHT SIDEBAR */
  aside .block {
    margin-left: 2em;
  }
  aside ul.navbar-nav {
    float: none;
    /*margin-top: 48px;*/
    margin-top: 4em;
    padding: 1.5em 1em;
  }
  .quick-facts {
    padding: 0;
    margin-top: 2em;
    text-align: center;
  }
  /* FRONTPAGE */
  #front-page-boxes .col-sm-6:first-child {
    padding: 0 15px 0 0;
  }
  #front-page-boxes .col-sm-6:last-child {
    padding: 0 0 0 15px;
  }
  body.path-frontpage h1.page-header {
    margin-top: 0.5em;
  }
  /* FP News */
 /* .fp-news-block img {
    width: 100%;
    min-width: 0;
    margin: 0 auto !important;
    padding: 0 1em !important;
    height: auto;
    display: block;
    float: none;
  }*/
  /* Front Page Submenu */
  body.path-frontpage aside ul.navbar-nav,
  body.node-8 aside ul.navbar-nav { /* news page */
    margin-top: 1em;
  }
  #block-summerarchforfrontpage {
  }
  #block-frontpagefortune500callout .icon.rpi-icon-cupploa {
    left: 0;
  }
  body.user-logged-in #block-frontpagefortune500callout .icon.rpi-icon-cupploa {
    left: -50px; /* being logged in changes the box in which the block is loaded (at least for super-admins) 
                    should check what the state is for regular admins without block editing */
  }

  /* GENERAL PAGES */
  .field--name-field-image img {
    float: right;
    max-width: 30%;
    min-width: 0;
    width: auto;
    margin: 0.5em 0 1em 1em;
  }
  .paragraph--type--image-and-caption {
    float: right;
    max-width: 50%;
    margin: 0.5em 0 1em 1em;
  }
  .paragraph--type--image-and-caption img {
    width: 100%; /* override general field-image */
  }
  figure.align-left,
  img.align-left {
    margin: 0.5em 1em 1em 0;
    min-width: 0;
    max-width: 50%;
  }
  figure.align-right,
  img.align-right {
    margin: 0.5em 0 1em 1em;
    min-width: 0;
    max-width: 50%;
  }
  figure { 
    /* figure is used to encapsulate images with captions */
    width: unset;
  }
  /* Simple Columns */
  .col-two {
    -moz-column-count: 2;
    -webkit-column-count: 2;
    column-count: 2;
    -moz-column-fill: balance;
    column-fill: balance;
  }
  .col-two li {
    break-inside: avoid;
  }
  /* RESEARCH AREA */
  body.node--type-research-area .field--name-field-associated-faculty .field--items {
    -moz-column-count: 2;
    -webkit-column-count: 2;
    column-count: 2;
    -moz-column-fill: balance;
    column-fill: balance;
  }
  body.node--type-research-area .field--name-field-associated-faculty .field--items .field--item {
    break-inside: avoid;
    line-height: 1.2em;
    margin-bottom: 0.75em;
  }
  /* LAB and CENTER PAGES */
  body.node--type-center-or-lab .field--name-field-website {
    margin-bottom: 1em;
  }
  body.node--type-center-or-lab .field--name-field-logo {
    float: right;
    margin: 2.75em 0 1em 1em;
  }
  /* GRADIENT BOX */
  .gradient-box img {
    float: left;
    clear: left;
    width: 220px;
    height: auto;
    margin: 0.75em 1em 1em 0;
  }
  /* FACILITIES */
  body.node--type-facility .field--name-field-lab-manager {
    float: right;
    margin: 0 0 1em 2em;
    max-width: 30%;
  }
  body.node--type-facility .field--name-field-equipment {
    clear: both;
  }
  body.node--type-facility .field--name-field-equipment.flexCol2 .field--items,
  body.node--type-facility .field--name-field-equipment.flexCol3 .field--items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  body.node--type-facility .field--name-field-equipment.flexCol2 > .field--items  > .field--item {
    flex-basis: 48%;
  }
  body.node--type-facility .field--name-field-equipment.flexCol3 > .field--items  > .field--item {
    flex-basis: 30%;
  }
  body.node--type-facility .field--name-field-equipment.flexCol1 > .field--items  > .field--item {
    clear: both;
  }
  .field--name-field-equipment.flexCol2 .field--name-field-image img,
  .field--name-field-equipment.flexCol3 .field--name-field-image img {
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  /* PERSON LISTING */
  .person-list .views-row {
    padding: 1.5em;
  }
  .personbox img {
    width: 140px;
  }
  .personbox .resource-buttons {
    position: absolute;
    bottom: 1.5em;
    left: 180px;
  }
  
  /* make faculty box margin less large */
  #block-views-block-faculty-block-bme-faculty h2.block-title {
    margin-top: 0;
  }

  /* FACULTY and PERSON PROFILE */
  body.node--type-faculty-profile article.faculty-profile img.person-image,
  body.node--type-person article.person .field--name-field-photo img {
    min-width: 0;
    max-width: 40%;
    float: right;
    margin: 0 0 2em 2em;
  }
  body.node--type-faculty-profile article.faculty-profile h2,
  body.node--type-person article.person h2 {
    font-size: 2em;
  }
  body.node--type-faculty-profile article.faculty-profile .field-position,
  body.node--type-person article.person .field--name-field-title-position {
    margin: 0 0 0.5em;
    font-weight: 300;
    font-size: 2em;
  }
  /* ADVISING */
  body.node-12 main article img {
    padding: 1em 1em 1em 0;
  }
  body.node-12 h2 {
    clear: both;
  }
  body.node-12 h3 {
    margin-top: 8px;
  }
  /* NEWS LISTING */
  section.col-sm-6 { /* center col in a 3-col layout */
    padding-left: 2em;
  }
  section.col-sm-6 .breadcrumb {
    margin: 1.5em 0 0;
  }
  body.node-8 #block-views-block-news-block-7,
  body.node-8 #block-views-block-lectures-block-2 {
    margin-top: 0; 
  }
  .news-listing .news-title img {
    float: left;
    width: 200px;
    height: auto;
    margin: 0.4em 0.8em 0 0;
  }
  .news-listing.announcements-listing .news-title img {
    width: 150px;
  }
  .news-listing .paragraph--type--image-and-caption {
    float: none;
    max-width: 100%;
    margin: 0;
  }
  #block-twitterfeed {
    margin-top: 2em;
    overflow: scroll;
    max-height: 1000px;
  }
  /* NEWS PAGE */
  body.node--type-article .region-content .field--name-field-image {
    float: right;
    max-width: 50%;
    margin: 0 0 1em 1em;
  }
  body.node--type-article .region-content .field--name-field-image img {
    width: unset; /* override general field-image setting and let the previous style rule */
    max-width: 100%;
  }
  /* SEMINAR / LECTURE LISTING */
  #block-views-block-lectures-block-1 .views-row {
    clear: left;
    margin-bottom: 2em;
  }
  .seminar-photo-title img {
    float: left;
    height: auto;
    min-width: 0;
    max-width: 110px;
    margin: 0.5em 1em 2em 0;
  }
  /* SEMINARS / LECTURES */
  body.node--type-lecture h1.page-header {
    font-size: 3em;
  }
  body.node--type-lecture .lecture-details {
    margin-bottom: 1em;
    font-size: 1.4em;
    font-weight: 300;
    line-height: 1.4em;
  }
  body.node--type-lecture .lecture-speaker-info {
    float: left;
    width: 50%;
    padding-right: 1em;
  }
  body.node--type-lecture .field--name-field-speaker-full-name {
    font-size: 1.4em;
    line-height: 1.4em;
    font-weight: 400;
  }
  body.node--type-lecture .lecture-details-datetime {
    float: left;
    width: 50%;
    margin: 0 0 1em 0;
    padding: 0.5em 0;
    background-color: unset;
    border: none;
  }
  body.node--type-lecture .field--name-body {
    clear: both;
  }
  body.node--type-lecture .lecture-speaker-bio {
    clear: both;
    margin: 1em 0;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    padding: 2em;
  }
  body.node--type-lecture .field--name-field-speaker-photo img {
    float: right; 
    border: 1px solid #eee;
    margin: 0 0 0 2em;
    max-width: 20%;
    min-width: 0;
    height: auto;
  }

  /* HALL OF FAME */
  .view-hall-of-fame .hof-image img {
    float: left;
    min-width: 0;
    width: 160px;
    height: auto;
    margin: 0.5em 1.5em 0 0;
  }
  body.node--type-alumni-hall-of-fame-entry .field--name-field-image img {
    float: right;
    margin: 0.5em 0 1em 1em;
    min-width: 0;
    max-width: 50%;
    width: auto;
  } 
  /* SPECIAL */
  /* Welcome page */
  body.node-11 .field--name-field-image img {
    max-width: 300px;
  }
  /* Program Templates Color Boxes */
  .program-templates-color-boxes .color-key-inner-container {
    display: flex;
  } 
  .program-templates-color-boxes .color-key-inner {
    flex-grow: 1;
    flex-basis: 50%;
  }
  /* BOOTSTRAP OVERRIDES */
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
  #superfish-main > li > a {
    padding: 1em 1.5em;
  }
   /* PERSON LISTING */
  .person-list .view-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .person-list .views-row {
    width: 100%;
    text-align: left;
    flex-basis: 48.6%;
  }
  /* RESEARCH AREA */
  body.node--type-research-area .field--name-field-associated-faculty .field--items {
    -moz-column-count: 3;
    -webkit-column-count: 3;
    column-count: 3;
  }
}

/* Wide Desktops */
@media only screen and (min-width : 1200px) {
  #superfish-main > li > a {
    padding: 1em 1.75em;
  }
  /* GRADIANT BOX */
  .gradient-box img {
    width: 300px;
  }
  /* RESEARCH AREA */
  body.node--type-research-area .field--name-field-associated-faculty .field--items {
    -moz-column-count: 4;
    -webkit-column-count: 4;
    column-count: 4;
  }
  /* DEGREE PROGRAMS */
  body.node--type-degree-program aside {
    padding-top: 83px;
  }
}
