.contactform {
    display: flex;
    justify-content: center;
    margin-top: 2em;
    margin-bottom: 8em;
}

.contactbox {
    display: flex;
    flex-direction: column;
    background: rgba(5, 32, 79, 0.7);
    width: 70vw;
}

.contactinner {
    padding: 0 7em 1.5em;
}

.contactinner h1 {
    font-family: 'BebasN';
    font-size: 3.5em;
    color: #ffffff;
    letter-spacing: 5px;
    margin-top: 0.5em;
}

.inputscontact {
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1em;
}

.singleinputcontact {
    display: flex;
    width: 24%;
}

.inputscontact div label {
    width: 100%;
}

.wrapcontact {
    width: 24%;
    margin: 0;
}

.wrapcontact:last-of-type {
    width: 49%;
}

.inputtitle {
    margin: 0;
    margin-bottom: 0.2em;
    font-family: 'Dinnex-R';
    color: #ffffff;
}

.errormesagecontact,
.errorselectcontact,
.errorcomment {
    margin: 0;
    color: #db2311;
    font-family: 'Dinnex-R';
}


/* INPUT AND TEXTAREA */

.textfieldcontact,
.areatextfieldcontact {
    position: relative;
    display: inline-block;
    padding-top: 6px;
    font-family: 'Dinnex-R';
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    width: 100%;
}

.areatextfieldcontact {
    padding-top: 0;
}

.textfieldcontact input,
.areatextfieldcontact textarea {
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #252165;
    border-top-color: transparent;
    border-radius: 5px;
    padding: 10px 13px;
    width: 100%;
    height: inherit;
    color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.87);
    background-color: rgba(5, 32, 79, 0.6);
    box-shadow: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
}

.areatextfieldcontact textarea {
    border: 1px solid #252165;
}

.areatextfieldcontact textarea:focus {
    border-color: #ffffff;
}

.areatextfieldcontact textarea:not(:focus):not(:placeholder-shown) {
    border-color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
}

.areatextfieldcontact textarea {
    width: 100%;
    height: 8em;
    resize: none;
}

.textfieldcontact input+span {
    position: absolute;
    bottom: 12px;
    left: 0;
    display: flex;
    border-color: rgba(var(--pure-material-onsurface-rgb, 0, 0, 0), 0.6);
    width: 100%;
    max-height: 100%;
    color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
    font-size: 75%;
    line-height: 15px;
    cursor: text;
    transition: color 0.2s, font-size 0.2s, line-height 0.2s;
}

.textfieldcontact input+span::before,
.textfieldcontact input+span::after {
    content: "";
    display: block;
    box-sizing: border-box;
    margin-top: 6px;
    border-top: solid 1px;
    min-width: 10px;
    height: 58px;
    pointer-events: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.textfieldcontact input+span::before {
    margin-right: 4px;
    border-left: solid 1px transparent;
    border-radius: 4px 0;
}

.textfieldcontact input+span::after {
    flex-grow: 1;
    margin-left: 4px;
    border-right: solid 1px transparent;
    border-radius: 0 4px;
}

.textfieldcontact input:not(:focus):placeholder-shown {
    border-top-color: #252165;
}

.textfieldcontact input:not(:focus):placeholder-shown+span {
    font-size: inherit;
    line-height: 68px;
}

.textfieldcontact input:not(:focus):placeholder-shown+span::before,
.textfieldcontact input:not(:focus):placeholder-shown+span::after {
    border-top-color: transparent;
}

.textfieldcontact input:focus {
    border: 1px solid #ffffff;
    border-top-color: transparent;
}

.textfieldcontact input:focus+span {
    color: rgb(var(--pure-material-primary-rgb, 250, 250, 250));
}

.textfieldcontact input:not(:focus):not(:placeholder-shown) {
    border: 1px solid;
    border-color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
    border-top-color: transparent;
}

.textfieldcontact.error input,
.areatextfieldcontact.error textarea,
.areatextfieldcontact.error textarea:not(:focus):not(:placeholder-shown) {
    border-color: #db2311;
}

.textfieldcontact.error input:not(:focus):placeholder-shown {
    border-top-color: #db2311;
}

.textfieldcontact.error input:focus:placeholder-shown {
    border-top-color: transparent;
}

.textfieldcontact.error input:focus+span {
    color: #db2311;
}

.textfieldcontact.error input:not(:focus):not(:placeholder-shown) {
    border: 1px solid;
    border-color: #db2311;
    border-top-color: transparent;
}

.textfieldcontact.error input:not(:focus):not(:placeholder-shown)+span {
    color: #db2311;
}


/* SELECT */

.selectcontact {
    position: relative;
    display: inline-block;
    padding-top: 6px;
    font-family: 'Dinnex-R';
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
    width: 100%;
}

.selectcontact select {
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #252165;
    border-radius: 5px;
    padding: 10px 13px;
    width: 100%;
    height: inherit;
    color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.87);
    background-color: rgba(5, 32, 79, 0.6);
    box-shadow: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
}

.selectcontact select+span {
    position: absolute;
    top: 22px;
    left: 0;
    display: flex;
    border-color: rgba(var(--pure-material-onsurface-rgb, 0, 0, 0), 0.6);
    width: fit-content;
    max-height: 100%;
    color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
    font-size: 1em;
    line-height: 15px;
    transition: color 0.2s, font-size 0s, top 0s;
}

