

/* ============== Basics ============== */

/* Boilerplate:   html {color: #222;font-size: 1em;line-height: 1.4;}  */
body {
	/* font-family: "Trebuchet MS", Verdana, sans-serif; */
  font-family: Georgia, serif;
	font-size:1em;
	line-height:1.5;
}
/*   Georgia, serif */

/* Do I need this still this? Firefox does nested quotes fine.
These two have the same result:
q, blockquote {quotes: '“' '”' '‘' '’';}
q, blockquote {quotes: "\201C" "\201D" "\2018" "\2019";}

*/
blockquote:before {
  display: block; 
  height: 0; 
  content: "“"; 
  margin-left: -.6em; 
  font: italic 400%/1 Cochin,Georgia,"Times New Roman",serif; 
  color: #999;
}  /*original had margin-left: -.95em; */

/* ============== Primary LAYOUT ============== */

/* remove all margins that push apart the layout components */
#banner h1 {margin: 0;}
#mainhead h1 {margin-top: 0;}
#mainhead h2 {margin-bottom: 0;}
#core dl {margin-top: 0;}
/* margin-top of first p and margin-bottom of last p  */
/* 
#mainfoot p:first-child {margin-top: 0;} 
#mainfoot p:last-child {margin-bottom: 0;}
#pagefoot p:first-child {margin-top: 0;}
*/
nav ul,nav ol, footer .utility {
  list-style:none;
  list-style-image:none;
  margin: 0;
  padding: 0;
}

/* box for layout elements -- can use padding and borders.
Remember MARGINS are OUTSIDE the box width */
/*  #site is NOT border-box because I am relying on set width (inside border or padding). */
#gallery, 
#mainhead, 
#core, 
main aside, 
#mainfoot, 
#mainnav, 
ul.utility,
ul.utility li a {
	box-sizing: border-box;
}
img { 
  box-sizing: content-box;
	max-width: 100%; /* images will shrink to fit their container width 
	(but border and padding are included in this width), 
  but will not get bigger than their full size */
  height: auto !important;
}

#site {/* DIV wrapper of all page content */
  position: relative;
  margin: 0 auto;
  max-width: 1000px;
}

main {
	padding: 0 2% 2%; 
}
/* top margin (padding) controlled by #breadcrumb above */

#core  {
	padding-bottom: 1em; 
	border-bottom: 1px solid #bbb; /* canceled in 3 column layout */
	margin-bottom: 1em;
}

main aside {
  
} 
main footer {
	border-top: 1px solid #bbb;
}

/* ============== banner Header, primary Nav, breadcrumbs ============== */
#breadcrumb {
	padding: 0.5em 2% 1em;
	font-size: 0.8em; /* 0.9em  */
}

#banner form {
	padding: 0.8em 1em 0.5em 0.7em;
}
#banner input[type="search"] {
	width: 13em; 
	font-size: 1.1em;  
}
#banner h1 {
 	padding: 0 0 0.2em 0.5em;
	line-height: 1.2em;
}
  /* body text == font-family: Georgia, serif; 
  font-weight: 600;
  default system Georgia only has regular and bold
  */


nav#primary {
	font-size: 0.9em;
	letter-spacing: 0.1em;
	border: 1px solid #bbb; /* bottom border and right increased 1 px from li */
}
nav#primary ul {
	line-height: 2; 
	margin: 0;
	padding: 0;
  display: flex;
  flex-flow: row wrap;
}
nav#primary li {
  flex: auto; /* distributes extra space inside of items, makes it look okay when responsive */
	border: 0 solid #bbb;
	border-right-width: 1px;
	border-bottom-width: 1px;
}
nav#primary a  {
	display: block; /* need this for the line-height to take effect, also they fill the LI item space */
	padding: 0 1em;
}
nav#primary .home a {
  padding-right: 1.5em; /* previously was = width: 21px; */
}

/* link animation is in the palette CSS  */

/* ============== MAIN GALLERY ============== */

/* inline-block elements do not have their adjacent margins collapse */
#gallery { /* gets rid of white space between images  */
  display: flex;
  flex-flow: row wrap;
}
#gallery img {
	display: block;
	/* max-width: 98%; images with margin-right of 2% will not push out of their narrow container. */
	height: auto !important;
	margin: 0 1.5% 1.5% 0;
}
#gallery > :last-child {
    margin-right: 0;
}



