/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
  HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */


body, div, main, section, article {
  box-sizing: border-box; 
}

/* universal background color */
body {
  background-image: url("../img/background.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  background-color: #000000; 
}

/* header image */
header img {
  width: 544px;
  max-width: 56%;
  margin-top: min(32px, 3.28%);
  margin-bottom: min(16px, 1.64%);
}

/* clearfix hack to prevent image overflow. check out the W3Schools page on it. */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/*FONTS*/

/* header font */
#showComic, header, h1, h2, h3, h4, h5 {
  font-family: 'Josefin Slab';
  margin: 0px;
  font-size: 32px;
}

/* body font */
.subPage p, footer, #authorNotes, .archiveTable {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 18px;
  line-height: 24px;
}

/* STYLING FOR SUBPAGES (about, characters, etc) */

/*general*/

.subPage {
  width: 1000px;
  max-width: 98%;
  background-color: #ffffff;
  margin: auto;
  margin-bottom: 10px;
  padding: 0px 12px 12px;
}

.subPage:not(.archivePage) {
  text-align: center;
}

/* for pictures displayed to the left */
.leftPic {
  clear: left;
  float:right;
  margin-left:20px;
}

/* for pictures displayed to the left */
.rightPic {
  clear: right;
  float:left;
  margin-left:20px;
}

/* specific to Characters */
.charTable, .charTable td { 
  width: 100%;
}

/* link colors */
a {
      color: #000000;
	  text-decoration: underline solid transparent;
	  text-decoration-thickness: 2px;
	  text-underline-offset: 3px;
	  transition: text-decoration 0.5s;
    }
	
a:hover {
  text-decoration: underline solid #000000;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* HEADER */

/* HOMEPAGE */

#pageContainer {
	position:relative;
	min-height: 100vh;
}

#pageContent {
	padding-bottom: 3.375rem;
}

/* style nav button images */
.comicNav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding-top: min(16px, 1.64%);
  padding-bottom: min(16px, 1.64%);
  margin-left: 3.28%;
  margin-right: 3.28%;
  gap: 3.28%;
  max-width: 912px;
}
.comicNavButton img {
  max-width: 100%;
}

.comicNavEnabled:not(:hover) {
  filter: brightness(1);
  transition: filter 0.5s;
}

.comicNavEnabled:hover {
  filter: brightness(0.58);
  transition: filter 0.5s;
}

.comicNavDisabled {
  filter: brightness(0.58);
}

/* style comic page image */
.comicPage {
  position:relative;
}

.comicPageLeft {
  width: 50%;
  height: 100%;
  position:absolute;
}

.comicPageRight {
  width: 50%;
  height: 100%;
  position:absolute;
  right: 0px;
  top: 0px;
}

.comicPageDefault {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding: 0px 32px 0px 32px;
  gap: 3.28%;
  max-width: 976px;
}

.comicPageDefault img {
  max-width: 100%;
}

/* style spread page */
.comicPageSpread {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding: 0px 32px 0px 32px;
  gap: 3.28%;
  max-width: 1888px;
}

.comicPageSpread img {
  max-width: 100%;
}

hr {
  border-top: 1px solid currentcolor;
}

.writeDate h3 {
  font-family: 'Josefin Sans';
  font-weight: normal;
  font-style: italic;
  font-size: 18px;
  color: #6C6C6C;
  text-align: left;
}

@media only screen and (orientation: landscape) {
#pageInfo {
  display: flex;
  flex-flow: row;
  flex-wrap: nowrap;
  margin-top: 16px;
  margin-left: 3.28%;
  margin-right: 3.28%;
  align-items: flex-start;
  max-width: 912px;
  gap: 3.28%;
}
	
#nav {
  display: flex;
  margin-left: 0;
  margin-right: 0;
  width: 23.36%;
  gap: 32px;
  justify-content: center;
  flex-flow: column;
}
	
#navBox {
  display: flex;
  text-align: left;
  flex-flow: column;
  font-family: 'Josefin Slab';
  font-weight: bold;
  font-size: 32px;
  background-color:#ffffff;
  background-clip: padding-box;
  border: 32px solid transparent;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  margin-left: 0px;
  margin-right: 0px;
  gap: 32px;
}

.navButton {
   height:34px;
}

