/*
Theme Name: Karasik Lab
Author: Gladys Chan
Description: Custom theme for Karasik Lab modified from w3 paralax template
Version: 0.0.1
*/

/* UNIVERSAL */

html {
  box-sizing: border-box;
}

* {
position: relative; 
box-sizing: inherit;
transition: all 0.15s ease 0s;
}

/* Color Palette 
Cream - #FEF6E5 rgba(254,246,229,1)
Tangerine Yellow - #FFCB03 rgba(255,203,3,1)
Sky Blue - #03AFF1 rgba(3,175,241,1)
Sapphire Blue - #37489F rgba(55,72,159,1)
Dark Blue - #2E2D75 rgba(46,45,117,1)

Body text
Dark grey - #333333 for light backgrounds
White - #FFFFFF for dark backgrounds
*/

.klab-theme-dark-accent, .klab-hover-accent-light:hover {
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}

.klab-theme-dark-bg, .klab-hover-dark:hover {
  background-color: #2E2D75;
}

.klab-theme-light-accent, .klab-hover-light:hover {
  color: #2E2D75 !important;
  border-color: #2E2D75 !important;
}

.klab-theme-light-bg {
  background-color: #ffffff;
}

.klab-bg-cream {
  background-color: #FEF6E5 !important;
}
.klab-border-cream {
  border-color: #FEF6E5 !important;
}

figcaption.blocks-gallery-caption {
  margin-bottom: 1em;
}

/* Research page-specific */
.page-id-20 h1{
  color: #FFFFFF;
  background-color: #2E2D75;
}
/* Research page-specific */
.page-id-20 .w3-content:not(.foldedtab){
  color: #FFFFFF;
  background-color: #2E2D75;
}

/* 
TYPOGRAPHY 
*/

body, h1, h2, h3, h4, h5, h6 {
  font-family: "Jost", sans-serif;
}

.font-playfair {
  font-family: 'Playfair Display', serif;
}

body, html {
  height: 100%;
  color: #333;
  line-height: 1.8;
}

body {
  font-size: 18px;
}

b {
  font-weight: 600;
}

h1 {
  padding-top:100px;
  padding-bottom: 10px;
  margin-top:0;
  margin-bottom:0;
  text-align:center;
  color: #2E2D75;
}
h2 {
  font-size: 36px;
  font-weight: 300;
  font-style: italic;
}

h3 {
  font-weight: 500;
}

figcaption, .figcaption {
  font-style:italic;
  font-size:0.8em;
  text-align: center;
}

li {
  list-style-type: square;
}

hr {
  border-color: rgba(100,100,100,0.3) !important;
}
.w3-content.hr {
  padding-bottom: 0 !important;
  margin-top:-40px;
}

/* 
SITEWIDE
*/

.klab-clear { 
  clear:both;
}

/* source: wordpress codex */
img.alignright { float: right; margin: 0 0 1em 1em; }
img.alignleft { float: left; margin: 0 1em 1em 0; }
img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignright { float: right; }
.alignleft { float: left; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* source: ben marshall on responsive iframes*/
.iframe-container {
  margin-top: 10px;
  overflow: hidden;
  padding-top: 75%;
  position: relative;
}
.iframe-container iframe {
   border: 0;
   height: 80%;
   left: 0;
   position: absolute;
   top: 0;
   width: 80%;
}

/* in upgrading from 4.9.2, wordpress 5.5.1 seems to mess up image proportions by letting height be image native height but setting width to be 100% container */
.wp-block-image img {
  height:100%;
}

/* 
HEADER 
*/

header {
  position:relative;
  z-index:2;
  border-bottom: 1px solid;
}
#klabnavbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 15px 0 10px 0;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 0.9rem;
}

#klabnavbar>a {
  text-decoration: none;
}

#klabnavbar>#klablogo {
  text-transform: initial;
  font-size: 24px;
  font-weight: 500;
  letter-spacing:2px;
}

#klabnavbar> :not(#klablogo) {
  /* All nav links except logo*/
  margin-top: 29px;
  transition: all 0.25s ease-in-out 0s;
}

#klablogo>svg {
  height: 57px;
  padding-left: 3px;
  margin-bottom: -10px;
}

.klab-mobile-nav {
  position: absolute;
  width: 100%;
  box-shadow: 1px 15px 20px -17px #999;
}

.klab-mobile-nav-item {
  border-bottom:solid 1px rgba(100,100,100,0.3) !important;
  background-color: #FEF6E5;
}
.klab-mobile-nav-item:first-of-type {
  border-top:solid 1px rgba(100,100,100,0.3) !important;
}
.klab-mobile-nav-item:hover {
  color: #37489F !important;
  background-color: #fff !important;
}


/* 
CONTENT 
*/

.klab-content-wrap {
  margin: 0;
  padding: 0;
  width: 100%;
}