/* ============== MAIN HEADER ============== */
main header {
/*	line-height:1.2;  */
}
#taxon main  header h1 {
	font-size: 1.6em; /* a bit smaller for taxon names */
  margin: 0.2em 0;
	line-height: 1em; /* a bit closer  */
}
#taxon main  header h2 {
	font-size: 1.2em; /* a bit smaller for synonyms */
  margin: 0.5em 0 0.2em 0;
	line-height: 1em; /* a bit closer  */ /* line-height of 1em does not include the descenders  */
}
h1 span.author {
    font-size: 0.8em;
}


/* ============== MAIN NAV (secondary navigation [left column]) ============== */
main nav {
	margin: 0.5em 0;
}
main nav ul {

}
main nav li {
padding-left: 5px;
}
main nav li.guide {
padding-left: 0;
}
main nav li.guide,
main nav li.depth-1 {
	border-right: 1px solid #bbb;
}
main nav a,
main nav span {
display:block;
padding:5px 5px 2px 10px;
}
main nav li.guide a {
font-weight:700;
padding-left: 15px;
border: solid #bbb;
border-width: 1px 0 1px 0;
background: #eee;
}
main nav li.depth-1 a {
font-weight:700;
}
main nav li.depth-2 a {
font-weight:500;
}

main nav li.hasChildren {
background-image:url(arrow.gif);
background-position:3px 12px;  /* 6px 11px */
background-repeat:no-repeat;
background-size:6px 9px;
}
main nav li.isOpen {
background-image:url(arrowdn.gif);
background-position:1px 14px;  /* 4px 14px */
background-repeat:no-repeat;
background-size:9px 6px;
}
/* ------ cannot put background color on the active list item:
  background color on anchor [a] would overlap the arrows on the list item.
  background color on list item [li] would also include all the children items.
  Therefore I am using a span with the class to replace the anchor element.
  <span class="isActive" title="Current Page.">page title</span>
  */
main nav .isActive {
	color: #222;
	border-top: 1px solid #bbb;
	border-bottom: 3px solid #bbb;
}


/*  source:
https://www.creativebloq.com/inspiration/css-animation-examples/2  
https://codepen.io/matchboxhero/pen/VMEWrq?editors=1100
The animation consists of positioning the ::after pseudo element 
to the bottom and then scaling it when the button is interacted with.
*/
main nav a::before,
main nav a::after {
	box-sizing: border-box;
}
main nav a {
  position: relative;
}
main nav a::after {
		content: '';
		position: absolute;
		left: 50%;
		bottom: 0;
		transform: translateX(-50%) scaleX(0);
		transform-origin: 100%;
		width: 100%;
		height: 1px;
		background-color: #333;
		transition: transform 250ms;
}
main nav a:hover::after {
		transform: translateX(-50%) scaleX(1);
}


/* ============== MAIN CONTENT ============== */


.page-author {
  font-size: 90%;
}
.gonext {
  
}

/* ============== MAIN ASIDE ============== */
/* aside {max-width: 200px;} see media queries*/

aside img.map{
	margin-bottom: 1em;
}



/* ============== page Footer ============== */
#pagefoot {
	margin: 0 2% 0 3%;
	font-size: 0.9em;
}
footer ul.utility {
  list-style: none;
	border: 1px solid #bbb; /* bottom border and right increased 1 px from li */
	line-height: 2;
	margin: 1% 0 3% 0;
	padding: 0;
  display: flex;
  flex-flow: row wrap;
}
footer ul.utility li {
  flex: auto; /* distributes extra space inside of items, makes it look okay when responsive */
	border: 0 solid #bbb;
	border-right-width: 1px;
	border-bottom-width: 1px;
}  
footer ul.utility a  {
	display: block;
	padding: 0 1em;
}





/* ============== Javascript button ============== */
.back-to-top {
	position: fixed;
	bottom: 2em;
	right: 0px;
	text-decoration: none;
	color: #000;
	background: #eee;/*fallback, IE8 etc*/
	background-color: rgba(235, 235, 235, 0.60);
	font-size: 0.8em;
	padding: 1em;
	display: none;
}
.back-to-top:hover { 
	background: #ddd;/*fallback, IE8 etc*/
	background-color: rgba(215, 215, 215, 0.80);
}







/* ============== Specific page styles ============== */

blockquote:before {display: block; height: 0; content: "“"; margin-left: -.6em; font: italic 400%/1 Cochin,Georgia,"Times New Roman",serif; color: #999;} /*original had margin-left: -.95em; */

/* expanding DETAILS element */
details summary {
  background-color: #eee;
  border: 1px solid #ccc;
  padding-left: 1em;
}
details summary:hover {
  cursor: pointer;
}
details summary h3 {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-weight: bold;
  line-height: 2em;
  font-size: 1em;
}

/* Taxon page - Definition lists */

#taxon dl {
	margin: 0.5em 0; /* normalize.css = 1em 0  */
}
#taxon dt {
  font-weight: bold;
	display: block;
	color: #333;
	padding: 0 0.6em 0 0;
	margin: 0;
}

