@import url('https://fonts.googleapis.com/css?family=Raleway:400,700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Comfortaa&display=swap');

* {
    box-sizing: border-box;
}

body {
    color: #242424;
    margin: 0;
    overflow: hidden auto;
    transition: opacity 0.35s;
    font-family: 'Raleway', sans-serif;
}
body.loading {
    opacity: 0;
}
body.loaded {
    opacity: 1;
}

h1 {
    font-size: 2.5em;
    font-weight: bold;
}
p {
    font-size: 1em;
}

a {
    transition: color 0.2s;
}
a:link {
    color: #1eace9;
}
a:visited {
    color: #22aeff;
}
a:hover {
    color: #22deff;
}
a:focus {
    color: #22deff;
    outline: none;
}
a:active {
    color: #239cff;
}

picture {
    display: inline-block;
}
picture.fit-vertical img {
    object-fit: contain;
}
picture.fit-vertical img {
    height: 100%;
}
picture.fit-horizontal img {
    width: 100%;
}

/* Logo */
.logo {
    display: inline-flex;
    position: relative;
    max-height: 100px;
    align-items: center;
}
.logo .img {
    width: auto;
    height: 100%;
    vertical-align: middle;
}
.logo .img img {
    max-height: 100px;
}
.logo .title {
    margin: 0 0 0 10px;
    display: inline-block;
    font-size: inherit;
    font-family: 'Comfortaa', cursive;
}

/* Section */
.anchor {
    height: 50px;
}
.section {
    width: 98%;
    margin: 0 auto;
    padding: 50px;
    position: relative;
    box-shadow: 0 7.5px 15px rgba(120,120,120,0.35);
    border-top: 4px solid black;
}
.section.full-width {
    width: 100%;
    margin: 0;
    padding: 0 50px;
    max-width: 100vw;
    box-shadow: none;
    border-top: none;
}
.section h1:first-of-type {
    margin-top: 0;
}

/* Back to top button */
#back-to-top {
    z-index: 9;
    right: 35px;
    bottom: var(--actual-bottom);
    padding: 15px;
    font-size: var(--size);
    
    color: white;
    border: none;
    outline: none;
    border-radius: 50%;
    background: #242424;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
    
    cursor: pointer;
    position: fixed;
    box-sizing: content-box;
    user-select: none;

    transform: translateY(calc(var(--actual-bottom) + 95px));
    transition: color 0.2s, background-color 0.2s, transform 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);

    --size: 36px;

    --bottom: 25px;
    --bottom-safe-zone: 0;

    --actual-bottom: var(--bottom);
}
#back-to-top i {
    width: var(--size);
    display: block;
}
#back-to-top.visible {
    transform: none;
}

/* Column layouts */
.col-3 {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
}
.col-3 .col {
    width: 33.33%;
    padding: 10px;
    position: relative;
}

.col-2 {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
}
.col-2 .col {
    width: 50%;
    padding: 10px;
    position: relative;
}

/* Forms */
form {
    color: black;
    position: relative;
}

form .form-group {
    position: relative;
    margin: 15px 0;
}
form .form-group label {
    color: inherit;
    width: 100%;
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    user-select: none;
    margin-bottom: 15px;
}
form .form-group input {
    color: #242424;
    width: 100%;
    border: 1px solid #a2a2a2;
    padding: 10px 0 10px 15px;
    font-size: 1.1em;
    user-select: auto;
    border-radius: 4px;
    background-color: rgba(242, 242, 242, 0.35);
    transition: background-color 0.2s ease-in-out;
}
form .form-group textarea {
    color: #242424;
    width: 100%;
    height: 150px;
    resize: none;
    padding: 10px 0 10px 15px;
    font-size: 1.1em;
    user-select: auto;
    background-color: rgba(242, 242, 242, 0.35);
    transition: background-color 0.2s ease-in-out;
}
form .form-group input:hover, form .form-group textarea:hover {
    background: rgba(255, 255, 255, 0.5);
}
form .form-group input:focus, form .form-group textarea:focus {
    background: #f2f2f2;
}

form .form-group .checkbox {
    width: 100%;
    margin: 0;
    height: 35px;
    padding: 6.5px 0 6.5px 40px;
    display: inline-block;
    font-size: 1em;
    user-select: none;
    font-weight: normal;
}
form .form-group .checkbox > input {
    width: 0;
    height: 0;
    margin: 0;
    visibility: hidden;
}
form .form-group .checkbox > .checkmark {
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    position: absolute;
    background-color: #f2f2f2;
    transition: background-color 0.2s ease-in-out;
}
form .form-group .checkbox > .checkmark::after {
    content: '';
    top: 0px;
    left: 7.5px;
    width: 7.5px;
    height: 15px;
    border: solid #f2f2f2;
    position: absolute;
    transform: rotate(45deg);
    border-width: 0 3px 3px 0;
    transition: opacity 0.2s ease-in-out;
}
form .form-group .checkbox > .checkmark:hover {
    background: #d4d4d4;
}
form .form-group .checkbox > input:checked ~ .checkmark {
    background: var(--primary-accent-color);
}

