/* General */
* {
    font-family: 'Nunito', sans-serif;
    font-display: swap;
}
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
.line {
    position: absolute;
    right: 7rem;
    width: 3px;
    height: 80px;
}

/* Header */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #3858e9;
    padding: 12px 15px;
}
nav .mobile-menu {
    display: none;
    z-index: 10;
}
nav .burger .line1,
nav .burger .line2,
nav .burger .line3 {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: all 250ms ease-in-out;
}
nav .burger.active .line1 {
    transform: rotate(-45deg) translate(-5px, 5px);
}
nav .burger.active .line2 {
    opacity: 0;
}
nav .burger.active .line3 {
    transform: rotate(45deg) translate(-5px, -5px);
}
nav .burger {
    cursor: pointer;
}

nav .menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
}
nav .menu li {
    list-style: none;
    margin: 0 12px;
    font-weight: 600;
}
nav .menu li:hover:after {
    transform: scaleX(1);
}
nav .menu li:after {
    display: block;
    content: '';
    border-bottom: solid 2px white;
    transform: scaleX(0);
    transition: transform 250ms ease-in-out;
    transform-origin: 0% 50%;
}
nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}
nav .logo {
    z-index: 10;
}
nav .logo a {
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Hero */
section.hero {
    background-color: #3858e9;
    position: relative;
}
.hero-content,
.hero-bg {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.hero-content {
    background-image: url('../images/header.webp');
    background-size: cover;
    background-position: center 0px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: calc(100vh - 200px);
    min-height: 650px;
    max-height: 1250px;
    width: calc(100% - 25px);
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0;
    position: relative;
}
.hero-bg {
    background-color: #101323;
    opacity: .6;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.hero-inner {
    z-index: 2;
    padding: 20px;
}
.hero-inner h1 {
    font-size: 2.8rem;
    font-weight: bold;
    margin: 0;
    width: 100%;
    max-width: 800px;
}
.hero-inner p {
    font-size: 1.2rem;
    margin: 20px 0;
    width: 100%;
    max-width: 800px;
}
.hero-button a {
    display: inline-block;
    background-color: #3858e9;
    color: white;
    padding: 14px 28px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    font-size: .8rem;
    transition: background-color 200ms ease-in-out;
    border-radius: 5px;
}
.hero-button a:hover {
    background-color: #33f078;
}
.hero-line {
    background-color:#33f078;
    bottom: 0;
}
.hero-line a.scroll-down {
    position: absolute;
    top: -7px;
    right: 7px;
    margin: 0;
    display: flex;
    text-decoration: none;
}
.hero-line svg {
    padding-bottom: 2px;
}
.hero-line a.scroll-down span {
    transition: color 200ms ease-in-out;
}
.hero-line a.scroll-down:hover span {
    color: #33f078;
}
.hero-line span {
    color: white;
    display: inline-block;
    margin: 0 5px;
    margin-left: 10px;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Services */
section.services {
    width: 100%;
    padding: 130px 0 100px 0;
    position: relative;
}
.services-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    max-width: 1080px;
    margin: auto;
    padding: 20px;
}
.services-heading p {
    font-size: 1rem;
    margin: 0;
    color: #3858e9;
    font-weight: 900;
}
.service-container {
    display: flex;
}
.services-content .service {
    padding: 20px 0;
    max-width: 47%;
    width: 100%;
}
.service h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 10px;
}
.service p {
    font-size: 1rem;
    margin: 0;
    color: #333;
}
.services-line {
    background-color: #3858e9;
    top: 0;
}
.service .icon-container {
    margin-right: 20px;
}

/* About us */
section.about-us {
    background-color: #3858e9;
    color: white;
    padding: 100px 0;
}
.about-us-text {
    max-width: 960px;
    margin: auto;
    padding: 20px;
    text-align: center;
    font-size: 1.1rem;
}
.about-us-content {
    z-index: 2;
    position: relative;
}
.services-heading,
.about-us-heading,
.contact-heading,
.references-heading {
    padding-bottom: 20px;
    border-bottom: 1px solid white;
    max-width: 1080px;
    margin: auto;
    text-align: center;
}
.about-us-heading p {
    color: white;
    font-weight: 900;
}

/* References */
section.references {
    padding: 100px 0;
}
.references-heading {
    padding-bottom: 0;
}
.references-heading p {
    color: #3858e9;
    font-weight: 900;
}
.references-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    max-width: 1350px;
    margin: auto;
    padding: 20px;
    padding-top: 0;
}
.ref {
    padding: 20px;
    max-width: calc(50% - 50px);
    width: 100%;
    margin-top: 40px;
}
.ref-header {
    display: flex;
    justify-content: start;
    align-items: center;
    margin-bottom: 10px;
}
.ref-header p {
    font-size: 1.28rem;
    margin: 0;
    font-weight: 700;
}
.ref-content {
    position: relative;
    border-radius: 5px;
    padding: 10px 10px 5px 10px;
}
.addservice .ref-content {
    border: 1px solid #1e2938;
}
.viinarannasta .ref-content,
.superalko-latvia .ref-content {
    border: 1px solid #f05f0f;
}
.cityalko .ref-content {
    border: 1px solid #95005c;
}
.loodushoiu-fond .ref-content,
.maaomanikule .ref-content {
    border: 1px solid #325A5E;
}
.looduse-hoidja .ref-content {
    border: 1px solid #1e709b;
}
.logopuu .ref-content {
    border: 1px solid #cae9d5;
}
.scillo .ref-content {
    border: 1px solid #2561f3;
}
.muusikalaagrid .ref-content {
    border: 1px solid #7cc89c;
}
.epo .ref-content {
    border: 1px solid #0001f6;
}

.ref-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    max-height: 320px;
}
.ref-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: .25s ease-in-out;
    border-radius: 3px;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0);
}
.ref-content:hover .ref-overlay {
    visibility: visible;
    background-color: rgba(0, 0, 0, .6);
}
.ref-content:hover .overlay-inner {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%);
}
.overlay-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    text-align: center;
    width: 100%;
    transition: .25s ease-in-out;
    visibility: hidden;
    opacity: 0;
    color: white;
    font-size: 1.42rem;
    font-weight: 700;
    text-transform: uppercase;
}
.ref-link,
.ref-gallery {
    margin: 0;
    text-decoration: none;
    color: white;
    display: inline-block;
    transition: color 200ms ease-in-out;
}
/* .ref-link {
    margin-bottom: 24px;
} */
.ref-link:hover,
.ref-gallery:hover,
.ref-link:hover svg,
.ref-gallery:hover svg {
    color: #33f078;
    fill: #33f078;
}
.ref-link svg,
.ref-gallery svg {
    transition: fill 200ms ease-in-out;
    margin-left: 10px;
}