.rssButton {
  height: 34px;
}

.rssButton img {
   width: 24px;
   position: relative;
   bottom: -2px;
   margin-right: 12px;
}

#navExternalDesktop {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  width: 204px;
  justify-content: center;
  column-gap: 16px;
  row-gap: 16px;
}

#navExternalMobile {
  display: none;
}

/* style author notes */
#authorNotes {
  background-color:#ffffff;
  background-clip: padding-box;
  border: 32px solid transparent;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  margin-left: 0px;
  margin-right: 0px;
  text-align: left;
}

.writeAuthorNotes a {
  color: #939393;
}

#notesAndComments {
  display: flex;
  flex-flow: column;
  margin-left: 0;
  margin-right: 0;
  width: 73.36%;
}  

.writePageTitle h1 {
  line-height: 32px;
}
  
#comments {
  margin: 32px;
}

#comments h1 {
  color: #ffffff;
}

#comments hr {
  margin-top: 16px;
}

}

@media only screen and (orientation: portrait) {
.comicPageDefault {
  padding: 0px 3.28% 0px 3.28%;
}

.comicPageSpread {
  padding: 0px 3.28% 0px 3.28%;
}
	
#pageInfo {
  margin-top: 16px;
  margin-left: 3.28%;
  margin-right: 3.28%;
}
	
#navBox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Josefin Slab';
  font-weight: bold;
  font-size: 32px;
  background-color:#ffffff;
  background-clip: padding-box;
  border: 32px solid transparent;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  max-width: 848px;
  margin: auto;
}

.navButton {
}

.rssButton {
}

.rssButton img {
   width: 24px;
   position: relative;
   bottom: -2px;
   margin-right: 12px;
}

#navExternalDesktop {
  display: none;
}

#navExternalMobile {
  display: flex;
  justify-content: center;
  flex-flow: row;
  width: 204px;
}

/* style author notes */
#authorNotes {
  background-color:#ffffff;
  background-clip: padding-box;
  border: 32px solid transparent;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  max-width: 848px;
  margin: auto;
  text-align: left;
}

.writeAuthorNotes a {
  color: #939393;
}
  
.writePageTitle h1 {
  line-height: 32px;
}
  
#comments {
  margin: 32px;
}

#comments h1 {
  color: #ffffff;
}

#comments hr {
  margin-top: 16px;
}
}

#navBoxSubpage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Josefin Slab';
  font-weight: bold;
  font-size: 32px;
  background-color:#ffffff;
  background-clip: padding-box;
  border: 32px solid transparent;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  max-width: 848px;
  margin: auto 3.28% 3.28% 3.28%;
}

#navExternalFooter {
  display: flex;
  justify-content: center;
  flex-flow: row;
}

@media screen and (max-width: 500px) {
	#navBox {
      font-size: 16px;
	  border: 16px solid transparent;
	  border-image-slice: 32;
      border-image-source:url("../img/border/notesBorder.png");
	}
	
	#navBoxSubpage {
      font-size: 16px;
	  border: 16px solid transparent;
	  border-image-slice: 32;
      border-image-source:url("../img/border/notesBorder.png");
	}
	
	#authorNotes {
      border: 16px solid transparent;
	  border-image-slice: 32;
      border-image-source:url("../img/border/notesBorder.png");
	}
	
	.writeAuthorNotes a {
      color: #939393;
	}
	
	.rssButton img {
      width: 12px;
      position: relative;
      bottom: -1px;
      margin-right: 6px;
    }
	
    .navButton {
    }

    .rssButton {
    }
    
	header img {
      width: 301px;
    }
	
	.writeDate h3 {
  font-family: 'Josefin Sans';
  font-weight: normal;
  font-style: italic;
  font-size: 14px;
  color: #6C6C6C;
  text-align: left;
}
	
#showComic, header, h1, h2, h3, h4, h5 {
  font-family: 'Josefin Slab';
  margin: 0px;
  font-size: 24px;
}
	
	body {
	  font-size: 14px;
	  line-height: 18px;
	}
	
}

/* ARCHIVE PAGE */

/* style table in which archive is displayed */
.archiveTable {
  width: 90%;
  border-collapse:collapse;
}

/* style archive table cells */
.archiveTable td {
  padding: 3px;
  vertical-align: center;
  
}

