/* Modal de filtrado*/
.modal {
    display: none; /* Se mostrará con display: flex al abrir */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); 
    align-items: center;  /* Centra verticalmente */
    justify-content: center; /* Centra horizontalmente */
    padding: 10px;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border: 1px solid #888;
    width: 35%;
    max-width: 90%;
    height: auto;
    max-height: 90%;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}


/* Estilos específicos para tablets (iPads y similares) */
@media screen and (min-width: 868px) and (max-width: 1260px) {
    .modal-content {
        width: 60%;
    }
}

/* Estilos específicos para móviles */
@media screen and (max-width: 868px) {
    .modal-content {
        width: 80%;
    }
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px; /* Espacio entre botones */
    position: absolute; /* Posición absoluta para mantener al final del contenido */
    bottom: 0px; /* Distancia desde abajo del modal-content */
    width: 85%; /* Ancho completo del modal-content */
    padding: 5px; /* Relleno de los botones */
    background-color: white; /* Color de fondo de los botones */
}

.modal-buttons button {
    border-radius: 10px; /* Add rounded corners */
    background-color: #ffffff; /* Button background color */
    color: rgb(0, 0, 0); /* Button text color */
    padding: 10px 20px; /* Adjust padding for larger size */
    font-size: 16px; /* Adjust font size for larger size */
    cursor: pointer; /* Show pointer cursor on hover */
    width: 135px;
}

.modal-buttons button:last-child {
    position: relative; /* Position relative for absolute icon */
}

.modal-content p {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Align items vertically */
    margin-top: 5px;
    margin-bottom: 5px;
}

.modal-content p i {
    margin-right: 5px; /* Adjust spacing between icon and text */
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}




.material-modal {
    display: none; /* Mostrar con JS cuando se active */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.material-modal-content {
    display: flex;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    align-items: center;
    justify-content: center;
}

.material-image {
    max-height: 85vh;
    margin-top: 40px;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}


.material-nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    margin: 0 20px;
    transition: color 0.3s;
}

.material-nav-btn:hover {
    color: #bb86fc;
}

.material-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: white;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
    transition: color 0.3s;
}

.material-close:hover {
    color: #bb86fc;
}

@media screen and (max-width: 767px) {
    #imageModal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 9999;
    }

    .material-modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        padding: 0;
        background: transparent;
        border: none;
    }

    .material-image {
        max-width: 90vw;
        max-height: 90vh;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        transition: transform 0.3s ease;
    }

    .material-nav-btn,
    .material-close {
        position: absolute;
        background-color: rgba(0, 0, 0, 0.5);
        border: none;
        color: white;
        padding: 5px;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s, color 0.3s;
    }

    #prevButton {
        left: 0px;
        top: 50%;
        transform: translateY(-50%);
    }

    #nextButton {
        right: 0px;
        top: 50%;
        transform: translateY(-50%);
    }

    .material-close {
        position: fixed;
        top: 30px;
        right: 10px;
        font-size: 2rem;
    }

    .material-nav-btn:hover,
    .material-close:hover {
        background-color: rgba(0, 0, 0, 0.7);
        color: #bb86fc;
    }
}