/* Contact */
section.contact {
    color: white;
    padding: 100px 0;
    width: 100%;
    background-color: #151515;
    background-image: url('../images/contact-bg.webp');
    background-size: cover;
    background-position: center 0px;
    background-repeat: no-repeat;
    position: relative;
}
.contact-heading p {
    color: #33f078;
    font-weight: 900;
}
.contact-heading h2 {
    color: white;
}
.contact-heading {
    border-bottom: 1px solid #33f078;
}
.contact-overlay {
    background-color: #151515;
    opacity: .8;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.contact-content {
    position: relative;
    z-index: 2;
}
.contact-form {
    max-width: 640px;
    margin: auto;
    padding: 16px;
    margin-top: 50px;
}
.contact-form .form-group {
    margin-bottom: 20px;
 }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    color: white;
    outline: none;
    font-size: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
}
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:focus {
    transition: background-color 0s 0s, color 0s 0s;
    transition-delay: calc(infinity * 1s);
}
.contact-form input[data-autocompleted] {
    background-color: transparent !important;
}
.contact-form #message {
    max-height: 320px;
    resize: vertical;
    min-height: 200px;
}
.contact-form .submit {
    margin-top: 50px;
}
.contact-form .submit button {
    width: 100%;
    padding: 20px;
    background-color: #39b54a;
    color: white;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 3px;
    border: none;
    cursor: pointer;
    transition: background-color 200ms ease-in-out;
    border-radius: 5px;
}
.contact-form .submit button:hover {
    background-color: #33f078;
}
.contact-form .title {
    margin: 0 0 30px 0;
    font-size: 1rem;
    font-weight: 700;
}
.contact-form .form-group {
    position: relative;
} 

.contact-form .form-group label:after {
    content: '';
    transform: scaleX(0);
    transition: transform 250ms ease-in-out;
    transform-origin: 0% 50%;
    border-bottom: 2px solid #33f078;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.contact-form .form-group input:focus + label:after,
.contact-form .form-group input:valid + label:after,
.contact-form .form-group textarea:focus + label:after,
.contact-form .form-group textarea:valid + label:after {
    transform: scaleX(1);
}
.contact-form label span {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    font-size: 1rem;
    position: absolute;
    bottom: 10px;
    left: 0;
    transition: .25s ease-in-out;
    cursor: text;
}
.contact-form label#message span {
    top: 10px;
}
.contact-form label#message:after {
    bottom: 5px;
}
.contact-form .form-group input:focus + label span,
.contact-form .form-group input:valid + label span,
.contact-form .form-group textarea:focus + label span,
.contact-form .form-group textarea:valid + label span {
    transform: translateY(-150%);
    font-size: .8rem;
    color: #33f078;
}
.contact-form .form-group textarea:focus + label span,
.contact-form .form-group textarea:valid + label span {
    transform: translateY(-20px);
}

