#contact {
    position: relative;
    font: 1.1em/1.8 Roboto,Verdana;
    width: 335px;
    background: #CCC;
    margin: 20px 0 60px;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.message_form{
    font: 1.3em/2 Roboto;
	color: #FF6347;
    text-align: center;
    background: #282C2D;
    padding: 20px;
    border: 1px dashed #fff;
	box-shadow: 0 0 3px 3px #999;
}

#fail_message{  
	width: 50%;  
	font: 1.3em/2 Georgia;   
	color: red;
	text-align: center;
    background: #fff;
    border: 1px dashed black;
    margin-top: 10px;
    margin-bottom: 10px;
}

#contact:before {
    display: block;
    position: absolute;
    content: "";
    width: 40px;
    height: 100%;
    top: 0;
    left: 100%;
    background: #282C2D;
    -webkit-transform: rotateY(45deg) scaleX(1.3);
    transform: rotateY(45deg) scaleX(1.3);
    -webkit-transform-origin: 0 50%;
    transform-origin: 0 50%;
}

#contact:after {
    display: block;
    position: absolute;
    content: "";
    width: 100%;
    height: 40px;
    bottom: -40px;
    left: 0;
    background: #282C2D;
    -webkit-transform: rotateX(-95deg) scaleY(1.3) skew(45deg);
    transform: rotateX(-95deg) scaleY(1.3) skew(45deg);
    -webkit-transform-origin: 50% 0;
    transform-origin: 50% 0;
}

#contact .reg_title {
    position: relative;
    font-size: 1.3em;
    font-family: "Modern Antiqua",Georgia;
    color: #fff;
    text-align: center;
    background: #282C2D;
    box-shadow: 0 4px 2px -2px #888;
}

#contact .reg_title:before {
    display: block;
    position: absolute;
    content: "";
    width: 1em;
    height: calc(100% + 1em);
    top: 0;
    left: -1em;
    background: -webkit-linear-gradient(top,#282C2D calc(100% - 1em),transparent 0),-webkit-linear-gradient(top right,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
    background: linear-gradient(to bottom,#282C2D calc(100% - 1em),transparent 0),linear-gradient(to bottom left,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
}

#contact .reg_title span {
    font-size: .65em;
    color: #ff6347;
}

#contact p {
    position: relative;
    background: #282C2D;
    margin-bottom: 25px;
    box-shadow: 0 4px 2px -2px #888;
}

#contact p:before {
    display: block;
    position: absolute;
    content: "";
    width: 1em;
    height: calc(100% + 1em);
    top: 0;
    left: -1em;
    background: -webkit-linear-gradient(top,#282C2D calc(100% - 1em),transparent 0),-webkit-linear-gradient(top right,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
    background: linear-gradient(to bottom,#282C2D calc(100% - 1em),transparent 0),linear-gradient(to bottom left,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
}

#contact p:not(:first-of-type):after {
    display: block;
    position: absolute;
    content: "*";
    top: 0;
    left: 6px;
    color: #ff6347;
}

#contact p:last-of-type {
    margin-bottom: 10px;
}

#contact .news {
    position: relative;
    color: #fff;
    background: #282c2d;
}

#contact .news:before {
    display: block;
    position: absolute;
    content: "";
    width: 1em;
    height: calc(100% + 1em);
    top: 0;
    left: -1em;
    background: -webkit-linear-gradient(top,#282C2D calc(100% - 1em),transparent 0),-webkit-linear-gradient(top right,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
    background: linear-gradient(to bottom,#282C2D calc(100% - 1em),transparent 0),linear-gradient(to bottom left,#282C2D 50%,transparent 0) 0 100% / 1em 1em no-repeat;
}

#contact input[type="checkbox"] {
    display: none;
}

#contact input[type="checkbox"] + label {
    display: block;
    position: relative;
    padding-left: 10px;
}

#contact input[type="checkbox"] + label:hover {
    cursor: pointer;
}

#contact input[type="checkbox"] + label:after {
    position: absolute;
    top: -5px;
    right: 12px;
    content: "\f096";
    font-family: fontAwesome;
    font-size: 1.4em;
}

