body {
  background-color: #1F1F1F;
  color: #CCC;
  font-family: 'Rubik', sans-serif;
}

header {
  text-align: center;
}

header.top {
  margin-top: 36px;
}

section.front figure {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

section.front figure img {
  width: 70%;
  height: 70%;
  margin: 15%;
}

main {
  width: 80%;
  width: 80vw;
  margin: 0 auto;
  margin-top: 60px;
}

main.detail {
  margin-top: 0;
}

main article.home {
  margin: 0.5%;
  margin: 0.5vw;

  display:table-cell;
  vertical-align:middle;
}

main.homepage article:hover {
  cursor: pointer;
}

main article.home, main article.home section {
  float: left;
  width: 19vw;
  height: 19vw;

  background-size: cover;
}

main article div {
  width: 100%;
  height: 100%;

  background-size: 100% 100%;
}

article section header {
  text-align: center;
  color: white;
  height: 5.5vw;
  margin-top: 3vw;
}

article header h2, article header h3 {
  text-transform: uppercase;
}

article header h2 {
  margin-top: 0;
}

footer {
  width: 60%;
  margin: 0 auto 40px auto;
  padding-top: 15px;
  border-top: 2px solid #aaa;
}

footer a,footer a:hover,footer a:visited, footer a:active {
  color: #CCC;
}

article .front {
  background-color: #666;
}

article .back {
  background-color: #888;
}

article .back header p {
  padding: 24px;
}

.clr {
  clear: both;
}

footer {
  position: relative;
}

p.disclaimer {
  float: left;
}

p.copyright {
  float: right;
}

p.contact {
  position: absolute;
  width: 100%;
  text-align: center;
}

[v-cloak] {
    display: none;
}

/* flipping panels */

/* entire container, keeps perspective */
/*.flip-container {
	perspective: 1000px;
}*/
/* flip the pane when hovered */
/*.flip-container:hover .flipper, .flip-container.hover .flipper {
	transform: rotateY(180deg);
}*/

/* flip speed goes here */
/*.flipper {
	transition: 0.6s;
	transform-style: preserve-3d;

	position: relative;
}*/

/* hide back of pane during swap */
/*.front, .back {
	backface-visibility: hidden;

	position: absolute;
	top: 0;
	left: 0;
}*/

/* front pane, placed above back */
/*.front {
	z-index: 2;
	transform: rotateY(0deg);
}*/

/* back, initially hidden pane */
/*.back {
	transform: rotateY(180deg);
}*/
.flip-container {
  -webkit-perspective: 700px;
  perspective: 700px;
  width: 30vw;
  height: 20vw;
  margin: auto;

  z-index: 999;
}

/*.flip-container:hover .flipper {
  -webkit-transform: rotateY(-90deg);
  transform: rotateY(-90deg);
}*/

.flip-container:hover .front {
  transform: rotateY(-180deg);
  -webkit-transform: rotateY(-90deg);

}

.flip-container:hover .back {
  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
}

.flipper {
  width: 19vw;
  height: 19vw;
  position: relative;

  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;

  /*-webkit-transition: all 0.4s ease-out;
  transition: all 0.4s ease-out;
  -webkit-transform-origin: 9.5vw 9.5vw -9.5vw;
  transform-origin: 9.5vw 9.5vw -9.5vw;*/
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  /*-webkit-transform-origin: 0 0;
  transform-origin: 0 0;*/

  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.front {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;

  transform-origin: 9.5vw 9.5vw;
  -webkit-transform-origin: 9.5vw 9.5vw -9.5vw;

  -webkit-transition: all 0.4s ease-out;
  transition: all 0.4s ease-out;

  -webkit-transform: rotateY(0deg);
  transform: rotateY(0deg);
  z-index: 2;
}
.back {
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;

  transform-origin: 9.5vw 9.5vw;
  -webkit-transform-origin: 9.5vw 9.5vw -9.5vw;

  -webkit-transition: all 0.4s ease-out;
  transition: all 0.4s ease-out;

  transform: rotateY(180deg);
  -webkit-transform: rotateY(90deg);
  z-index: 1;
}

/* DETAIL PAGE */

header.detail {
  width: 75%;
  margin: 26px auto;
  text-transform: uppercase;
  text-align: left;
  font-size: 1.4em;
}

article.detail h2 {
  text-align: left;
  text-transform: uppercase;
}

article.detail {
  width: 75%;
  margin: 0 auto;
}

article.detail figure, header.detail figure {
  width: 12vw;
  height: 12vw;

  margin: 0 80px 80px 0;

  float: left;
  position: relative;

  z-index: 50;
}

article.detail figure img, header.detail figure img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  z-index: 50;
}

.detail figure img.partner-logo {
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
}

article.detail span {
  font-size: 1.1em;
  display: block;
  float: left;
  width: 70%;
}

.quote {
  width: 75%;
  margin: 40px auto 0 auto;
  border-top: 2px solid #777;
  /*border-bottom: 2px solid #777;*/
  padding: 70px 0;
  text-align: center;
  font-size: 2em;

  font-family: 'Mina', sans-serif;

  clear: both;
}

section#chat {
  background-color: white;
  color: black;

  position: fixed;
  bottom: 0;
  right: 0;
  width:20%;
  min-width: 260px;
}