.selectcontact select+span::before {
    content: "";
    display: block;
    box-sizing: border-box;
    margin-top: 6px;
    border-top: solid 1px;
    min-width: 10px;
    pointer-events: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.selectcontact select:focus {
    border-color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
    border-top-color: transparent;
}

.selectcontact select:focus+span::after {
    content: "";
    display: block;
    box-sizing: border-box;
    margin-top: 6px;
    border-top: solid 1px;
    min-width: 23.9em;
    pointer-events: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.selectcontact select+span::before {
    margin-right: 4px;
    border-left: solid 1px transparent;
    border-radius: 4px 0;
}

.selectcontact select+span::after {
    flex-grow: 1;
    margin-left: 4px;
    border-right: solid 1px transparent;
    border-radius: 0 4px;
}

.selectcontact select:not(:focus):valid {
    border-color: rgba(var(--pure-material-onsurface-rgb, 250, 250, 250), 0.6);
    border-top-color: transparent;
}

.selectcontact select:not(:focus):valid+span::before {
    border-top: solid 1px;
}

.selectcontact select:not(:focus):valid+span::after {
    content: "";
    display: block;
    box-sizing: border-box;
    margin-top: 6px;
    border-top: solid 1px;
    width: 14.58em;
    pointer-events: none;
}

.wrapcontact:last-of-type .selectcontact select:not(:focus):valid+span::after {
    width: 36.5em;
}

.selectcontact select:not(:focus):valid+span {
    top: 0;
    font-size: 0.8em;
}

.selectcontact select:focus {
    border-top-color: transparent;
}

.selectcontact select:focus+span {
    font-size: inherit;
    top: 0;
    font-size: 0.8em;
    width: inherit;
}

.selectcontact select:not(:focus)+span::before,
.selectcontact select:not(:focus)+span::after {
    border-top-color: transparent;
}

.selectcontact.error select {
    border-color: #db2311;
}

.selectcontact.error select:focus {
    border-top-color: transparent;
}

.selectcontact.error select:focus+span,
.selectcontact.error select:not(:focus):valid+span {
    color: #db2311;
}

.selectcontact.error select:not(:focus):valid {
    border-color: #db2311;
    border-top-color: transparent;
}

.checkContact {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5em 3em;
    padding-left: 0;
    font-family: 'Dinnex-R';
    color: #ffffff;
    font-size: 0.8em;
}

.checkContactterms {
    padding: 0;
    display: flex;
    align-items: center;
}

.checkContactterms input {
    background: rgba(114, 138, 174, 0.5);
    -webkit-appearance: none;
    padding: 0.7em;
    border-radius: 3px;
    display: inline-block;
    height: auto;
    margin-right: 0.8em;
    cursor: pointer;
}

.checkContactterms input:checked {
    background: url(../imgs/header/chekedbox.png) no-repeat center;
    background-color: #ffffff;
}

.checkContactterms a {
    color: #ffffff;
}

.checkContactterms.error input {
    border: 1px solid #db2311;
}


/* SUBMIT BUTTON */

.contact button {
    font-family: 'BebasN';
    background: linear-gradient(90deg, rgba(209, 189, 111, 1) 10%, rgba(237, 236, 206, 1) 50%, rgba(217, 164, 54, 1) 85%);
    color: #001253;
    font-size: 1.5em;
    letter-spacing: 3px;
    padding: 0.3em 3em;
    font-weight: 700;
    margin-top: 1em;
    cursor: pointer;
    border: none;
    outline: none;
}

@media screen and (max-width: 1440px) {
    .contactform {
        margin-top: 1em;
        margin-bottom: 7em;
    }
    .contactbox {
        width: 80vw;
    }
    .contactinner {
        padding-bottom: 1.5em;
    }
    .contactinner h1 {
        font-size: 3em;
        margin-bottom: 0;
    }
    .areatextfieldcontact textarea {
        height: 6em;
    }
    .inputscontact:nth-of-type(3) {
        margin-bottom: 0;
    }
    .contact button {
        margin-top: 0.5em;
    }
}

@media screen and (max-width: 1366px) {
    .contactinner {
        padding-top: 0.5em;
        padding-bottom: 1em;
    }
    .contactinner h1 {
        margin-top: 0;
    }
    .inputscontact {
        margin: 0;
    }
    .textfieldcontact input+span {
        bottom: 7px;
    }
    .errormesagecontact,
    .errorselectcontact,
    .errorcomment {
        font-size: 0.8em;
    }
    .contact button {
        font-size: 1em;
    }
    @media screen and (max-height: 770px) {
        .contactform {
            margin: 4% 0;
        }
    }
    @media screen and (max-height: 660px) {
        .contactform {
            margin: 0.2% 0;
        }
    }
}

@media screen and (max-width: 1280px) {
    .contactform {
        margin: 1.5% 0;
    }
}

@media screen and (max-width: 900px) {
    .contactform {
        margin-bottom: 10em;
    }
    .contactbox {
        width: 70vw;
    }
    .contactinner {
        padding: 0 2em 1em;
    }
    .contactinner h1 {
        margin-top: 0.6em;
    }
    .inputscontact {
        flex-direction: column;
    }
    .singleinputcontact,
    .selectcontact,
    .wrapcontact,
    .wrapcontact:last-of-type {
        width: 100%;
    }
    .contact button {
        font-size: 1.2em;
    }
}

@media screen and (max-width: 660px) {
    .contactbox {
        width: 85vw;
    }
}

@media screen and (max-width: 520px) {
    .contactbox {
        width: 90vw;
    }
    .contactinner {
        padding: 0.5em 2em 1.5em
    }
    .contactform {
        margin-bottom: 7em;
    }
}

@media screen and (max-width: 375px) {
    .contactbox {
        width: 95vw;
    }
    .contactinner {
        padding: 0.5em 1em 1.5em
    }
    .contact button {
        font-size: 1.1em;
    }
}

@media screen and (max-width: 320px) {
    .contactform {
        margin-bottom: 5em;
    }
}