@import 'constants.css';

html {
    width: 100vw;
    overflow-x: hidden;
    position: relative;
    min-height: 100%;
}

h1 {
    font-size: 2rem;
    color: var(--clr-navy-hue-4);
    padding: 20px;
    line-height: 1em;
}

h3 {
    font-size: 1.5rem;
    color: var(--clr-navy-hue-2);
}


/* Navigation */

.hamburger-menu {
    display: none;
}

.header {
    background-color: var(--clr-navy-hue-7);
    color: var(--clr-white-hue-3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-container > * {
    padding: 30px 15px;
}


.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    position: relative;
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
}

.brand-icon {
    position: absolute;
    left: -40%;
    top: 13%;
    max-height: 65px;
}

.brand-name {
    display: flex;
    font: 24px "Montserrat", sans-serif;
    font-weight: 300;
    text-transform: uppercase;
}

.header-content {
    display: flex;
    position: relative;
}

.navbar-nav {
    display: flex;
    color: var(--clr-white-hue-3);
    font-size: 1.3em;
}

.navbar-nav > li,
.navbar-nav > li > a,
.login-btn,
.reg-btn {
    transition: 0.1s ease;
}

.navbar-nav > li:hover,
.navbar-nav > li > a:focus {
    color: var(--clr-white-hue-0);
}

.navbar-nav > * + * {
    margin-left: 1.5em;
}

.login {
    margin-left: 2.5em;
    font-size: 1.3em;
}

.login-btn {
    border-color: var(--clr-gray-hue-1);
    color: var(--clr-white-hue-2);
    margin-left: 0.5em;
}

.login-btn:hover,
.login-btn:focus,
.dropdown__button:hover,
.dropdown__button:focus,
.dropdown__button:active {
    border-color: var(--clr-white-hue-2);
}

a.reg-btn {
    color: var(--clr-navy-hue-1);
    border-color: var(--clr-navy-hue-3);
}

.reg-btn:hover,
.reg-btn:focus {
    border-color: var(--clr-navy-hue-1);
}

.btn {
    padding: 0.5em 0.8em;
    border-width: 1px;
    border-style: solid;
    border-radius: 1.5em;
}

/* Languages */

.translate {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 100%;
    user-select: none;
}

.dropdown__wrapper {
    position: relative;
}

.dropdown__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: large;
    color: var(--clr-white-hue-3);
    border: none;
    transition: 0.1s ease;
}

.dropdown__button:active {
    transform: scale(0.97);
}

.dropdown__lang-list {
    display: none;
    position: absolute;
    top: 100%;
    background-color: var(--clr-gray-hue-2);
    width: 100%;
    border-radius: var(--br-4);
    margin-top: 1em;
    overflow: hidden;
    z-index: 1000;
}

.dropdown__lang-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7em 1em;
    border-bottom: 1px solid var(--clr-navy-hue-7);
}

.dropdown__lang-item:hover {
    background-color: var(--clr-navy-hue-7);
    cursor: pointer;
}

.active-lang{
    background-color: var(--clr-navy-hue-7);
}

.active-lang:hover {
    cursor: default;
}

.flag {
    width: 1.5em;
    height: 1.5em;
    font-size: 18px;
}

.flag-ru {
    background: url("https://static.voidcdn.net/images/flags/countries/svg/4x3/ru.svg") center no-repeat;
}

.flag-en {
    background: url("https://static.voidcdn.net/images/flags/countries/svg/4x3/gb.svg") center no-repeat;
    padding-inline: 1px;
}

.flag-de {
    background: url("https://static.voidcdn.net/images/flags/countries/svg/4x3/de.svg") center no-repeat;
}

.lang {
    padding-left: 0.5em;
    font-size: 16px;
}

.lang-ru {
    margin-top: -2px;
}

.visible {
    display: block;
}

/* Projects Section */

.projects {
    margin-bottom: 30px;
}

.projects-heading {
    margin: 40px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--clr-light-blue-hue);
}

.projects-list {
    display: flex;
}

.project-item:nth-child(2) {
    padding-inline: 30px;
}

.project-item-heading {
    margin: 20px 0 10px 0;
}

.project-item-header:hover {
    color: var(--clr-navy-hue-4);
}

.project-item > p {
    margin-bottom: 10px;
    line-height: 1.5em;
}

.project-item-list {
    padding-left: 25px;
    margin-bottom: 10px;
    list-style: disc inside;
    line-height: 1.5em;
}

a.more-btn {
    color: var(--clr-navy-hue-2);
}

a.more-btn:hover {
    color: var(--clr-navy-hue-4);
}

/* service cards row */

.service-container {
    position: relative;
    display: flex;
    padding-block: 50px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.service-container::before {
    content: "";
    position: absolute;
    top: 0;
    width: 85%;
    left: 15%;
    height: 1px;
    background-color: var(--clr-light-blue-hue);
}

.service-container:nth-child(odd) {
    flex-direction: row;
}

.service-container:nth-child(even) {
    flex-direction: row-reverse;
}

.service-content {
    max-width: 500px;
    margin: 0 50px;
}

.service-content > h3 {
    margin-bottom: 30px;
}

.service-content > ul {
    list-style: disc inside;
}

.service-content > ul > li {
    font-size: 16px;
}

.service-img-container {
    max-width: 350px;
    height: auto;
    margin: 0 50px;
}

.service-img {
    display: flex;
}


/* Footer*/

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--clr-navy-hue-7);
    color: var(--clr-white-hue-4);
}

