* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    background-color: #FAFAFA;
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.main {
    background-image: url('images/main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    flex-direction: column;
    color: white;
}

body.main a {
    color: white;
    font-size: 3em;
    font-weight: 700;
    margin: 10px;
    text-decoration: none;
}

.wrapper {
    display: grid;
    gap: 20px;
    grid-template-areas:
        "header"
        "title"
        "content"
        "footer";
}

.header {
    grid-area: header;
    height: 7rem;
    align-items: center;
    display: flex;
    padding: 20px;
}

body.main .header {
    position: absolute;
    left: 0;
    top: 15px;
}

.header a img {
    height: 80px;
}

.footer {
    grid-area: footer;
    padding: 30px;
    text-align: right;
    padding-top: 0;
}

.title {
    grid-area: title;
    display: flex;
    justify-content: center;
    margin-top: 4rem;
    flex-direction: column;
    align-items: center;
}

.content {
    grid-area: content;
}

.gallery {
    border-top: 1px solid hsla(0, 0%, 29.01960784%, 1);
    border-bottom: 1px solid hsla(0, 0%, 29.01960784%, 1);
    margin: 30px;
    padding-top: 20px;
    padding-bottom: 30px;
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr 1fr;
    row-gap: 40px;
}

.gallery img,
.gallery video {
    max-width: 100%;
    width: 100%;
    height: auto;
}

.gallery>div {
    display: flex;
    justify-content: baseline;
    flex-direction: column;
    align-items: center;
    color: hsla(0, 0%, 29.01960784%, 1);
}

.gallery-title {
    padding-top: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: auto;
}

.header-right {
    margin-left: auto;
}

.header a {
    font-weight: 600;
    margin: 20px;
    text-decoration: none;
}

.header a.active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.view-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    font-weight: 600;
    color: hsla(0, 0%, 29.01960784%, 1);
    padding-bottom: 2rem;
}

.view-subtitle {
    font-size: 1rem;
    max-width: 60vw;
    text-align: center;
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    max-height: 999999px;
}

.about {
    margin-left: 20px;

    margin-top: 100px;
    display: flex;
    flex-direction: row;
    align-content: space-between;
}

a {
    color: hsla(0, 0%, 29.01960784%, 1);
    text-decoration: underline;
    text-decoration-color: hsla(0, 0%, 29.01960784%, 1);
}

.about .left {
    flex-basis: 55%;
    margin: 30px;
}

.about .right {
    flex-basis: 45%;
    margin: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid hsla(0, 0%, 29.01960784%, 1);
}

.contact {
    margin-top: 60px;
}

.contact .left {
    flex-basis: 25%;
}

.contact .right {
    flex-basis: 75%;
}

.about p {
    padding-bottom: 10px;
}

.about .left .svg {
    padding-left: 5px;
}

a.svg {
    position: relative;
    display: inline-block;
}

a.svg:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.contact textarea {
    width: 100%;
    resize: none;
    padding: 12px 20px;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-size: 16px;
    resize: none;
}


.button {
    background-color: hsla(0, 0%, 29.01960784%, 1);
    border-radius: 8px;
    border-style: none;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    line-height: 20px;
    list-style: none;
    margin: 0;
    outline: none;
    padding: 10px 16px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: color 100ms;
    vertical-align: baseline;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.button:hover,
.button:focus {
    background-color: hsla(0, 0%, 29.01960784%, 0.7);
}

.to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    outline: none;
    cursor: pointer;
    padding: 15px 17px 15px 17px;
    font-size: 18px;

    background: rgba(108, 122, 137, 0.5);
    border: 1px solid #fff;
    border-radius: 8px;
    color: #fff;
    transition: all 0.3s ease-out;
}

@media(hover: hover) {
    .to-top:hover {
        background: #fff;
        color: #000;
        transition: all 0.5s ease-in;
    }

    .to-top:hover svg {
        fill: #000;
    }
}

@media screen and (max-width: 767px) {
    .about {
        flex-direction: column;
    }

    .about .left,
    .about .right {
        flex-basis: 100%;
    }

    .header {
        height: auto;
        flex-direction: column;
    }

    .header-right {
        text-align: center;
    }

    .title .view-title,
    .title .view-subtitle {
        text-align: center;
    }

    .title .view-subtitle {
        max-width: 90vw;
    }

    .main a {
        text-align: center;
    }

    .gallery>div {
        text-align: center;
    }
}

@media screen and (max-width: 1024px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}