/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}


.toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 62px;
    height: 32px;
    display: inline-block;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    outline: none;
    border: none;
    cursor: pointer;
    background-color: black;
    transition: background-color ease 0.3s;
  }
  
  .toggle:before {
    content: "";
    display: block;
    position: absolute;
    z-index: 2;
    width: 28px;
    height: 28px;
    background: white;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    font: 10px/28px Helvetica;
    text-transform: uppercase;
    font-weight: bold;
    text-indent: -22px;
    word-spacing: 37px;
    color: #fff;
    text-shadow: -1px -1px rgba(0,0,0,0.15);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all cubic-bezier(0.3, 1.5, 0.7, 1) 2s;
  }
  
  .toggle:checked {
    background-color: white;
    color:white;
  }

  .toggle:checked:before {
    left: 32px;
    background:black;
  }




* {
    box-sizing: border-box;
}

body {
    font-family: comic sans ms;
}

.box {
    width: 1280px;
    margin: 0 auto;
    position: relative;
}

header {
    position: relative;
    width: 1280px;
}

h1 {
    font-size: 2.5em;
    line-height: normal;
    margin: 0 auto;
    width: fit-content;
    margin-bottom: 10px;
    padding-top: 60px;
}

h2 {
    font-size: 1.5em;
    line-height: normal;
    margin: 0 auto;
    width: fit-content;
    margin-bottom: 10px;
}

nav {
    border-radius: 5px;
    word-spacing: -2px;
    font-weight: 700;
    width: 1280px;
    margin: 0 auto;
    padding: 5px;
    background-color: rgb(200, 200, 200);
    height: 55px;
    box-shadow: 0px 3px 5px rgb(200, 200, 200);
    position: fixed;
}


nav li {
    float: left;
}

nav a {
    color: black;
    line-height: 32px;
    font-size: 20px;
    display: block;
    padding: 5px 20px;
    text-align: center;
    background-color: rgb(200, 200, 200);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

nav a::after {
    content: "";
    display: block;
    width: 0;
    border-bottom: 1px solid;
    margin: 0 auto;
    transition: all 0.2s linear 0s;
}

nav a:hover::after {
    width: 90%;
}

nav a:hover {
    color: black;
}


.left {
    width: 640px;
    float: left;
    margin: 20px 0;
}

.right {
    width: 640px;
    float: left;
    margin: 20px 0;
}


.scene {
    width: 500px;
    height: 400px;
    perspective: 600px;
    margin: 0 auto;
    transition: all 1s;
    margin-bottom: 30px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
    margin: auto;
}

.card p {
    font-size: 2em;
    font-weight: 900;
}


.card img {
    width: 500px;
    height: 400px;
    margin: 0 auto;
    transition: all 1s;
    border: 4px solid black;
    border-radius: 5px;
}

.scene:hover {
    width: 550px;
    height: 440px;
}

.card:hover img {
    width: 550px;
    height: 440px;
}

.card__face {
    position: absolute;
    height: 100%;
    width: 100%;
    backface-visibility: hidden;
    text-align: center;
}

.dark-mode .card__face--back{
    background: rgb(40, 40, 40);
}

.card__face--back {
    background: rgb(200, 200, 200);
    transform: rotateY(180deg);
    padding: 10px;
    border: 4px solid black;
    border-radius: 5px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
}

.card.is-flipped {
    transform: rotateY(180deg);
}

.scene figure {
    position: relative;
}

.scene figcaption {
    position: absolute;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    bottom: 50px;
    background-color: grey;
    width: 200px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.7s;
}

figure:hover figcaption {
    opacity: 90%;
}

#darkModeCheck{
    position: absolute;
    right: 120px;
    top:8px;
}

.flags{
    position: absolute;
    right: 55px;
    width: 50px;
    height: 30px;
    background-color: gray;
    transition: all 1s;
}
.flags a{
    position: absolute;
}
.flags a:hover, .flags a:active{
    filter:brightness(150%);
}
.hide{
    transition: transform 1.5s ease;
}
.show{
    z-index: 3;
}
.flags:hover .hide, .flags:active .hide{
    display: block;
    transform: translateY(50px);
}


.dark-mode {
    animation: dark-mode 1s forwards;
}

.light-mode {
    animation: light-mode 1s forwards;
}

@keyframes dark-mode {
    100% {
        background-color: rgb(90, 90, 90);
        color: white;
    }
}

@keyframes light-mode {
    0% {
        background-color: rgb(90, 90, 90);
        color: white;
    }

    100% {
        background-color: white;
        color: black
    }
}


.dark-mode nav{
    background: rgb(40, 40, 40);
    box-shadow: 0px 3px 5px rgb(40, 40, 40);
}
.dark-mode nav a{
    background-color: rgb(40, 40, 40);
}
.dark-mode nav:hover a{
    color: white;
}

.light-mode nav{
    background-color: rgb(200, 200, 200);
    box-shadow: 0px 3px 5px rgb(200, 200, 200);
}
.light-mode nav a{
    background-color: rgb(200, 200, 200);
    color: white;
}
.light-mode nav:hover a{
    color: black;
}

.flags img{
    cursor:pointer;
}

@media only screen and (max-width: 1280px) {
    .box{
        width: 100%;
    }
    header{
        width: 100%;
    }
    nav{
        width: 100%;
    }
    h1{
        text-align:center;
        width: 100%
    }
    .box p{
        width: 80%;
        text-align:center;
    }
    .left{
        width:fit-content;
        margin: 0 auto;
        float:none;
    }
    .left p{
        width: 100%;
    }
    .right p{
        width: 100%;
    }
    .right{
        width:fit-content;
        margin: 0 auto;
        float:none;
    }
}

@media only screen and (max-width: 700px) {
    .scene{
        width: 320px;
        height: 256px;
    }
    .scene figcaption{
        opacity: 60%;
    }
    h2{
        text-align:center;
    }
    .scene:hover{
        width: 350px;
        height: 272px;
    }
    
    .card:hover img {
        width: 350px;
        height: 272px;
    }

    .left img{
        width: 320px;
        height: 256px;
    }
    .right img{
        width: 320px;
        height: 256px;
    }
    nav{
        display: flex;
        flex-direction: column;
        padding: 0;
    }
    .flags{
        top: 50px;
        left: 20px;
    }
    .hide img{
        display: block;
        background: none;
    }
    nav li{
        float: none;
    }
    nav li a{
        text-align: right;
    }
    nav li a::after{
        margin-left: 60%;
        text-align:right;
    }
    nav a:hover::after {
        width: 40%;
    }
    header{
        background: none;
    }
    .toggle{
        left: 30px;
    }
    h1{
        padding-top: 150px;
    }
}
