* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Onest", sans-serif;
    background-image: url(../img/balpe-shade.png);
    background-size: cover;
}

h1 {
    height: auto;
    padding: 0;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    font-family: "Inder", sans-serif;
    text-transform: uppercase;
}

h1 span {
    font-size: .6em;
    margin-bottom: 4px;
    font-weight: normal;
    font-family: "Onest", sans-serif !important;
    text-transform: none;
    display: block;
}

h4 {
    font-weight: 600;
    margin-bottom: 16px;
    margin-top: 32px;
}

button {
    background-color: transparent;
    padding: 0;
    outline: none;
    border: none;
}

a.open-node {
    font-weight: bold;
    cursor: pointer;
}

span.open-node {
    font-weight: bold;
    cursor: pointer;
    display: block;
    white-space: nowrap;
}

span.open-node::after {
    content: '';
    background-image: url(../img/right-up-arrow.svg);
    background-size: contain;
    background-position: center;
    width: .8em;
    height: .8em;
    display: inline-block;
    margin-left: 2px;
    transition: .3s;
}

span.open-node:hover::after {
    transform: translate(1px, -2px);
}

h2 {
    font-size: 2em;
    font-weight: bold;
}

h3 {
    font-size: 1.6em;
    line-height: 1.2;
}

h2,
h3 {
    margin-bottom: 16px;
}

p {
    margin-bottom: 16px;
    line-height: 1.36;
}

p:last-of-type {
    margin-bottom: 0;
}

ul {
    margin-bottom: 16px;
}

ul li {
    margin-top: 16px;
}

em {
    font-style: italic;
}

strong {
    font-weight: 600;
}

#mindmap {
    display: block;
    width: 100%;
    height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    cursor: -webkit-grab;
    cursor: grab;
}

#mindmap:active {
    cursor: -webkit-grabbing;
    cursor: grabbing;
}

.markmap-foreign {
    cursor: default;
}

.content-modal,
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .6);
    backdrop-filter: blur(3px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
    z-index: 1000;
}

.content-modal::after,
.modal::after {
    content: '';
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: -1;
}

.content-modal>section {
    background-color: white;
    color: black;
    width: 90%;
    max-width: 1200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 8px;
    position: relative;
    padding: 24px;
    max-height: 96vh;
}

.content-modal>section ul {
    list-style-type: disc;
    line-height: 1.36;
    margin-left: 20px;
}

.content-modal.with-media>section {
    width: 90%;
    max-width: none;
    max-height: 90vh;
    flex-direction: row;
}

.content-modal.with-media section>article {
    margin-right: 0;
    height: 100%;
}

.content-modal.with-media section>article div>a {
    display: block;
}

.content-modal.content-modal.with-media iframe:nth-of-type(2) {
    grid-column: 2;
}

.content-modal section a {
    font-weight: 600;
    margin-top: 16px;
}

.content-modal section aside {
    background-color: #f0f0f0;
    padding: 24px;
    margin-top: 32px;
}

.content-modal section aside p:nth-of-type(1) {
    text-transform: uppercase;
    font-weight: 600;
    font-size: .9em;
    letter-spacing: 1px;
}

.modal>section {
    background-color: white;
    color: black;
    border-radius: 8px;
    max-height: 90%;
    width: 90%;
    max-width: 1200px;
    position: relative;
    padding: 4%;
    overflow: auto;
}

.portrait {
    float: right;
    width: 60%;
    margin-left: 24px;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.mindmap-graphic {
    width: 100%;
}

.close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 27px;
    height: 27px;
    cursor: pointer;
    color: white;
}

.close img {
    width: 100%;
}

iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

iframe.retro-ratio {
    aspect-ratio: 4 / 3;
}

section.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

section.grid .description {
    padding-right: 0;
}

section.gallery-grid {
    grid-row: 2;
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: min-content;
    flex-direction: row;
    gap: 16px;
    padding: 0;
    max-width: auto;
}

section.gallery-grid a {
    margin: 0;
}

.lb-data .lb-caption a {
    color: white !important;
}

section.gallery-grid a img {
    border: 1px solid #e2e2e2;
}

section.gallery-grid.one-col {
    grid-template-columns: 1fr;
}

section.gallery-grid.two-col {
    grid-template-columns: 1fr;
}

section.gallery-grid.three-col {
    grid-template-columns: 1fr;
}

section.gallery-grid img {
    width: 100%;
}

