.nav-links .contact {
    color: var(--yellow);
}

.contact-page {
    width: 100%;
    margin: 0 auto;
}

/* Form styles */
.contact-page .contact-heading {
    color: var(--yellow);
    margin-bottom: 10px;
    font-weight: bold;
    display: block;
}

.contact-page .contact-description {
    padding: 15px 0;
    margin-bottom: 25px;
}

.form-container {
    background-color: #fff;
    padding: 15px;
    width: 80%;
    border-radius: 30px;
    box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
}

.form-container form {
    display: flex;
    flex-direction: column;
}

textarea {
    resize: none;
    height: 80px;
    width: 100%;
}

#contact-form {
    width: 100%;
    padding: 15px;
}

.user-box {
    position: relative;
    margin-bottom: 20px;
}

.user-box label {
    font-size: 14px;
    color: rgb(99, 102, 102);
    position: absolute;
    top: -10px;
    left: 10px;
    background-color: #fff;
    transition: all .3s ease;
}

.user-box input,
.user-box textarea {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    outline: 0;
    width: 100%;
    background-color: transparent;
}

.user-box input:placeholder-shown+ label, .user-box textarea:placeholder-shown +label {
    top: 10px;
    background-color: transparent;
}

.user-box input:focus,
.user-box textarea:focus {
    border-color: #3366cc;
}

.user-box input:focus+ label, .user-box textarea:focus +label {
    top: -10px;
    left: 10px;
    background-color: #fff;
    color: #3366cc;
    font-weight: 600;
    font-size: 14px;
}

.form-container input[type="submit"] {
    background-color: var(--blue);
    color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

.form-container input[type="submit"]:hover {
    background-color: #414141;
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

.user-box input.user-invalid {
    border-color: var(--red);
}

.error-message {
    font-size: 0.9rem;
    color: var(--red);
}

.error-message:empty {
    display: none;
}

/* Dialog styles */
dialog[open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: none;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);

    width: fit-content;    
    max-width: 90%;
    height: fit-content;  

    position: fixed;
    top: 50%;       
    left: 50%;      
    transform: translate(-50%, -50%);
}

dialog[open] img {
    width: 40%;
    margin: 25px auto;
    display: block;
}

dialog[open] h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
}

dialog[open] p {
    font-size: 1.25rem;
    width: 80%;
    margin: 0 auto;
    margin-bottom: 20px;
}

dialog[open] button,
dialog[open] a {
    padding: 15px;
    font-size: 1rem;
    border-radius: 15px;
    cursor: pointer;
}

dialog[open] button {
    background-color: rgba(0, 0, 0, 0.2);
}

dialog[open] button:hover {
    background-color: #414141;
    color: #f0f0f0;
}

dialog[open] a {
    background-color: var(--blue);
}

dialog[open] a:hover {
    background-color: #414141;
    color: var(--light-grey);
}

dialog[open] .row-buttons {
    display: flex;
    justify-content: flex-end;
    width: 80%;
    gap: 15px;
}

/* Informations styles */
.reach-us {
    height: 100%;
    background-image: url("../images/background2.jpg");
    background-size: cover;
    background-repeat: no-repeat;
}

.reach-us .heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1em;
    color: var(--yellow);
}

.contact-info {
    border: none;
    border-radius: 10px;
}

.contact-info h2 {
    font-size: 1.75rem;
    margin-bottom: 1.3em;
    font-weight: 750;
    color: var(--yellow);
}

.contact-info p {
    color: #f0f0f0;
    font-size: 1.25em;
    margin-bottom: 1em;
}

.contact-info .phone-link {
    border-radius: 15px;
    color: #f0f0f0;
    font-size: 1rem;
    background-color: var(--blue);
    padding: 15px;
    display: block;
    width: fit-content;
    margin-bottom: 30px;
}

.contact-info .email-link {
    border-radius: 15px;
    color: #f0f0f0;
    font-size: 1rem;
    background-color: var(--blue);
    padding: 15px;
    display: block;
    width: fit-content;
}

/* Maps styles */
.maps-page {
    background-color: #414141;
    padding-bottom: 25px;
}

.maps {
    margin: 30px auto 50px;
    display: flex;
    width: 70%;
    justify-content: space-between;
}

.piscine {
    width: 470px;
}

.piscine .title {
    color: #f0f0f0;
    text-align: left;
    font-size: 1.25em;
    margin: 1em 0;
}

.map-frame {
    border: none;
    width: 100%;
    height: 300px;
    border-radius: 5px;
}

.copyright {
    margin-top: 1em;
}

.heading {
    color: var(--yellow);
    padding-top: 75px;
    font-size: 1.75em;
    font-weight: 900;
    text-align: center;
}

/* Small devices (phones, large phones and portrait tablets, 768px and down) */
@media only screen and (max-width: 768px) { 
    .contact-page {
        flex-direction: column;
    }

    .form-container {
        background-color: #fff;
        padding: 15px;
        width: 80%;
        margin: 20px auto 110px;
        border-radius: 30px;
        box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.05);
    }

    dialog[open] {
        width: 90%;
        padding: 30px;
    }

    dialog[open] h1 {
        margin-bottom: 20px;
        font-size: 2rem;
    }

    dialog[open] p {
        font-size: 1rem;
        width: 100%;
    }

    dialog[open] .row-buttons {
        justify-content: space-between;
        width: 100%;
        gap: 15px;
    }

    .contact-page .contact-heading {
        font-size: 1.75rem;
        width: 80%;
        margin: 40px auto 0;
    }
    
    .contact-page .contact-description {
        width: 80%;
        margin: 0 auto;
    }

    .form-container input[type="submit"] {
        border-radius: 15px;
    }

    .maps {
        margin: 30px auto 50px;
        display: flex;
        flex-direction: column;
        width: 60%;
        justify-content: space-between;
    }

    .reach-us {
        width: 100%;
        background-image: none;
        background-color: #414141;
    }

    .contact-info {
        width: 80%;
        margin: 0 auto;
        padding: 50px 0;
        margin-bottom: calc(60px + env(safe-area-inset-bottom));
        margin-bottom: calc(60px + constant(safe-area-inset-bottom)); /* fallback for older iOS */;
    }

    .contact-info p {
        color: #f0f0f0;
    }
}

@media only screen and (min-width: 768px) {
    .inscription {
        display: flex;
        align-items: center;
        width: 50%;
        height: 70vh;
        margin: 25px auto 100px;
    }

    .inscription-info {
        width: 30%;
        margin-right: 75px;
    }

    .form-container {
        width: 40%;
    }

    .contact-heading {
        font-size: 2rem;
        width: fit-content;
    }

    .contact-description {
        font-size: 1.25rem;
    }

    .form-container input[type="submit"] {
        border-radius: 5px;
    }

    .reach-us {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
    }

    .contact-info {
        margin: 100px auto;
        padding: 2em;
        width: 40%;
    }
}