.w3-content {
  max-width:1440px;
  padding-bottom: 48px;
  padding-top: 10px; /* so that first child element margin wouldn't go out of the box*/
  clear:both;
}

.triangle-bottomright {
  width: 0;
  height: 0;
  border-bottom: 100px solid #37489F;
  border-left: 100px solid transparent;
  margin-top: -100px;
}
#landingtriangle.triangle-bottomright {
  border-bottom: 100px solid #FEF6E5;
}
.foldedtab-rectangle {
  margin-left: 100px;
  margin-right: 0 auto;
  margin-top: -100px;
  height: 100px;
  background-color: #ffffff;
}
.foldedtab {
  margin-top: -100px;
  color: #333333;
}
.foldedtab h2 {
  padding-top: 30px;
  min-height: 100px;
  line-height: 1em;
  color: #37489F;
}

/* Landing page specific formatting */
.page-id-19 .foldedtab h2 {
  text-align: center;
  font-weight: 600;
  font-style: normal;
  font-size: 42px;
}

.klab-prologue {
  font-style:italic !important;
  font-weight: 300 !important;
  font-size: 22px !important;
  padding-top: 10px;
  padding-bottom: 10px;
}

.klab-intro {
  font-size: 20px !important;
}

.klab-card {
  background-color: rgba(255,203,3,0.6);
  padding: 16px 16px 16px 16px;
  margin-bottom: 16px;
  border-radius: 2px;
}

/* contact us page */
.page-id-12 .w3-content.wp-block-columns {
  margin-bottom: 0;
  padding-bottom: 0;
}

/*
TWITTER FEED
*/

.page-id-19 h1 {
  padding-top: 0 !important;
}

.ctf {
  margin-bottom: 60px;
  margin-left: auto;
  margin-right: auto;

}

.ctf-tweets {
  display: flex;
  justify-content: center;
}

.ctf-item {
  /* max-width: 18%; */
  min-height: 220px;
  margin: 5px;
  padding: 20px 15px !important; /* to override default */
  background-color: rgba(255,203,3,0.6);
  border: 1px solid transparent;
  border-top: 1px solid transparent !important; /* to override default */
  border-radius: 2px;
  display: grid;
  vertical-align: top;
  /* font-size: 0.8em !important; */
  overflow:initial !important;
}

.ctf-author-name {
  display:inline !important;
}

.ctf-author-screenname, .ctf-verified, .ctf-screename-sep, .ctf-tweet-actions {
  display: none !important;
}

/* TEAM GRID */

.klab-team {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 30px;
  row-gap: 30px;
}

.klab-team > .klab-director, .klab-team > .klab-member {
  background-color: rgba(255,203,3,0.6);
}

.klab-director {
  grid-column-start: 1;
  grid-column-end: 4;
}

.klab-director > .klab-member-info > div {
  display:inline-block;
  vertical-align:bottom;
  padding-bottom: 10px;
}

.klab-team img {
  max-width: 85%;
  height: auto;
  margin: 1px 1px 10px 1px;
}

/* obsolete */

.klab-team .wp-block-image {
  margin: 0;
}
.klab-team .wp-block-image {
  max-width: 85% !important;
}

.klab-team .klab-director .wp-block-image {
  max-width: 100% !important;
}
.klab-team .wp-block-image > figure {
  margin: 0 16px 16px 0;
}
.klab-member-info {
  margin-block-end: 16px;
}
.klab-director .klab-member-info {
  justify-content: flex-end !important;
}
.klab-member-info h5 {
  font-weight: 600;
  margin:0;
  line-height: 1.8em;
  padding-inline-start:16px;
  padding-inline-end: 16px;
  color: #2D2F75;
}
.klab-team p {
  line-height: 1.5em;
  padding-inline-start:16px;
  padding-inline-end: 16px;
}
.klab-member-info p {
  margin:0;
  font-style:italic;
}
.klab-member.undergrads {
  justify-content: center;
  background-color: #37489F !important;
  min-height:280px;
  margin-bottom: 0;
  padding-top: 16px;
}
.undergrads > .klab-member-info > h5, .undergrads > .klab-member-info > p {
  color: #ffffff;
}
.undergrads > .klab-member-info > p {
  margin-bottom: 10px;
}

/* 
FOOTER 
*/

.klabfooter {
  max-width: 1440px;
  margin: 0 auto;
}

.klabfooter .w3-row {
  display: flex;
  width: 100%;
}

.footer-contact {
  width:fit-content;
  min-width: 300px;
}

small.klab-copyright {
  display:inherit;
  text-align:center;
  margin-top:3em;
}

.gmaps-yellowpin, .gmaps-bluepin, .address-indent {
  display:inline-block;
  height: 25.4px;
  width: 30px;
  vertical-align:text-top;
}
.gmaps-bluepin, .gmaps-yellowpin {
  background-size: contain;
  background-repeat:none;
}
.gmaps-bluepin {
  background-image: url('assets/bluepin.png');
}

