/* Estilos para el Modal de Ficha Informativa */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1001; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    animation: fadeIn 0.5s;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 5px solid #FF8C00;
    width: 80%;
    max-width: 1100px; /* Aumentado el ancho */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.5s;
    overflow: hidden; /* Recorta el contenido que se desborda */
}

/* Animaciones */
@keyframes fadeIn {
    from { background-color: rgba(0,0,0,0); }
    to { background-color: rgba(0,0,0,0.6); }
}

@keyframes slideIn {
    from { top: -100px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Contenedor para imagen y texto */
.ficha-container {
    display: flex;
    flex-direction: column; /* Apila los elementos verticalmente */
    gap: 25px;
}

.ficha-image {
    width: 100%; /* Ocupa todo el ancho disponible */
    max-height: 550px; /* Aumentado para dar más espacio a la imagen */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px; /* Espacio debajo de la imagen */
}

.ficha-image img {
    max-width: 100%; /* La imagen se encoge para caber, no se estira */
    height: auto; /* Mantiene la proporción */
    object-fit: contain; /* Se asegura que toda la imagen sea visible sin estirarse */
    border-radius: 8px;
    max-height: 100%;
}

.ficha-info {
    width: 100%; /* Ocupa todo el ancho */
}

.ficha-info h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.ficha-info h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

.ficha-info p, .ficha-info ul {
    margin-bottom: 10px;
    line-height: 1.7;
}

.ficha-info ul {
    list-style-position: inside;
    padding-left: 10px;
}

.modalidad-info p {
    font-weight: bold;
}

.contacto-info .whatsapp-buttons {
    display: flex;
    flex-direction: row; /* Asegura que los botones estén en fila */
    justify-content: center; /* Centra los botones */
    gap: 3rem; /* Aumenta la distancia entre los botones */
    margin-top: 20px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px; /* Ancho fijo para un círculo perfecto */
    height: 60px; /* Altura fija para un círculo perfecto */
    background-color: #FF8C00;
    color: white;
    text-decoration: none;
    border-radius: 50%; /* Hace que el botón sea circular */
    text-align: center;
    font-size: 1.5rem; /* Tamaño del icono */
    transition: background-color 0.3s, transform 0.3s;
}

.whatsapp-btn:hover {
    background-color: #FF8C00; /* Un tono más oscuro para el hover */
    transform: scale(1.1);
}

.whatsapp-btn i {
    margin: 0; /* Elimina el margen del icono para centrarlo bien */
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .ficha-container {
        flex-direction: column;
    }

    .ficha-image {
        max-width: 100%;
        margin-bottom: 20px;
    }
}