#contact input[type="checkbox"]:checked + label:after {
    content: "\f14a";
    -webkit-animation: popinout 180ms ease-in-out;
    animation: popinout 180ms ease-in-out;
}

@-webkit-keyframes popinout {
    0,100% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    80% {
        -webkit-transform: scale(0.65);
        transform: scale(0.65);
    }
}

@keyframes popinout {
    0,100% {
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    80% {
        -webkit-transform: scale(0.65);
        transform: scale(0.65);
    }
}

#contact div:last-child {
    text-align: center;
    margin-top: 10px;
}

#contact input[type="submit"] {
    position: relative;
    z-index: 1;
    font: bold 1.2em/1.7 Georgia;
    color: #fff;
    text-align: center;
    background: #282C2D;
    padding: 0 10px;
    border: 1px dashed #FFF;
    border-bottom: none;
    margin-bottom: 10px;
    box-shadow: none;
    cursor: pointer;
    -webkit-transition: all 300ms ease-in-out;
    transition: all 300ms ease-in-out;
}

#contact input[type="submit"]:hover {
    color: #ff6347;
    -webkit-transition: all 0;
    transition: all 0;
}

#contact input[type="submit"]:focus {
    outline: none;
}

#contact p:first-of-type:before,#contact p:last-of-type:before {
    background: none;
}

#contact p input,#contact p textarea {
    width: 60%;
    font: 1em/1.4 Roboto;
    padding: 0 10px;
    border: none;
    margin-left: 20px;
}

#contact p textarea {
    width: 75%;
    margin-top: 10px;
}

#contact p input:focus,#contact p textarea:focus {
    outline: none;
}

#contact p label {
    display: block;
    position: relative;
    width: 34%;
    height: 100%;
    color: transparent;
    padding-left: 7px;
    float: right;
}

#contact p textarea + label,#contact p textarea.error ~ label:last-of-type,#contact p textarea.valid ~ label:last-of-type {
    width: 10%;
    margin-top: 7px;
}

#contact p textarea + label.error {
    top: -33px;
}

#contact p label:before {
    display: block;
    position: absolute;
    content: "\f007";
    font-family: fontAwesome;
    top: 0;
    right: 30%;
    color: #FF6347;
    padding: 0 6px;
    background: #fff;
    box-shadow: 0 0 0 3px #282C2D inset;
    width: 38px;
    text-align: center;
}

#contact p:nth-of-type(2) label,#contact p:nth-of-type(3) label {
    padding-left: 17px;
}

#contact p:nth-of-type(3) label:before {
    content: "\f0e0";
}

#contact p:nth-of-type(4) label:before {
    content: "\f10e";
}

#contact p:nth-of-type(5) label:before {
    content: "\f040";
}

#contact p input:focus ~ label,#contact p input.valid ~ label,#contact p input.has-value ~ label {
    color: #FF6347;
    -webkit-transition: all 300ms linear 50ms;
    transition: all 300ms linear 50ms;
}

#contact p input:focus ~ label:before,#contact p input.valid ~ label:before,#contact p input.has-value ~ label:before {
    color: #fff;
    background: transparent;
    box-shadow: none;
    right: 5px;
    -webkit-transition: all 300ms linear;
    transition: all 300ms linear;
}

#contact p input.has-value ~ label,#contact p input.has-value ~ label:before {
    -webkit-transition: all 0s;
    transition: all 0s;
}

#contact p input.valid ~ label:before,#contact p input.error ~ label:before {
    content: "\f046";
    right: 0;
    color: #90ee90;
}

#contact p input.error ~ label:before,#contact p textarea.error ~ label:before {
    content: "\f00d";
    color: red;
}

#contact p textarea.valid ~ label:before {
    content: "\f046";
    color: #90ee90;
    background: transparent;
}

#contact p label.error {
    position: absolute;
    width: 100%;
    top: -24px;
    left: 10px;
    color: red !important;
    font-size: .8em;
    font-family: Georgia;
}

#contact p label.error:before {
    display: none;
}