/* Estilos del modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro */
    justify-content: center;
    align-items: center;
    overflow: auto; /* En caso de que haya mucho contenido */
}

/* Animación para el fade-in del modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal content */
.modal-content {
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease; /* Animación para hacer aparecer el modal */
    margin-top: 10%;
    margin-left: 36%;
}

/* Header */
.modal-header {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffffff;
}

/* Body */
.modal-body {
    font-size: 16px;
    margin-bottom: 20px;
}

.labelform {
    color: rgb(255, 255, 255);
}

/* Footer */
.modal-footer {
    text-align: right;
}

/* Close button */
.modal .close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 25px;
    cursor: pointer;
    color: #333;
    background: transparent;
    border: none;
}

.modal .close:hover {
    color: #ff0000;
}

/* Form inside the modal */
.modal form {
    display: flex;
    flex-direction: column;
}

.modal form label {
    margin-bottom: 10px;
    font-weight: bold;
}

.modal form input,
.modal form select,
.modal form textarea {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.modal form button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal form button:hover {
    background-color: #0056b3;
}

/* Estilos cuando el modal se muestra */
.modal.show {
    display: flex; /* Muestra el modal cuando se le asigna la clase 'show' */
}

/* Contenedor principal */
main {
    padding: 30px 20px;
    max-width: 1800px;
    margin: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

/* Contenedor de tarjetas */
.services-container {
    width: 100%;
    max-width: 1500px;
    display: flex;
    justify-content: center;
}

/* Grid de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
    gap: 30px;
    justify-content: center;
}

/* Tarjetas de servicio */
.service-card, .service-card1 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 600px; /* Más ancho para que no se corten imágenes */
    height: 700px; /* Altura uniforme */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.service-card:hover, .service-card1:hover {
    transform: scale(1.05);
}

/* Imágenes dentro de las tarjetas */
.service-card img, .service-card1 img {
    width: 100%;
    height: 450px; /* Asegura que todas las imágenes tengan la misma altura */
    object-fit: cover; /* Ajusta la imagen sin deformarla */
}

/* Estilos de título y descripción */
.service-card h2, .service-card1 h2,
.service-card p, .service-card1 p {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

/* Botón */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 15px;
    background: linear-gradient(45deg, #007BFF, #0056b3);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: linear-gradient(45deg, #0056b3, #007BFF);
}

/* Responsividad */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: 1fr; /* Una tarjeta por fila en pantallas pequeñas */
    }

    .modal-content {
        margin-left: auto;
        margin-right: auto;
    }
}
