body {
    margin: 0;
    background-image: url("/public/images/background/background-contact.jpg");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

body #div-content {
    height: 48rem;
    position: relative;
    background-color: #073a59;
    z-index: 2;
    padding-bottom: 7rem;
}

.grid {
    position: absolute;
    display: grid;
    gap: 5rem;
    grid-template-columns: repeat(1, 65rem);
    grid-template-rows: repeat(1, 8rem);
    justify-self: center;
    justify-content: center;
    margin-top: 25rem;
}
.grid-item {
    height: 45rem;
    align-self: center;
}

.grid-item img {
    border-radius: 2rem;
    max-width: 30rem;
    height: auto;
}

.grid .one {
    background-color: #a2cceb;
    padding: 1rem;
    border-radius: .40rem;
}

.right-text {
    margin-left: 31rem;
}

.one img:hover {
    transform: scale(1.01);
}
.one img {
    float: left;
    box-shadow: 1rem 1rem 0rem #011622;
}

.contact {
    background-color:#307097;
    box-shadow: 1rem 1rem 0rem #011622;
    border-radius: 2rem;
    width: 30rem;
    font-family: Quicksand, sans-serif;
    color: #ffffff;
    padding: 1rem 0 1.5rem;

    h3 {
        margin: 1rem 2rem 0.5rem;
        font-size: 1.2rem;
        border-bottom: 0.15rem dashed #834206ec;
        padding-bottom: 0.5rem;
    }
    label, input, textarea, select {
        display: block;
        margin: 1rem 2rem 0.3rem;
        padding: 0.4rem;
        font-family: inherit;
    }
    input[type="text"], input[type="email"], textarea, select {
        background-color: #073a59;
        color: #ffffff;
        border: 0.1rem solid #073a59;
        border-radius: 0.3rem;
        width: calc(100% - 4rem);
        box-sizing: border-box;
    }
    input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
        outline: none;
        border-color: #834206ec;
    }
    input:invalid:not(:placeholder-shown) {
        border-color: #b34040;
    }
    textarea {
        height: 10rem;
        resize: vertical;
        font-family: inherit;
    }
    .required {
        color: #ffb84d;
    }
    .check-line {
        display: flex;
        align-items: center;
        margin: 1rem 2rem;
        gap: 0.6rem;
    }
    .check-line input[type="checkbox"] {
        margin: 0;
        width: 1.1rem;
        height: 1.1rem;
        accent-color: #834206ec;
        cursor: pointer;
    }
    .check-line label {
        margin: 0;
        padding: 0;
        cursor: pointer;
    }
    .form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.8rem;
        margin: 1.5rem 2rem 0;
    }
    input[type="submit"], input[type="reset"] {
        display: inline-block;
        margin: 0;
        padding: 0.5rem 1.2rem;
        background-color: #073a59;
        color: #ffffff;
        border: 0.1rem solid #834206ec;
        border-radius: 0.3rem;
        cursor: pointer;
        font-family: inherit;
        transition: background-color 0.2s ease-out;
    }
    input[type="submit"]:hover, input[type="reset"]:hover {
        background-color: #2a658a;
    }
}

.contact:hover{
    transform: scale(1.01);
}

@media screen and (max-width: 1280px) {
    .grid {
        grid-template-columns: 90%;
    }

    .right-text {
        margin-left: 45%;
    }
}

@media screen and (max-width: 1024px) {
    .grid {
        position: relative;
        grid-template-columns: 90%;
        grid-template-rows: auto;
        gap: 2rem;
        margin-top: 0rem;
    }

    .grid-item {
        height: auto;
    }

    .grid-item img {
        float: none;
        display: block;
        margin: 0 auto 1rem;
        width: 100%;
        max-width: 30rem;
    }

    .one img {
        float: none;
    }

    .right-text {
        margin-left: 0;
    }

    .contact {
        width: 100%;
        max-width: 30rem;
        margin: 0 auto;
        label, input, textarea, select {
            margin-left: 1rem;
            margin-right: 1rem;
        }
        h3 {
            margin-left: 1rem;
            margin-right: 1rem;
        }
        input[type="text"], input[type="email"], textarea, select {
            width: calc(100% - 2rem);
            box-sizing: border-box;
        }
        .check-line, .form-actions {
            margin-left: 1rem;
            margin-right: 1rem;
        }
    }

    body #div-content {
        height: auto;
        min-height: 30rem;
        padding-bottom: 5rem;
    }
}

@media screen and (max-width: 480px) {
    .grid {
        gap: 1.5rem;
    }

    .grid .one {
        padding: 0.6rem;
    }

    .contact {
        box-shadow: 0.5rem 0.5rem 0rem #011622;
    }
}