@media screen and (min-width: 1024px) {
    .content-modal>section {
        padding: 48px;
    }

    .content-modal.with-media section>article {
        margin-right: 48px;
        height: 100%;
    }

    section.grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    section.grid .description {
        padding-right: 48px;
    }

    section.gallery-grid.one-col {
        grid-template-columns: 1fr;
    }

    section.gallery-grid.two-col {
        grid-template-columns: repeat(2, 1fr);
    }

    section.gallery-grid.three-col {
        grid-template-columns: repeat(3, 1fr);
    }
}

header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 24px 48px;
    position: fixed;
    top: 0;
    left: 0;
    gap: 48px;
    backdrop-filter: blur(4px);
}

header nav {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 48px;
    align-items: center;
    width: 100%;
}

nav a {
    cursor: pointer;
    position: relative;
    transition: all .3s;
}

nav a::after {
    position: absolute;
    bottom: -6px;
    left: 0;
    content: '';
    width: 0%;
    height: 2px;
    background-color: #428C77;
    opacity: 0;
    transition: all .3s;
}

nav a:hover::after {
    position: absolute;
    bottom: -6px;
    left: 0;
    content: '';
    width: 100%;
    height: 2px;
    background-color: #428C77;
    opacity: 1;
}

header nav div:nth-of-type(1) {
    text-align: left;
    gap: 48px;
}

header nav div:nth-of-type(2),
header nav div:nth-of-type(3) {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

header a {
    position: relative;
    margin-bottom: 48px;
    margin-right: 48px;
}

header a:last-of-type {
    margin-right: 0;
    margin-bottom: 0;
}

header nav div:nth-of-type(3) a {
    margin-bottom: 0;
}

.ratio-4-3 {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 3 / 4 = 0.75 */
  height: 0;
  overflow: hidden;
}

.ratio-4-3 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ratio-16-9 {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 9 / 16 = 0.5625 */
  height: 0;
  overflow: hidden;
}

.ratio-16-9 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

header a.current::after {
    position: absolute;
    bottom: -6px;
    left: 0;
    content: '';
    width: 100%;
    height: 2px;
    background-color: #428C77;
    opacity: 1;
}

header #mobile-menu {
    width: 40px;
    position: relative;
    z-index: 998;
    cursor: pointer;
}

header #mobile-menu img,
header #mobile-menu svg {
    width: 40px;
}

.row .three {
    padding: 80px 30px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background-color: #2c3e50;
    color: black;
    text-align: center;
}

.hamburger .line {
    width: 40px;
    height: 4px;
    background-color: black;
    display: block;
    margin: 8px auto;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    border-radius: 100px;
}

.hamburger:hover {
    cursor: pointer;
}

#hamburger-3.is-active .line:nth-child(1),
#hamburger-3.is-active .line:nth-child(3) {
    width: 40px;
}

#hamburger-3.is-active .line:nth-child(1) {
    -webkit-transform: translateX(-11px) rotate(-45deg);
    -ms-transform: translateX(-11px) rotate(-45deg);
    -o-transform: translateX(-11px) rotate(-45deg);
    transform: translateX(-11px) rotate(-45deg);
}

#hamburger-3.is-active .line:nth-child(3) {
    -webkit-transform: translateX(-11px) rotate(45deg);
    -ms-transform: translateX(-11px) rotate(45deg);
    -o-transform: translateX(-11px) rotate(45deg);
    transform: translateX(-11px) rotate(45deg);
}

header #primary-nav {
    position: absolute;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding: 12%;
    font-size: 1.2em;
    text-align: left;
    z-index: 997;
    transition: ease-out .6s;
}

header #primary-nav.open {
    left: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

a span {
    display: inline-block;
    transition: .3s;
}

a:hover span {
    transform: translateX(4px);
}

a span img {
    height: .9em;
}


/* width */
::-webkit-scrollbar {
    width: 4px;
}

/* Track */
::-webkit-scrollbar-track {
    background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 100px;
}

@media screen and (min-width: 1024px) {
    #mobile-menu {
        display: none;
    }

    header #primary-nav {
        position: relative;
        top: 0;
        left: auto;
        height: auto;
        width: auto;
        background-color: transparent;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        flex-direction: row;
        padding: 0;
        font-size: initial;
    }

    header nav div:nth-of-type(3) {
        flex: initial;
    }

    header a {
        position: relative;
        margin-right: 48px;
        margin-bottom: 0;
    }

    header a:last-of-type {
        margin-right: 0;
        margin-bottom: 0;
    }
}