.footer-content {
    padding-block: 1em;
    display: flex;
    align-items: center;
}

.footer-content > div:first-child {
    display: flex;
    flex-grow: 1;
}

.footer-brand {
    margin-right: 3em;
    color: var(--clr-gray-hue-3);
}

.footer-links {
    display: flex;
}

.footer-links > a + a {
    margin-left: 2em;
}

.footer-socials {
    display: flex;
    align-self: end;
}

.footer-social-link {
    padding: 7px;
    border: 2px solid var(--clr-gray-hue-3);
    border-radius: 50%;
    width: 2.5em;
}

.footer-socials-icon {
    display: flex;
}

.footer-socials a + a {
    margin-left: 1em;
}

/*~~~~~ ADAPTIVE ~~~~~~*/

@media (max-width: 1340px) {

    /* Header */

    .header-container > * {
        padding: 12px 15px;
    }

    .brand > a {
        display: flex;
        align-items: center;
    }

    .brand-icon {
        position: relative;
        top: initial;
        left: initial;
    }

    .brand-name {
        margin-left: 1rem;
    }

    .header-content {
        align-items: center;
        padding-inline: 0;
    }

    .translate {
        position: relative;
        top: initial;
        left: initial;
        transform: initial;
    }

    .login {
        margin-left: 1.5em;
        font-size: large;
    }

}

@media (max-width: 1000px) {

    /* nav-bar */
    .brand-icon {
        max-height: 55px;
    }

    .brand-name {
        font-size: 20px;
    }

    .navbar-nav {
        font-size: 1.2em;
    }

    .navbar-nav > * + * {
        margin-left: 1.1em;
    }

    .login {
        margin-left: 1.2em;
        font-size: 1.2em;
    }

    .footer-links a + a {
        margin-left: 1em;
    }
}

@media (max-width: 880px) {

    main {
        padding-bottom: 109px;
    }

    .header-nav, .login {
        display: none;
    }

    .translate {
        margin-right: 5em;
    }

    /* Hamburger menu */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 1000;
    }

    #menu__toggle {
        opacity: 0;
    }

    #menu__toggle:checked ~ .menu__btn > span {
        transform: rotate(45deg);
    }

    #menu__toggle:checked ~ .menu__btn > span::before {
        top: 0;
        transform: rotate(0);
    }

    #menu__toggle:checked ~ .menu__btn > span::after {
        top: 0;
        transform: rotate(90deg);
    }

    #menu__toggle:checked ~ .menu__box {
        visibility: visible;
        left: 0;
    }

    .menu__btn {
        display: flex;
        align-items: center;
        position: absolute;
        top: 100%;
        right: 100%;
        transform: translateX(-100%);
        width: 26px;
        height: 26px;
        cursor: pointer;
        z-index: 2002;
    }

    .menu__btn > span,
    .menu__btn > span::before,
    .menu__btn > span::after {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition-duration: .25s;
    }

    .menu__btn > span::before {
        content: '';
        top: -8px;
    }

    .menu__btn > span::after {
        content: '';
        top: 8px;
    }

    .menu__box {
        display: block;
        position: fixed;
        visibility: hidden;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        margin: 0;
        z-index: 1001;
        padding: 80px 0;
        list-style: none;
        background-color: var(--clr-navy-hue-2);
        box-shadow: 1px 0 6px rgba(0, 0, 0, .2);
        transition-duration: .25s;
    }

    .menu__item {
        display: block;
        padding: 12px 24px;
        font-size: 18px;
        font-weight: 400;
        text-decoration: none;
        transition-duration: .25s;
        color: var(--clr-white-hue-1);
    }

    .menu__item:hover {
        background-color: var(--clr-navy-hue-3);
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
    }

    .footer-links a + a {
        margin-left: 0;
    }
}

@media (max-width: 700px) {

    main {
        padding-bottom: 164px;
    }

    .footer-content > div:first-child {
        flex-direction: column-reverse;
    }

    .footer-brand {
        margin-top: 2em;
    }

    .footer-socials {
        margin-top: 1.5em;
        align-self: flex-start;
    }
}


@media (max-width: 520px) {

    main {
        padding-bottom: 220px;
    }

    .header-container > * {
        padding: 10px 0px;
    }

    .brand-icon {
        max-height: 45px;
    }

    .brand-name {
        font-size: 18px;
        margin-left: 0.6rem;
    }

    .translate {
        margin-right: 2.5em;
    }

    .dropdown__lang-item {
        padding: 0.5em;
    }

    .lang {
        padding-left: 0.5em;
        font-size: 14px;
    }

    .dropdown__button {
        font-size: 12px;
    }

    .menu__btn {
        right: 0px;
        top: 80%;
        width: 23px;
        height: 1.5em;
    }

    .footer-content {
        flex-direction: column-reverse;
    }

    .footer-content > div:first-child {
        align-self: baseline;
    }

    .footer-socials {
        margin-bottom: 1.5em;
        margin-top: 0;
        align-self: flex-start;
    }

}
