.modal {
    display: none;
    position: fixed;
    z-index: 11000;
    padding: 2em 0 2em 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(49, 52, 58, 0.6);
}

    #modal-alerta {
        background-color: rgba(49, 52, 58,0.8);
    }

    .modal-content {
        background-color: #fff;
        border-radius: 0;
        z-index: 1003;
        margin: 0 auto;
        padding: 3em;
        width: 50em;
        max-width: calc(100% - 2em);
        position: relative;

        -moz-transform: translateY(0.75rem);
        -webkit-transform: translateY(0.75rem);
        -ms-transform: translateY(0.75rem);
        transform: translateY(0.75rem);
        -moz-transition: opacity 0.25s ease, -moz-transform 0.25s ease;
        -webkit-transition: opacity 0.25s ease, -webkit-transform 0.25s ease;
        -ms-transition: opacity 0.25s ease, -ms-transform 0.25s ease;
        transition: opacity 0.25s ease, transform 0.25s ease;
        opacity: 0;
    }

    #modal-habitaciones .modal-content {
        width: 30em;
    }

    #modal-alerta .modal-content {
        width: 40em;
    }

        .modal-content.loaded {
            -moz-transform: translateY(0);
            -webkit-transform: translateY(0);
            -ms-transform: translateY(0);
            transform: translateY(0);
            -moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease;
            -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
            -ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease;
            transition: opacity 0.5s ease, transform 0.5s ease;
            opacity: 1;
        }

        .modal-content ul {
            margin-left: 1em;
            margin-bottom: 0em;
        }

        .modal-content p {
            margin-bottom: 1em;
        }
    
    #modal-imagen {
        padding-top: 4em;
    }

    .modal-content-img {
        position: relative;
        display: block;
        margin: 0 auto;
        width: fit-content;
        width: -moz-fit-content;

        -moz-transform: translateY(0.75rem);
        -webkit-transform: translateY(0.75rem);
        -ms-transform: translateY(0.75rem);
        transform: translateY(0.75rem);
        -moz-transition: opacity 0.25s ease, -moz-transform 0.25s ease;
        -webkit-transition: opacity 0.25s ease, -webkit-transform 0.25s ease;
        -ms-transition: opacity 0.25s ease, -ms-transform 0.25s ease;
        transition: opacity 0.25s ease, transform 0.25s ease;
        /* opacity: 0; */
    }

        .modal-content-img.loaded {
            -moz-transform: translateY(0);
            -webkit-transform: translateY(0);
            -ms-transform: translateY(0);
            transform: translateY(0);
            -moz-transition: opacity 0.5s ease, -moz-transform 0.5s ease;
            -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
            -ms-transition: opacity 0.5s ease, -ms-transform 0.5s ease;
            transition: opacity 0.5s ease, transform 0.5s ease;
            opacity: 1;
        }

        .modal-content-img img {
            width: auto;
            height: auto;
            max-height: calc(100vh - 8em);
            max-width: calc(100% - 4em);
            margin: 0 2em;
        }    

.modal .close {
    position: absolute;
    color: #ffffff;
    top: 1em;
    right: 1em;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 1005;
}

    #modal-imagen .close {
        font-size: 2.5em;
        top: 0.75em
    }

    .modal .modal-content .close {
        color: #000;
    }

    .modal .close:hover,
    .modal .close:focus {
        color: #eeeeee;
        text-decoration: none;
        cursor: pointer;
    }

.modal .flecha {
    position: absolute;
    color: #ffffff;
    top: calc(50vh - 1em);
    font-size: 2em;
    font-weight: bold;
    z-index: 1005;
    cursor: pointer;
}

.modal .next {
    right: 1em;
}

.modal .pre {
    left: 1em;
}

.modal .flecha p {
    font-size: 2em;
}

@media screen and (max-width: 736px) {

    .modal-content {
        padding: 2em 2em;
    }

    .modal-content-img img {
        max-height: calc(100vh - 6em);
        max-width: calc(100% - 2em);
        margin: 0 1em;
    }

    #modal-imagen .close {
        top: 0.5em;
        right: 0.5em;
    }

    .modal .flecha {
        top: auto;
        bottom: 2em;
    }
}