.contact-form .form-group input.error + label span,
.contact-form .form-group input.error:focus + label span,
.contact-form .form-group input.error:valid + label span,
.contact-form .form-group textarea.error + label span,
.contact-form .form-group textarea.error:focus + label span,
.contact-form .form-group textarea.error:valid + label span {
    color: red !important;
}
.contact-form .form-group input.error,
.contact-form .form-group input.error:focus + label:after,
.contact-form .form-group input.error:valid + label:after,
.contact-form .form-group input.error + label:after,
.contact-form .form-group textarea.error,
.contact-form .form-group textarea.error:focus + label:after,
.contact-form .form-group textarea.error:valid + label:after,
.contact-form .form-group textarea.error + label:after {
    border-bottom: 2px solid red !important;
}
.form-result {
    margin-top: 10px;
    font-size: 1.12rem;
}

/* Footer */
footer {
    background-color: #111;
    color: rgba(255, 255, 255, 0.8);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 100px 40px;
    max-width: 1080px;
    margin: auto;
}
footer .left p {
    line-height: 26px;
}
footer .right p {
    margin-top: 0;
    margin-bottom: 7px;
}
footer .left,
footer .right {
    width: 50%;
}
footer .right {
    text-align: right;
}
footer .right a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}
.copyright {
    max-width: 1080px;
    margin: auto;
    text-align: center;
    padding-bottom: 5px;
}
.copyright p {
    margin: 0 auto;
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Sidebar & Mobile menu */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 140px;
    height: 100%;
    background-color: #3858e9;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: translateX(-100%);
    transition: transform 250ms ease-in-out;
    z-index: 5;
}
.sidebar.active {
    transform: translateX(0);
    display: none;
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    z-index: 3;
    transition: .25s ease-in-out;
    visibility: hidden;
    opacity: 0;
}
.sidebar-overlay.active {
    visibility: visible;
    opacity: 1;
}
.sidebar-content a {
    color: white;
    text-decoration: none;
}
.sidebar-content .logo {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 700
}
.sidebar-menu {
    padding: 0;
    margin-top: 60px;
    padding-left: 8px;
}
.sidebar-menu li {
    list-style: none;
    margin: 10px auto;
    padding-bottom: 10px;
    border-bottom: 1px solid #5b74e2;
}
.sidebar-menu li:last-child {
    border-bottom: none;
}
.sidebar-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    margin: 10px 0;
    font-weight: 600;
}

@media only screen and (max-width: 1024px) {
    .references-content {
        display: block;
        text-align: center;
    }
    .ref {
        max-width: 600px;
        padding: 0;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}
@media only screen and (max-width: 961px) {
    .line {
        right: 4.2rem;
    }
    .services-content {
        display: block;
        align-items: center;
    }
    .service-container {
        display: block;
        text-align: center;
    }
    .services-content .service {
        max-width: 620px !important;
        margin: 20px auto;
    }
    .service h2 {
        margin: 12px 0 12px 0;
    }
    .service .icon-container {
        margin-right: 0;
    }
    .hero-content {
        background-attachment: scroll;
    }
}
@media only screen and (max-width: 768px) {
    .hero-inner h1 {
        font-size: 2.4rem;
    }
    footer .footer-content {
        display: block;
        text-align: center;
        padding: 80px 20px;
    }
    footer .left,
    footer .right {
        width: 100%;
    }
    footer .right {
        text-align: center;
        margin-top: 60px;
    }
}
@media only screen and (max-width: 640px) {
    .line {
        position: absolute;
        right: 2.5rem;
        height: 60px;
    }
    nav .menu {
        display: none;
    }
    nav .logo a svg {
        width: 160px;
    }
    nav .mobile-menu {
        display: block;
        cursor: pointer;
    }
    .sidebar.active {
        display: block;
    }
    .hero-inner {
        padding: 10px;
    }
    .hero-inner h1 {
        font-size: 2rem;
    }
    .hero-inner p {
        font-size: .94rem;
    }
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 5;
    }
    nav {
        padding: 8px 15px;
    }
    .ref-content {
        padding: 10px;
    }
}