.gmaps-yellowpin {
  background-image: url('assets/yellowpin.png');
}


/* W3 Basic Parallax Effect */
.landing-parallax, .research-parallax-1, .research-parallax-2 {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.landing-parallax {
  background-image: url("assets/landing-hero.jpg");
  margin-top: -102px;
  min-height: 70%;
  background-attachment: fixed;
}

.research-parallax-1 {
  background-image: url("assets/research-tajik-hero.jpg");
  background-position-y:0;
  min-height: 80%;
}

.research-parallax-2 {
  background-image: url("assets/research-play-hero.jpg");
  min-height: 80%;
  background-attachment: fixed;
}

.w3-wide {
  letter-spacing: 10px;
}

.w3-hover-opacity {
  cursor: pointer;
}

/*
RESPONSIVE
*/

/* max width is 1440px, beyond which goes the margin */

/* XS: For phones only */
@media only screen and (max-width: 599px) {
  .klab-hide-xs {
    display: none !important;
  }
  .landing-parallax, .research-parallax-1, .research-parallax-2 {
    background-attachment: scroll;
    min-height: 300px;
  }
  .landing-parallax {
    margin-top:0;
  }
  body.page-id-19 header {
    background-color: #37489F;
  }
  body.page-id-19 .triangle-bottomright {
    border-bottom: solid 100px #ffffff !important;
  }
  h2 {
    font-size:32px;
    width:fit-content;
    margin: 10px auto;
  }
  .page-id-19 h2 {
    font-size: 36px;
  } 
  body:not(.page-id-19) .foldedtab h2 {
    padding-top: 100px;
    padding-left: 0;
  }

  .klabfooter .w3-row {
    display:block;
  }
}

/* S: For tablet portrait and up */
@media only screen and (min-width: 600px) and (max-width: 899px) {
  .klab-hide-s {
    display: none !important;
  }

  .page-id-19 .foldedtab h2 {
    padding-left: 90px;
    padding-right: 90px;
  }
}

/* M: For tablet landscape and up */
@media only screen and (min-width: 900px) and (max-width: 1199px) {
  .klab-hide-m {
    display: none !important;
  }

  .w3-content {
    max-width: 800px; 
  }
}

/* L: For desktop and up */
@media only screen and (min-width: 1200px) {
  .klab-hide-l {
    display: none !important;
  }
  #klabnavbar, .klabfooter, .ctf {
    max-width: 1200px;
  }
  .w3-content {
    max-width: 1000px;
  }
}

/* SM */
@media only screen and (max-width: 899px){
  .footer-contact {
    margin-bottom: 20px;
  }

  .w3-content, .ctf {
    padding-left: 20px; /* 16px more than nav bar padding to account for bar items padding */
    padding-right: 20px;
    max-width: 800px;
  }

  .klab-member {
    grid-column-start: 1;
    grid-column-end: 4;
  }

  .klab-member.undergrads {
    padding-top: 0;
  }

  .klab-member > .klab-member-info {
    width:100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-block-end: 0;
  }

  .klab-member > .klab-member-info > div {
    grid-column-start: 2;
    grid-column-end: 3;
    margin-top: auto;
    margin-bottom: auto;
  }

  .undergrads > .klab-member-info {
    height:100%;
  }

  .undergrads > .klab-member-info > p, .undergrads > .klab-member-info > h5 {
    margin-top: auto;
    margin-bottom: auto;
  }

  .undergrads > .klab-member-info > p {
    margin-right: auto;
    margin-left: auto;
  }


  .klab-member img {
    grid-column-start: 1;
    grid-column-end: 2;
    height: auto;
    margin-bottom: 0;
  }

  .klab-director > .klab-member-info > div {
    padding-bottom: 0;
  }

  .ctf-tweets {
    display: block;
  }
  .ctf-item {
    min-height: fit-content;
  }

  .klabfooter {
    padding: 0 16px;
  }
}

/* ML */
@media only screen and (min-width: 900px){
  #klabnavbar {
    padding: 15px 20px 10px 20px;
  }

  .klabfooter, .ctf {
    padding: 0 36px;
  }

  .w3-content {
    padding-left: 36px; /* 16px more than nav bar padding to account for bar items padding */
    padding-right: 36px;
  }
}

/* Finicky rules for left-aligned headings of folded tabs */
@media only screen and (min-width: 600px) and (max-width: 800px){
  body:not(.page-id-19) .foldedtab h2 {
    padding-left: 130px;
  }
}
@media only screen and (min-width: 800px) and (max-width: 899px){
  body:not(.page-id-19) .foldedtab h2 {
    padding-left: calc(450px - 40vw);
  }
}
@media only screen and (min-width: 900px) and (max-width: 1000px){
  body:not(.page-id-19) .foldedtab h2 {
    padding-left: calc(468px - 44vw);
  }
}