/* style table cell in which page title is displayed */
.archiveCellTitle:not(.leftAlignTableText) {
  max-width: 300px;
  text-align: center;
}

.archiveCellDate {
  text-align: right;
  min-width: 120px;
}

.archiveCellNum {
  text-align: center;
  min-width: 30px;
}

/* style the thumbnails on the archive page */
.archiveCellThumb {
    width: 500px;
    max-width: 60px;
}
.archiveCellThumb img{
    max-width: 100%;
  }

/* for left aligning the text in a table cell */
.leftAlignTableText td {
  text-align: left;
}

/* highlight a table row and make pointer into hand when moused over */
.archiveRow:hover {
  background-color: #939393;
  cursor: pointer;
}

.subPage {
  background-color: transparent;
  color: #ffffff;
}

.subPage h1 {
}

.subPage h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 18pt;
}

.chapterHeader {
	display: flex;
	flex-flow: row;
	align-items: start;
	gap: 3.28%;
	margin: 1.64%;
}

.chapterHeader img {
  width: 80px;
  height: 80px;
}

#loreButtonGrid {
	justify-content: center;
	display: grid;
	gap: 3.28%;
	grid-template-areas:
	  "topButton topButton"
	  "leftButton rightButton";
	max-width: 100%;
	margin-left: 3.28%;
	margin-right: 3.28%;
	margin-bottom: 4.92%;
}

.loreButtonEnabled {
  filter: brightness(1);
  transition: filter 0.5s;
}

.loreButtonEnabled:hover {
  filter: brightness(0.58);
  transition: filter 0.5s;
}

.loreButtonTop {
	grid-area: topButton;
}

.loreButtonTop img {
  max-width: 100%;
}

.loreButtonLeft {
	grid-area: leftButton;
}

.loreButtonLeft img {
  max-width: 100%;
}

.loreButtonRight {
	grid-area: rightButton;
}

.loreButtonRight img {
  max-width: 100%;
}

.loreButtonDisabled {
  filter: brightness(0.58);
}

.credits {
	margin-left: 3.28%;
	margin-right: 3.28%;
	margin-bottom: 3.28%;
    max-width:848px;

}

.creditsFlex {
	display: flex;
	flex-flow: row;
	gap: 3.28%;
}

.creditsImg {
	width: 45%;
}

.creditsImg img {
	max-width:100%;
}

.creditsText {
	width: 51.72%;
}

.creditsText a {
	color: #939393;
}

/* CHARACTERS */

#writeCharacters {
  margin-top: 3.28%;
}

.characterRow {
  display:flex;
  flex-flow: row;
  max-width:848px;
  margin: 1.64%;
  gap: 3.28%;
}

.characterThumb {
  width: 22.54%;
  cursor: pointer;
}

.characterThumb img {
  max-width: 100%;
  transition: filter 0.5s;
}

.characterInfo {
  position: relative;
  display: none;
  max-width: 848px;
  margin-left: 1.64%;
  margin-right: 1.64%;
  margin-top: 16px;
  background-color: #fff;
  padding: 16px;
  border-radius: 16px;
  color:#000000;
}

.characterInfoInside {
  max-width: 100%;
  border: 32px solid;
  border-image-slice: 32;
  border-image-source:url("../img/border/notesBorder.png");
  text-align: left;
}

.characterInfoInside img {
  width: 300px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3.28%;
}

.closeButton img {
  margin: 0;
  padding: 0;
  width: 24px;
}

.closeButton {
  position: absolute;
  top: 8px;
  right: 8px;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.characterBoxTriangle {
  position: absolute;
  top: -16px;
  left: calc(88.73% - 16px);
  width: 32px;
}

@media screen and (max-width: 500px) {
  .characterImg {
  max-width: 100%;
}

  body {
	  background-position: bottom;
  }

}

/* FOOTER */
footer {
  color: #ffffff;
  margin-top: 12px;
  margin-bottom: 15px;
  float: left;
  width: 100%;
  font-size: 12px;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 3.375rem;
}

footer p {
  margin: auto;
}

footer a {
  color: #c9c9c9;
}

footer a:hover {
  color: #939393;
}

/* take away margins from the edges of the screen */
html, body {
  margin: 0;
}