form .submit {
    color: inherit;
    border: none;
    cursor: pointer;
    margin-left: calc(100% - 112px);
    padding: 15px 25px;
    font-size: 1em;
    margin-top: 25px;
    background: gray;
    box-shadow: 0 2.5px 5px -1.25px rgba(0,0,0,0.2);
    user-select: none;
    border-radius: 4px;
    transition: background-color 0.25s;
}
form .submit:hover {
    background: #a3a3a3;
}

/* Modals */
#modals {
    visibility: hidden;
}
#modals.opened {
    visibility: visible;
}
#modals .background {
    z-index: 20;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100vw;
    height: 100vh;
    position: fixed;
    visibility: hidden;
    background: rgba(0,0,0,0.75);
    transition: opacity 0.25s, visibility 0.25s;
}
#modals.opened .background {
    opacity: 1;
    visibility: visible;
}
.modal {
    top: 50px;
    left: 50%;
    z-index: 21;
    position: fixed;
    background: white;
    border-radius: 5px;
    transform: translate(-50%, -100vh);
    box-shadow: 0 2px 15px -1px rgba(0,0,0,0.25);
    transition: transform 0.5s cubic-bezier(0.215, 0.610, 0.355, 1);
    animation: modalTransitionReverse 0.25s both;
}
.modal.visible {
    transform: translateX(-50%);
}
.modal .modal-header {
    width: 100%;
    /* height: 65px; */
    font-size: 1em;
    position: relative;
    background: #ebebeb;
    padding: 15px 15px 15px 25px;
    border-bottom: 1px solid #dfdfdf;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.modal .modal-header .title {
    margin: 0;
}
.modal .modal-header .btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    cursor: pointer;
    font-size: 1.75em;
    background: none;
}
.modal .modal-body {
    width: 100%;
    padding: 0 15px;
    overflow: auto;
    background: #f5f5f5;
    max-height: 60vh;
}
.modal .modal-body h1, .modal .modal-body h2, .modal .modal-body h3 {
    color: #3c4043;
}
.modal .modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}
.modal .modal-body::-webkit-scrollbar-thumb {
    border-color: #f5f5f5;
}
.modal .modal-footer {
    width: 100%;
    height: 65px;
    background: #ebebeb;
    border-top: 1px solid #dfdfdf;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.modal .modal-footer .btn-close {
    float: right;
    cursor: pointer;
    margin: 8px 15px;
    border: 1px solid #b1b1b1;
    padding: 12.5px 20px;
    background: #f1f1f1;
    font-size: 0.8em;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.modal .modal-footer .btn-close:hover {
    background: white;
}

/* Gridview */
.gridview {
    width: 100%;
    margin: 0 auto;
    padding: 0 calc((100% - var(--max-content-width)) / 2);
    position: relative;
    --description-viewer-height: 200px;
    
    --item-size: 250px;
    --item-spacing: 15px;
    --item-bottom-span: 35px;

    --actual-content-width: 0px;
    --max-content-width: 1400px;

    --rows-per-page: 0;
    
    --desc-anim-d: 0.5s;
    --desc-anim-d-H1: calc(var(--desc-anim-d) * 0.25);
    --desc-anim-d-H2: calc(var(--desc-anim-d) * 0.25);
    --desc-anim-d-H: calc(var(--desc-anim-d-H1) + var(--desc-anim-d-H2));
    --desc-anim-d-W: calc(var(--desc-anim-d) - var(--desc-anim-d-H));
}
.gridview .scroll-wrapper {
    width: 100%;
    overflow-x: hidden;
}
.gridview .pages-wrapper {
    display: flex;
    flex-flow: row nowrap;
}
.gridview .pages-wrapper .page {
    width: var(--actual-content-width);
    padding: 15px 0;
    flex: 0 0 auto;
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    justify-content: center;
}

.gridview-description-viewer {
    z-index: 2;
    top: var(--offset-top);
    left: var(--offset-left);
    width: var(--item-size);
    height: 0;
    max-width: var(--max-content-width);
    overflow: hidden;
    position: absolute;
    background: white;
    border-bottom: 0px solid var(--primary-accent-color);
    --offset-top: 0;
    --offset-left: 0;
}
.gridview-description-viewer .description {
    width: 100%;
    height: 100%;
    opacity: 0;
    padding: 5px 5%;
    font-size: 1.2rem;
    transition: opacity 0.15s cubic-bezier(0.68, 1.16, 0, 1);
}
.gridview-description-viewer .description > h2 {
    margin: 25px 0 0 0;
}
.gridview-description-viewer .description > p {
    display: inline-block;
    width: 90%;
    right: 5%;
    bottom: 0;
    margin: 0 0 50px 0;
    position: absolute;
    text-align: left;
}

.gridview-description-viewer.opened {
    left: calc(50% - var(--actual-content-width) / 2);
    width: calc(var(--actual-content-width));
    height: var(--description-viewer-height);
    box-shadow: 0 15px 10px -7.5px rgba(0,0,0,0.2);
    border-bottom: 3px solid var(--primary-accent-color);
}
.gridview-description-viewer.opened .description {
    opacity: 1;
    transition: opacity 0.15s calc(var(--desc-anim-d) * 0.95) cubic-bezier(0.68, 1.16, 0, 1);
}

.gridview-description-viewer.transitioning {
    transition:
        left       var(--desc-anim-d-W) cubic-bezier(0.55, 0.055, 0.675, 0.19),
        width      var(--desc-anim-d-W) cubic-bezier(0.55, 0.055, 0.675, 0.19),

        height     var(--desc-anim-d-H2) var(--desc-anim-d-W) ease-in,
        border     var(--desc-anim-d-H2) var(--desc-anim-d-W) ease-in-out,
        box-shadow var(--desc-anim-d-H2) var(--desc-anim-d-W) ease-in-out;
}
.gridview-description-viewer.transitioning.opened {
    transition:
        box-shadow var(--desc-anim-d-H2) var(--desc-anim-d-H1) ease-in-out,
        border     var(--desc-anim-d-H2) var(--desc-anim-d-H1) ease-in-out,
        height     var(--desc-anim-d-H2) var(--desc-anim-d-H1) ease-out,

        left       var(--desc-anim-d-W) var(--desc-anim-d-H) cubic-bezier(0.215, 0.610, 0.355, 1),
        width      var(--desc-anim-d-W) var(--desc-anim-d-H) cubic-bezier(0.215, 0.610, 0.355, 1);
}

.gridview-item {
    width: var(--item-size);
    height: var(--item-size);
    margin: var(--item-spacing);
    z-index: 1;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    user-select: none;
    background: white;
    box-shadow: 0 15px 10px -7.5px rgba(0,0,0,0.25);
    transition:
        margin     var(--desc-anim-d-H2) var(--desc-anim-d-W) ease-in,
        height     var(--desc-anim-d-H1) calc(var(--desc-anim-d-W) + var(--desc-anim-d-H2)) ease-in,
        box-shadow var(--desc-anim-d-H1) calc(var(--desc-anim-d-W) + var(--desc-anim-d-H2)) ease-in;

    --bottom-span: var(--item-bottom-span);
}
.gridview-item .title {
    left: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    z-index: 99;
    padding: 25px 0 7.5px 0;
    position: absolute;
    max-height: 100px;
    text-align: center;
    font-weight: bold;
    background: linear-gradient(to top, white 75%, rgba(255,255,255,0));
}
.gridview-item .title::before {
    content: '';
    top: 0;
    left: calc(50% - 5px);
    width: 10px;
    height: 10px;
    border: solid var(--primary-accent-color);
    border-width: 0 4px 4px 0;
    border-radius: 2px;
    position: absolute;
    transform: rotate(45deg);
    transition: top 0.2s, transform 0.2s;
}

.gridview-item .img {
    width: 100%;
    height: 100%;
    display: block;
    transition: filter 0.2s cubic-bezier(0.215, 0.610, 0.355, 1), transform 0.5s cubic-bezier(0.215, 0.610, 0.355, 1);
    -webkit-user-drag: none;
}
.gridview-item .img > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.gridview-item .description {
    display: none;
}

.gridview-item:hover .img {
    transform: scale(1.2);
}
.gridview-item:hover .title::before {
    top: 5px;
}
.gridview-item.opened {
    height: calc(var(--item-size) + var(--bottom-span));
    margin-bottom: calc(var(--description-viewer-height) + var(--bottom-span) - 15px);
    box-shadow: none;
    transition:
        height     var(--desc-anim-d-H1) ease-out,
        box-shadow var(--desc-anim-d-H1) ease-out,
        margin     var(--desc-anim-d-H2) var(--desc-anim-d-H1) ease-out;
}
.gridview-item.opened .title::before {
    transform: rotate(225deg);
}

.gridview-item.next-page, .gridview-item.prev-page  {
    color: black;
    border: 2.5px solid black;
    text-align: center;
    background: white;
}
.gridview-item.next-page p, .gridview-item.prev-page p {
    margin: 0;
    font-size: 1.2em;
    line-height: calc(var(--item-size) - 5px);
}
.gridview-item.next-page p i, .gridview-item.prev-page p i {
    top: 1px;
    left: 2px;
    position: relative;
}

/* Animations */
@keyframes modalTransition {
    from {
        width: 65vw;
    }
    to {
        width: 98vw;
    }
}
@keyframes modalTransitionReverse {
    from {
        width: 98vw;
    }
    to {
        width: 65vw;
    }
}

@media screen and (max-width: 1100px) {
    .modal {
        animation: modalTransition 0.25s both;
    }
}
@media screen and (max-width: 768px) {
    .modal .modal-header {
        font-size: 0.8em;
    }
}