#taxon dd {
	display: block;
	margin: 0 0 0.5em 1em;
	padding: 0;
}
#taxon dd p {
/*	margin: 0;  */
}
#taxon ul.synonyms {
	list-style-type: none;
	margin: 0;
	padding: 0;
}
#taxon ul.synonyms ul {
	padding-left: 3%;
}
/*  nomenclature dd  */
li.current .genus, 
li.current .epithet {
	font-size: 1.1em;
}


/* Sitemap */
#sitemap ul{list-style-type:disc;} /* Kingdom */
#sitemap ul ul{list-style-type:circle;margin-bottom:0px;} /* Phylum */
#sitemap ul ul ul{list-style-type:square;margin-bottom:0px;} /* Class */
#sitemap ul ul ul ul{list-style-type:disc;margin-bottom:0px;} /* Order */
#sitemap ul ul ul ul ul{list-style-type:circle;margin-bottom:0px;} /* Family */
#sitemap ul ul ul ul ul ul{list-style-type:square;margin-bottom:0px;} /* Genus */
#sitemap ul ul ul ul ul ul ul{list-style-type:decimal-leading-zero;margin-bottom:0px;} /* Species */
/*
ol ol{list-style-type:lower-alpha;margin-bottom:0px;}
ol ol ol{list-style-type:lower-roman;margin-bottom:0px;}
 */




/* ============== temp coloring ==============
#taxon {background-color: gray; }
#site {background-color: white; }
#banner {background-color: #f63; }
#primary {background-color: #f1f; }
#breadcrumb {background-color: #f6f; }
main {background-color: yellow; }
#gallery {background-color: pink; }
#mainhead {background-color: teal; }
#core {background-color: #bbb; }
main aside {background-color: #ff0; }
#mainfoot {background-color: #f55; }
#mainnav {background-color: #ffa; }
#pagefoot {background-color: lime; }
    */





/* add this to code....... only screen and

@media only screen and (min-width: 35em) {

*/


/* ============== Media queries ==============  */
/* 
http://css-tricks.com/why-ems/
http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/
 */

@media only screen and (max-width: 640px) { /* NOTE = a MAX-width */
/* from Kirby site -- test this, Rocky says text size is perfect on his phone */
  html { font-size: 90%; }
	footer .pagecite { display: none; visibility: hidden; }
}

@media only screen and (max-width: 484px) {
  .back-to-top {bottom:1em;font-size:0.7em;}
}

/* ========= Mobile FIRST======== */

/* phone styles [no @media rule] */

/*  code may change if this actual image changes size  */
aside img.chicago{
	max-width: 320px;  /* 22em; about 317px */
  width: 100%; /* height is automatic */
}

@media screen and (min-width: 485px) {
/* start of medium tablet styles - and larger devices */
  #banner {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
  }
  #banner form {
    
	}
	#banner h1 {
    order: -1;
    padding: 0.2em 0 0.2em 1.5em;
  }
  #gallery img {
    width: 48%;
  	max-width: 350px;
  }
}



@media screen and (min-width: 770px) {
/* start of large tablet styles - and larger devices */

  #gallery img {
    width: 32%;
  	max-width: 350px;
  }


  #gallery {
    grid-area: gallery;
  }
  #mainhead {
    grid-area: header;
    text-align: center;
  }
  #core {
    grid-area: section;
  }
  #mainaside {
    grid-area: aside;
  }
  #mainfoot {
    grid-area: footer;
  }
  #mainnav {
    grid-area: nav;
  }

  main {
    display: grid;
    grid-template-columns: 220px auto;
    grid-template-rows: auto;
    grid-template-areas: 
      "gallery gallery"
      "header header"
      "nav section"
      "aside aside"
      "footer footer";
    grid-column-gap: 20px;
    grid-row-gap: 10px;
  }

}


@media screen and (min-width: 900px) {
/* adjust this to where Grid 3 columns starts working */
/* start of desktop styles == 992px */

  #mainhead {
    text-align: left;
  }
  
  main {
    display: grid;
    grid-template-columns: 220px auto 200px;
    grid-template-rows: auto;
    grid-template-areas: 
      "gallery gallery gallery"
      "nav header header"
      "nav section aside"
      "nav footer aside";
    grid-column-gap: 20px;
    grid-row-gap: 10px;
  }
  aside.maps img {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  #core  {
    border-bottom: 0; /* canceled in 3 column layout */
    margin-bottom: 0;
  }

}