section#chat header {
  padding: 20px 6px;
  position: relative;
}

section#chat header img {
  background-color: #1F1F1F;
  position: absolute;
  width: 80px;
  left: -42px;
  top: -42px;
  border-radius: 40px;
  border: 2px solid #1F1F1F;
  opacity: 0.95;
}

section#chat header h3 {
  margin: 0;
}

section#chat header:hover {
  cursor: pointer;
  background-color: #ddd;
}

section#chat .topline {
  margin: 0 20%;
  height: 4px;
  border-top: 4px solid black;
  box-sizing: border-box;
}

section#chat .login {
  padding: 30px 10px;
}

section#chat .chatWindow {
  height: 100%;
  top: 60px;
  left:auto;
  background-color: #fff;
  width: 100%;
}

section#chat .chatWindow input {
  border: 1px solid #888;
}

section#chat .signature {
  font-size: 0.7em;
  font-style: italic;
  color: gray;
  padding: 8px;
  width: 100%;
  text-align: right;
  box-sizing: border-box;
}

section#chat .messages {
  height: 400px;
  overflow-y: scroll;
}

section#chat input {
  width: 100%;
  padding: 6px 10px;
  box-sizing: border-box;
  font-size: 1.1em;
}

section#chat .message, section#mobile-chat .message {
  float: left;
  clear: both;
  padding: 3px 8px;
  background-color: #919Dd0;
  border-radius: 6px;
  box-sizing: border-box;
  margin: 3px 6px;
  max-width: 70%;
}

section#chat .message.admin, section#mobile-chat .message.admin {
  float: right;
  background-color: #c1cDc0;
  text-align: right;
}

section#chat .message.system, section#mobile-chat .message.system {
  width: 100%;
  max-width: 90%;
  margin: 6px 5%;
  text-align: center;
  background-color: transparent;
  border: 1px solid #303030;
  border-radius: 6px;
  padding: 6px;
  color: #303030;
}

.err {
  color: red;
  text-align: center;
}

section#mobile-chat {
  display: none;
  z-index: 1000;
}

img.img-3 {
  width: 32%;
}

header.detail figure {
  display: none;
}

main.policy {
  width: 50%;
}

article.detail span img {
  width: 60%;
}

@media screen and (max-width: 767px) {
  main {
    margin-top: 36px;
  }

  main article.home, main article.home section {
    float: left;
    width: 39%;
    width: 39vw;
    height: 39vw;
  }

  main.policy {
    width: 90%;
  }

  article section header {
    height: 15vw;
    margin-top: 12vw;
  }

  section.front header h2 {
    font-size: 1.4em;
  }

  section.front header h3 {
    font-size: 1.2em;
  }

  article.detail figure {
    display:none;
  }
  
  header.detail figure {
    margin: 0 auto 34px auto;
    text-align: center;
    display: block;
    float: left;
    width: 21vw;
    height: 21vw;
  }

  header.detail span {
    line-height: 12vw;
    margin-left: 14px;
    float: left;
    max-width: 60vw;
  }

  header.detail img {
    width: 100%;
    height: auto;
    margin-bottom: 30px;
  }

  article .back header p {
    display: none;
  }

  header.top img {
      width: 60%;
  }

  article.detail, header.detail, section.quote {
    width: 100%;
  }

  header.detail {
    margin-top: 24px;
  }

  /* Disabled animation on mobile */
  .flip-container:hover .front {
    transform: none;
    -webkit-transform: none;
  }

  .flip-container:hover .back {
    transform: none;
    -webkit-transform: none;
  }

  .face.back {
    display: none;
  }

  article.detail span {
    width: 100%;
    margin: 12px;
  }

  .back {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
  
    transform-origin: 9.5vw 9.5vw;
    -webkit-transform-origin: 9.5vw 9.5vw -9.5vw;
  
    -webkit-transition: none;
    transition: none;
  
    transform: none;
    -webkit-transform: none;
    z-index: 1;
  }

  img.img-3 {
    width: 100%;
  }

  footer {
    width: 80%;
    margin-top: 36px;
  }

  footer p {
    width: 100%;
    float: none;
    text-align: center;
  }

  footer p.contact {
    position: relative;
  }

  section.quote {
    padding: 40px 0 0 0;
  }

  section#chat {
    display: none;
  }

  section#mobile-chat {
    background-color: white;
    position: sticky;
    top: 0;
    display: block;
    width: 100vw;
    border-radius: 6px;
    color: #303030;
  }

  section#mobile-chat > header {
    height: 8vh;
  }

  section#mobile-chat > header > h3 {
    margin: 0;
    line-height: 8vh;
  }

  section#mobile-chat .chatwindow {
    height: 100%;
    width: 100vw;
    background-color: white;
    position: fixed;
    top:0;
    left: 0;
  }

  .chatwindow > header {
    height: 8%;
    min-height: 40px;
    border-bottom: 2px solid #e4e4e4;
  }

  .chatwindow > header > h3 {
    line-height: 8vh;
    margin: 0;
  }

  section#mobile-chat .messages {
    height: 74%;
    overflow-y: scroll;
  }

  section#mobile-chat input {
    height: 8%;
    min-height: 40px;
    width: 100%;
    line-height: 40px;
    padding-left: 6px;
  }
}
